diff --git a/packages/pdf/src/templates/shared/styles.ts b/packages/pdf/src/templates/shared/styles.ts index e69aad133..1e68b42ec 100644 --- a/packages/pdf/src/templates/shared/styles.ts +++ b/packages/pdf/src/templates/shared/styles.ts @@ -21,7 +21,11 @@ export const mergeStyles = (...styles: StyleInput[]): Style => Object.assign({}, export const mergeLinkStyles = (...styles: StyleInput[]): Style => mergeStyles(...styles, linkUnderlineStyle); -export const headerNameLineHeight = 1.2; +// Increased from 1.2 to 1.3 to prevent descenders (g, p, y, etc.) from being +// clipped by the overflow:hidden applied in safeTextStyle on all Heading elements. +// At 1.5× heading font size, a lineHeight of 1.2 leaves insufficient room for +// the descender depth of many fonts, causing letters to appear visually cut off. +export const headerNameLineHeight = 1.3; export type ResolvePlacementColorOptions = { placement: TemplatePlacement;