feat(pdf): roll out shared RTL layout to all templates

Introduce createRtlStyleHelpers and a single rtl flag on RenderProvider,
migrate every template page to mirrored layout styles, and rename
alignRight to alignEnd. Fix plain rich text rendering via PdfText
paragraph renderers and map legacy Times New Roman to Times-Roman.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Amruth Pillai
2026-05-25 16:29:50 +02:00
co-authored by Cursor
parent 86fff7237f
commit 24c882fa9f
28 changed files with 501 additions and 276 deletions
+3 -3
View File
@@ -261,7 +261,7 @@ describe("buildResumeFontFamily", () => {
describe("legacy font compatibility (#2989)", () => {
it.each([
["Times New Roman", "Tinos"],
["Times New Roman", "Times-Roman"],
["Arial", "Arimo"],
["Garamond", "EB Garamond"],
["Calibri", "Carlito"],
@@ -277,7 +277,7 @@ describe("legacy font compatibility (#2989)", () => {
});
it("every alias target is actually registered as a known font", () => {
const aliasTargets = ["Tinos", "Arimo", "EB Garamond", "Carlito"];
const aliasTargets = ["Times-Roman", "Tinos", "Arimo", "EB Garamond", "Carlito"];
for (const target of aliasTargets) {
expect(getFont(target), `alias target ${target} must be a known font`).toBeDefined();
}
@@ -286,7 +286,7 @@ describe("legacy font compatibility (#2989)", () => {
it("getFont resolves a legacy family to its alias target", () => {
const tnr = getFont("Times New Roman");
expect(tnr).toBeDefined();
expect(tnr?.family).toBe("Tinos");
expect(tnr?.family).toBe("Times-Roman");
});
it("getFont still returns the direct font when both legacy and direct lookup would succeed", () => {