fix: unify line height across default fonts (#9513)

This commit is contained in:
Marcel Mraz 2025-05-14 16:02:01 +02:00 committed by GitHub
parent d92a849038
commit 6b5fb30d69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ export const FONT_METADATA: Record<number, FontMetadata> = {
unitsPerEm: 1000,
ascender: 1011,
descender: -353,
lineHeight: 1.35,
lineHeight: 1.25,
},
},
[FONT_FAMILY["Lilita One"]]: {
@ -116,7 +116,7 @@ export const FONT_METADATA: Record<number, FontMetadata> = {
unitsPerEm: 1000,
ascender: 880,
descender: -144,
lineHeight: 1.15,
lineHeight: 1.25,
},
fallback: true,
},

View File

@ -1324,7 +1324,7 @@ describe("textWysiwyg", () => {
).toEqual(FONT_FAMILY.Nunito);
expect(
(h.elements[1] as ExcalidrawTextElementWithContainer).lineHeight,
).toEqual(1.35);
).toEqual(1.25);
});
describe("should align correctly", () => {