fix(pdf): honor soft hyphens for every hyphenated language

Forme hyphenates every language it has patterns for, so drop the German-only
gate on soft-hyphen decoding and the "Currently supports German" schema note.
This commit is contained in:
Amruth Pillai
2026-09-30 01:07:33 +02:00
parent 725be158c0
commit 6d4ceefbdf
5 changed files with 23 additions and 25 deletions
+1 -1
View File
@@ -4707,7 +4707,7 @@ The full JSON Schema for Reactive Resume follows. You can also fetch the latest
"description": "The typography for the headings of the resume."
},
"hyphenation": {
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false.",
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false.",
"type": "boolean"
}
},
+19 -19
View File
@@ -10289,7 +10289,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -11032,7 +11032,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -11690,7 +11690,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -12056,7 +12056,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -12701,7 +12701,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -13442,7 +13442,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -14117,7 +14117,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -14775,7 +14775,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -15373,7 +15373,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -15966,7 +15966,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -16828,7 +16828,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -17586,7 +17586,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -23300,7 +23300,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -27674,7 +27674,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -32183,7 +32183,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -36663,7 +36663,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -41610,7 +41610,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -46069,7 +46069,7 @@
},
"hyphenation": {
"type": "boolean",
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false."
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false."
}
},
"required": [
@@ -50895,7 +50895,7 @@
"description": "The typography for the headings of the resume."
},
"hyphenation": {
"description": "Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false.",
"description": "Enable automatic PDF hyphenation using the resume language. Defaults to false.",
"type": "boolean"
}
},
@@ -98,7 +98,7 @@ export const RichText = ({ children, semanticField }: RichTextProps) => {
const normalizedHtml = normalizeRichTextHtml(children, {
direction: rtl ? "rtl" : "ltr",
softHyphens: metadata.typography.hyphenation === true && /^de(?:-|$)/i.test(metadata.page.locale),
softHyphens: metadata.typography.hyphenation === true,
});
const html = richTextNodeKey
? projectNormalizedRichTextHtml(normalizedHtml, richTextNodeKey, renderedChildKeysFor)
+1 -3
View File
@@ -598,9 +598,7 @@ export const typographySchema = z.object({
hyphenation: z
.boolean()
.optional()
.describe(
"Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false.",
),
.describe("Enable automatic PDF hyphenation using the resume language. Defaults to false."),
});
const styleSlotSchema = z.enum([
+1 -1
View File
@@ -875,7 +875,7 @@ Choose one coherent shape for each union value. Required fields are local to tha
| `metadata.typography.heading.fontWeights[]` | `string` | — | enum: ["100","200","300","400","500","600","700","800","900"] | — |
| `metadata.typography.heading.fontSize` | `number` | yes | minimum: 6; maximum: 24; default: 11 | The size of the font to use, defined in points (pt). |
| `metadata.typography.heading.lineHeight` | `number` | yes | minimum: 0.5; maximum: 4; default: 1.5 | The line height of the font to use, defined as a multiplier of the font size (e.g. 1.5 for 1.5x). |
| `metadata.typography.hyphenation` | `boolean` | no | — | Enable automatic PDF hyphenation using the resume language. Currently supports German. Defaults to false. |
| `metadata.typography.hyphenation` | `boolean` | no | — | Enable automatic PDF hyphenation using the resume language. Defaults to false. |
| `metadata.notes` | `string` | yes | — | Personal notes for the resume. Can be used to add any additional information or instructions for the resume. These notes are not displayed on the resume, they are only visible to the author of the resume when editing the resume. This should be a HTML-formatted string. |
| `metadata.styleRules` | `array` | yes | — | Structured style rules that target semantic resume sections and slots for PDF rendering. |
| `metadata.styleRules[]` | `any` | — | — | — |