diff --git a/THIRD-PARTY-LICENSES.md b/THIRD-PARTY-LICENSES.md index 699e86ab..fc64d5a0 100644 --- a/THIRD-PARTY-LICENSES.md +++ b/THIRD-PARTY-LICENSES.md @@ -49,6 +49,13 @@ Relative to upstream Roboto Condensed: - Vertical outlines scaled to align cap heights with the same target. - TrueType hinting tables (`prep`, `fpgm`, `cvt`) removed so the modified outlines render unhinted. +- GPOS (kerning, capital spacing) dropped and the GSUB `liga` feature + removed: Zebra's firmware lays out Font 0 with fixed per-glyph + advances, no kerning and no ligatures. +- All outlines shifted down ~0.04 em to match CG Triumvirate's rendered + vertical placement. +- Ink spans, advances and accent anchors of individual glyphs across the + printable Latin-1 range remapped to CG Triumvirate's measured metrics. - Family and PostScript names renamed from "Roboto Condensed" to "PrintLab ZPL". diff --git a/src/assets/fonts/NOTICE.md b/src/assets/fonts/NOTICE.md index 3af02800..0fb17da1 100644 --- a/src/assets/fonts/NOTICE.md +++ b/src/assets/fonts/NOTICE.md @@ -18,11 +18,10 @@ Relative to upstream Roboto Condensed: - GPOS (kerning, capital spacing) dropped and the GSUB `liga` feature removed: Zebra's firmware lays out Font 0 with fixed per-glyph advances, no kerning and no ligatures. -- All outlines shifted down ~0.04 em to match Labelary's vertical - placement; individual glyphs remapped to CG Triumvirate's measured - ink spans, ascenders of `b d k l` trimmed above the x-height and the - `: ;` top dots re-anchored, all via a local fonttools pipeline - calibrated against Labelary. +- All outlines shifted down ~0.04 em to match CG Triumvirate's rendered + vertical placement. +- Ink spans, advances and accent anchors of individual glyphs across the + printable Latin-1 range remapped to CG Triumvirate's measured metrics. - Family and PostScript names renamed from "Roboto Condensed" to "PrintLab ZPL". diff --git a/src/assets/fonts/PrintLabZPL-Bold.ttf b/src/assets/fonts/PrintLabZPL-Bold.ttf index ada2e1b1..bbb5819d 100644 Binary files a/src/assets/fonts/PrintLabZPL-Bold.ttf and b/src/assets/fonts/PrintLabZPL-Bold.ttf differ diff --git a/src/assets/fonts/PrintLabZPL-Bold.woff2 b/src/assets/fonts/PrintLabZPL-Bold.woff2 index b6cde60c..d46a34f3 100644 Binary files a/src/assets/fonts/PrintLabZPL-Bold.woff2 and b/src/assets/fonts/PrintLabZPL-Bold.woff2 differ diff --git a/src/test/fixtureIdContract.test.ts b/src/test/fixtureIdContract.test.ts index 5eb75421..6c673b7f 100644 --- a/src/test/fixtureIdContract.test.ts +++ b/src/test/fixtureIdContract.test.ts @@ -1,4 +1,6 @@ import { describe, it, expect } from 'vitest'; +import * as fs from 'fs'; +import * as path from 'path'; import { textBoxMatchCases } from '../../tests/fixtures/textBoxMatchCases'; import { font0GlyphCoverageCases } from '../../tests/fixtures/font0GlyphCoverageCases'; @@ -29,4 +31,13 @@ describe('fixture id contract', () => { } } }); + + it('has no orphaned fixture PNGs', () => { + const dir = path.resolve(process.cwd(), 'tests/fixtures/labelary_text_default_images'); + const expected = new Set( + [...textBoxMatchCases, ...font0GlyphCoverageCases].map((tc) => `${tc.id}.png`), + ); + const orphans = fs.readdirSync(dir).filter((f) => f.endsWith('.png') && !expected.has(f)); + expect(orphans, 'unreferenced fixtures').toEqual([]); + }); }); diff --git a/src/test/font0PlacementMatch.test.ts b/src/test/font0PlacementMatch.test.ts index 6df50841..07bd6a22 100644 --- a/src/test/font0PlacementMatch.test.ts +++ b/src/test/font0PlacementMatch.test.ts @@ -31,7 +31,7 @@ const H = 50; // also guards the kerning strip ('///' collapses if GSUB/GPOS come // back); 'b' guards the global vertical shift; '5' and 'M' pin the // chain. -const GLYPHS = ['_', '<', '>', '@', '*', '$', '(', ')', '/', 'f', 'j', 'Q', 'p', 'b', '5', 'M']; +const GLYPHS = ['_', '<', '>', '@', '*', '$', '(', ')', '/', 'f', 'j', 'Q', 'p', 'b', '~', '^', '[', 'ß', '©', '°', '§', '×', '–', 'Æ', 'Ç', 'ñ', '5', 'M']; describe('Font 0 placement match: patched glyphs vs Labelary', () => { beforeAll(() => { diff --git a/tests/fixtures/charSlug.ts b/tests/fixtures/charSlug.ts index 4bcd8ed0..631bc2db 100644 --- a/tests/fixtures/charSlug.ts +++ b/tests/fixtures/charSlug.ts @@ -1,6 +1,6 @@ /** Case-insensitive filesystems would collide `A` and `a`, so * lowercase gets an `lc` prefix. */ -export const PUNCT_SLUGS: Record = { +export const CHAR_SLUGS: Record = { '-': 'minus', '.': 'dot', '=': 'eq', @@ -24,11 +24,127 @@ export const PUNCT_SLUGS: Record = { "'": 'squote', '<': 'lt', '>': 'gt', + '[': 'lbrack', + ']': 'rbrack', + '{': 'lbrace', + '}': 'rbrace', + '|': 'pipe', + '~': 'tilde', + '^': 'caret', + '\\': 'bslash', + '`': 'backtick', + '\u00a8': 'Diaeresis', + '\u00af': 'Macron', + '\u00b4': 'AcuteAccent', + '\u00b8': 'CedillaAccent', + 'ä': 'lcAE', + 'ö': 'lcOE', + 'ü': 'lcUE', + 'Ä': 'AE', + 'Ö': 'OE', + 'Ü': 'UE', + 'ß': 'ss', + 'À': 'AWithGrave', + 'Á': 'AWithAcute', + 'Â': 'AWithCircumflex', + 'Ã': 'AWithTilde', + 'Å': 'AWithRingAbove', + 'Æ': 'AeLig', + 'Ç': 'CWithCedilla', + 'È': 'EWithGrave', + 'É': 'EWithAcute', + 'Ê': 'EWithCircumflex', + 'Ë': 'EWithDiaeresis', + 'Ì': 'IWithGrave', + 'Í': 'IWithAcute', + 'Î': 'IWithCircumflex', + 'Ï': 'IWithDiaeresis', + 'Ð': 'Eth', + 'Ñ': 'NWithTilde', + 'Ò': 'OWithGrave', + 'Ó': 'OWithAcute', + 'Ô': 'OWithCircumflex', + 'Õ': 'OWithTilde', + 'Ø': 'Ostroke', + 'Ù': 'UWithGrave', + 'Ú': 'UWithAcute', + 'Û': 'UWithCircumflex', + 'Ý': 'YWithAcute', + 'Þ': 'Thorn', + 'à': 'lcAWithGrave', + 'á': 'lcAWithAcute', + 'â': 'lcAWithCircumflex', + 'ã': 'lcAWithTilde', + 'å': 'lcAWithRingAbove', + 'æ': 'lcAeLig', + 'ç': 'lcCWithCedilla', + 'è': 'lcEWithGrave', + 'é': 'lcEWithAcute', + 'ê': 'lcEWithCircumflex', + 'ë': 'lcEWithDiaeresis', + 'ì': 'lcIWithGrave', + 'í': 'lcIWithAcute', + 'î': 'lcIWithCircumflex', + 'ï': 'lcIWithDiaeresis', + 'ð': 'lcEth', + 'ñ': 'lcNWithTilde', + 'ò': 'lcOWithGrave', + 'ó': 'lcOWithAcute', + 'ô': 'lcOWithCircumflex', + 'õ': 'lcOWithTilde', + 'ø': 'lcOstroke', + 'ù': 'lcUWithGrave', + 'ú': 'lcUWithAcute', + 'û': 'lcUWithCircumflex', + 'ý': 'lcYWithAcute', + 'þ': 'lcThorn', + 'ÿ': 'lcYWithDiaeresis', + '¡': 'InvertedExclamation', + '¢': 'Cent', + '£': 'Pound', + '¤': 'Currency', + '¥': 'Yen', + '¦': 'BrokenBar', + '§': 'Section', + '©': 'Copyright', + 'ª': 'lcFeminineOrdinalIndicator', + '«': 'LeftPointingDoubleAngleQuotation', + '¬': 'Not', + '®': 'Registered', + '°': 'Degree', + '±': 'PlusMinus', + '²': 'SuperscriptTwo', + '³': 'SuperscriptThree', + 'µ': 'lcMicro', + '¶': 'Pilcrow', + '·': 'MiddleDot', + '¹': 'SuperscriptOne', + 'º': 'lcMasculineOrdinalIndicator', + '»': 'RightPointingDoubleAngleQuotation', + '¼': 'VulgarFractionOneQuarter', + '½': 'VulgarFractionOneHalf', + '¾': 'VulgarFractionThreeQuarters', + '¿': 'InvertedQuestion', + '×': 'Multiplication', + '÷': 'Division', + '€': 'Euro', + '™': 'Trade', + '•': 'Bullet', + '…': 'HorizontalEllipsis', + '–': 'EnDash', + '—': 'EmDash', + '\u201a': 'SingleLow9Quotation', + '\u2018': 'LeftSingleQuotation', + '\u2019': 'RightSingleQuotation', + '\u201e': 'DoubleLow9Quotation', + '\u201c': 'LeftDoubleQuotation', + '\u201d': 'RightDoubleQuotation', + '‰': 'PerMille', }; export function charSlug(c: string): string { - const punct = PUNCT_SLUGS[c]; - if (punct) return punct; + const slug = CHAR_SLUGS[c]; + if (slug) return slug; if (c >= 'a' && c <= 'z') return `lc${c.toUpperCase()}`; return c; } diff --git a/tests/fixtures/font0GlyphCoverageCases.ts b/tests/fixtures/font0GlyphCoverageCases.ts index a05008ac..ced66a28 100644 --- a/tests/fixtures/font0GlyphCoverageCases.ts +++ b/tests/fixtures/font0GlyphCoverageCases.ts @@ -2,14 +2,31 @@ * wired into the strict box-match test: measurement precedes gating. * Ids reuse textBoxMatchCases' scheme (see fixtureIdContract). */ import type { TextBoxMatchCase } from './textBoxMatchCases'; -import { PUNCT_SLUGS, charSlug } from './charSlug'; +import { CHAR_SLUGS, charSlug } from './charSlug'; -const ALL_CHARS = [ - ...'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - ...'abcdefghijklmnopqrstuvwxyz', - ...'0123456789', - ...Object.keys(PUNCT_SLUGS), -]; +export const UNSUPPORTED_CHARS = ['\u212e']; + +/** Residuals the calibration deliberately leaves: <=3 dots of accent + * ink on the I family and fraction/ellipsis inner spacing, plus the + * spacing accents, whose shared outlines cannot move to Zebra's + * standalone positions without breaking the accented composites. */ +export const KNOWN_DRIFT = [...'ÍÎÏÌìíîïýÿðøÙÚÛÜ«²³¹¼½¾…`\u00b4\u00b8\u2018\u2019\u201c\u201d']; + +/** Ink-less space, NBSP and soft hyphen excluded; a missing slug + * throws instead of silently dropping coverage. */ +const LATIN1_PRINTABLE: string[] = []; +for (let c = 0x21; c <= 0x7e; c++) LATIN1_PRINTABLE.push(String.fromCharCode(c)); +for (let c = 0xa1; c <= 0xff; c++) { + if (c !== 0xad) LATIN1_PRINTABLE.push(String.fromCharCode(c)); +} +const SPECIALS = [...'\u20ac\u2122\u2022\u2026\u2013\u2014\u201a\u2018\u2019\u201e\u201c\u201d\u2030']; + +const ALL_CHARS = [...LATIN1_PRINTABLE, ...SPECIALS]; +for (const c of ALL_CHARS) { + if (!/[0-9A-Za-z]/.test(c) && !(c in CHAR_SLUGS)) { + throw new Error(`no fixture slug for ${c} (U+${c.codePointAt(0)!.toString(16)})`); + } +} const SIZE = 50; diff --git a/tests/fixtures/labelary_text_default_images/h50_AE.png b/tests/fixtures/labelary_text_default_images/h50_AE.png new file mode 100644 index 00000000..956f3f11 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AE.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_AWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_AWithAcute.png new file mode 100644 index 00000000..d5b38fa1 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_AWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_AWithCircumflex.png new file mode 100644 index 00000000..e4914cb4 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_AWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_AWithGrave.png new file mode 100644 index 00000000..574c6e3f Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_AWithRingAbove.png b/tests/fixtures/labelary_text_default_images/h50_AWithRingAbove.png new file mode 100644 index 00000000..272230bc Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AWithRingAbove.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_AWithTilde.png b/tests/fixtures/labelary_text_default_images/h50_AWithTilde.png new file mode 100644 index 00000000..3170fc1b Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AWithTilde.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_AcuteAccent.png b/tests/fixtures/labelary_text_default_images/h50_AcuteAccent.png new file mode 100644 index 00000000..aaaa7c8d Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AcuteAccent.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_AeLig.png b/tests/fixtures/labelary_text_default_images/h50_AeLig.png new file mode 100644 index 00000000..21f1fd6d Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_AeLig.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_BrokenBar.png b/tests/fixtures/labelary_text_default_images/h50_BrokenBar.png new file mode 100644 index 00000000..a7a5455f Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_BrokenBar.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Bullet.png b/tests/fixtures/labelary_text_default_images/h50_Bullet.png new file mode 100644 index 00000000..9c4bc5cd Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Bullet.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_CWithCedilla.png b/tests/fixtures/labelary_text_default_images/h50_CWithCedilla.png new file mode 100644 index 00000000..46f94b61 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_CWithCedilla.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_CedillaAccent.png b/tests/fixtures/labelary_text_default_images/h50_CedillaAccent.png new file mode 100644 index 00000000..e5ceccf8 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_CedillaAccent.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Cent.png b/tests/fixtures/labelary_text_default_images/h50_Cent.png new file mode 100644 index 00000000..13dfa390 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Cent.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Copyright.png b/tests/fixtures/labelary_text_default_images/h50_Copyright.png new file mode 100644 index 00000000..1f93344a Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Copyright.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Currency.png b/tests/fixtures/labelary_text_default_images/h50_Currency.png new file mode 100644 index 00000000..0c306367 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Currency.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Degree.png b/tests/fixtures/labelary_text_default_images/h50_Degree.png new file mode 100644 index 00000000..09cb03c4 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Degree.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Diaeresis.png b/tests/fixtures/labelary_text_default_images/h50_Diaeresis.png new file mode 100644 index 00000000..9f519ae7 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Diaeresis.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Division.png b/tests/fixtures/labelary_text_default_images/h50_Division.png new file mode 100644 index 00000000..d39692c7 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Division.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_DoubleLow9Quotation.png b/tests/fixtures/labelary_text_default_images/h50_DoubleLow9Quotation.png new file mode 100644 index 00000000..bdb78a07 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_DoubleLow9Quotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_EWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_EWithAcute.png new file mode 100644 index 00000000..f8447730 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_EWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_EWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_EWithCircumflex.png new file mode 100644 index 00000000..2fb5d77c Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_EWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_EWithDiaeresis.png b/tests/fixtures/labelary_text_default_images/h50_EWithDiaeresis.png new file mode 100644 index 00000000..6225282e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_EWithDiaeresis.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_EWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_EWithGrave.png new file mode 100644 index 00000000..d7f3c922 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_EWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_EmDash.png b/tests/fixtures/labelary_text_default_images/h50_EmDash.png new file mode 100644 index 00000000..79a14bf8 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_EmDash.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_EnDash.png b/tests/fixtures/labelary_text_default_images/h50_EnDash.png new file mode 100644 index 00000000..d8d7d822 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_EnDash.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Eth.png b/tests/fixtures/labelary_text_default_images/h50_Eth.png new file mode 100644 index 00000000..0e7cb8af Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Eth.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Euro.png b/tests/fixtures/labelary_text_default_images/h50_Euro.png new file mode 100644 index 00000000..730c9e2e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Euro.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_HorizontalEllipsis.png b/tests/fixtures/labelary_text_default_images/h50_HorizontalEllipsis.png new file mode 100644 index 00000000..95f0390a Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_HorizontalEllipsis.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_IWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_IWithAcute.png new file mode 100644 index 00000000..234b7e8a Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_IWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_IWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_IWithCircumflex.png new file mode 100644 index 00000000..e42e877f Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_IWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_IWithDiaeresis.png b/tests/fixtures/labelary_text_default_images/h50_IWithDiaeresis.png new file mode 100644 index 00000000..8541f3ea Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_IWithDiaeresis.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_IWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_IWithGrave.png new file mode 100644 index 00000000..b18de4d0 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_IWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_InvertedExclamation.png b/tests/fixtures/labelary_text_default_images/h50_InvertedExclamation.png new file mode 100644 index 00000000..e17defff Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_InvertedExclamation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_InvertedQuestion.png b/tests/fixtures/labelary_text_default_images/h50_InvertedQuestion.png new file mode 100644 index 00000000..28d6d10e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_InvertedQuestion.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_LeftDoubleQuotation.png b/tests/fixtures/labelary_text_default_images/h50_LeftDoubleQuotation.png new file mode 100644 index 00000000..1f456fc0 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_LeftDoubleQuotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_LeftPointingDoubleAngleQuotation.png b/tests/fixtures/labelary_text_default_images/h50_LeftPointingDoubleAngleQuotation.png new file mode 100644 index 00000000..6b590987 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_LeftPointingDoubleAngleQuotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_LeftSingleQuotation.png b/tests/fixtures/labelary_text_default_images/h50_LeftSingleQuotation.png new file mode 100644 index 00000000..547c4a73 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_LeftSingleQuotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Macron.png b/tests/fixtures/labelary_text_default_images/h50_Macron.png new file mode 100644 index 00000000..373602f9 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Macron.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_MiddleDot.png b/tests/fixtures/labelary_text_default_images/h50_MiddleDot.png new file mode 100644 index 00000000..e54ee49b Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_MiddleDot.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Multiplication.png b/tests/fixtures/labelary_text_default_images/h50_Multiplication.png new file mode 100644 index 00000000..9d0c2ef4 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Multiplication.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_NWithTilde.png b/tests/fixtures/labelary_text_default_images/h50_NWithTilde.png new file mode 100644 index 00000000..91278558 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_NWithTilde.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Not.png b/tests/fixtures/labelary_text_default_images/h50_Not.png new file mode 100644 index 00000000..dfdc524e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Not.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_OE.png b/tests/fixtures/labelary_text_default_images/h50_OE.png new file mode 100644 index 00000000..d74dd79f Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_OE.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_OWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_OWithAcute.png new file mode 100644 index 00000000..ed057c33 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_OWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_OWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_OWithCircumflex.png new file mode 100644 index 00000000..ffac62c8 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_OWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_OWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_OWithGrave.png new file mode 100644 index 00000000..3e62560e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_OWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_OWithTilde.png b/tests/fixtures/labelary_text_default_images/h50_OWithTilde.png new file mode 100644 index 00000000..7258ae5e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_OWithTilde.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Ostroke.png b/tests/fixtures/labelary_text_default_images/h50_Ostroke.png new file mode 100644 index 00000000..c8475355 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Ostroke.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_PerMille.png b/tests/fixtures/labelary_text_default_images/h50_PerMille.png new file mode 100644 index 00000000..ee9b1912 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_PerMille.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Pilcrow.png b/tests/fixtures/labelary_text_default_images/h50_Pilcrow.png new file mode 100644 index 00000000..031c1085 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Pilcrow.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_PlusMinus.png b/tests/fixtures/labelary_text_default_images/h50_PlusMinus.png new file mode 100644 index 00000000..75e6f020 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_PlusMinus.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Pound.png b/tests/fixtures/labelary_text_default_images/h50_Pound.png new file mode 100644 index 00000000..84039577 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Pound.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Registered.png b/tests/fixtures/labelary_text_default_images/h50_Registered.png new file mode 100644 index 00000000..67f17b43 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Registered.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_RightDoubleQuotation.png b/tests/fixtures/labelary_text_default_images/h50_RightDoubleQuotation.png new file mode 100644 index 00000000..524417e2 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_RightDoubleQuotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_RightPointingDoubleAngleQuotation.png b/tests/fixtures/labelary_text_default_images/h50_RightPointingDoubleAngleQuotation.png new file mode 100644 index 00000000..7c185cc0 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_RightPointingDoubleAngleQuotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_RightSingleQuotation.png b/tests/fixtures/labelary_text_default_images/h50_RightSingleQuotation.png new file mode 100644 index 00000000..b61a6d51 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_RightSingleQuotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Section.png b/tests/fixtures/labelary_text_default_images/h50_Section.png new file mode 100644 index 00000000..821345c5 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Section.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_SingleLow9Quotation.png b/tests/fixtures/labelary_text_default_images/h50_SingleLow9Quotation.png new file mode 100644 index 00000000..3042235e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_SingleLow9Quotation.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_SuperscriptOne.png b/tests/fixtures/labelary_text_default_images/h50_SuperscriptOne.png new file mode 100644 index 00000000..e5862524 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_SuperscriptOne.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_SuperscriptThree.png b/tests/fixtures/labelary_text_default_images/h50_SuperscriptThree.png new file mode 100644 index 00000000..c483e64f Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_SuperscriptThree.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_SuperscriptTwo.png b/tests/fixtures/labelary_text_default_images/h50_SuperscriptTwo.png new file mode 100644 index 00000000..ff7c1b58 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_SuperscriptTwo.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Thorn.png b/tests/fixtures/labelary_text_default_images/h50_Thorn.png new file mode 100644 index 00000000..2c512dd4 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Thorn.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Trade.png b/tests/fixtures/labelary_text_default_images/h50_Trade.png new file mode 100644 index 00000000..360fcdca Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Trade.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_UE.png b/tests/fixtures/labelary_text_default_images/h50_UE.png new file mode 100644 index 00000000..57541b0a Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_UE.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_UWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_UWithAcute.png new file mode 100644 index 00000000..6a220443 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_UWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_UWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_UWithCircumflex.png new file mode 100644 index 00000000..079bc103 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_UWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_UWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_UWithGrave.png new file mode 100644 index 00000000..4914120d Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_UWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_VulgarFractionOneHalf.png b/tests/fixtures/labelary_text_default_images/h50_VulgarFractionOneHalf.png new file mode 100644 index 00000000..ef9d6db2 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_VulgarFractionOneHalf.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_VulgarFractionOneQuarter.png b/tests/fixtures/labelary_text_default_images/h50_VulgarFractionOneQuarter.png new file mode 100644 index 00000000..1bff230a Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_VulgarFractionOneQuarter.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_VulgarFractionThreeQuarters.png b/tests/fixtures/labelary_text_default_images/h50_VulgarFractionThreeQuarters.png new file mode 100644 index 00000000..5684f255 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_VulgarFractionThreeQuarters.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_YWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_YWithAcute.png new file mode 100644 index 00000000..ed34cadc Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_YWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_Yen.png b/tests/fixtures/labelary_text_default_images/h50_Yen.png new file mode 100644 index 00000000..19ba376b Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_Yen.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_backtick.png b/tests/fixtures/labelary_text_default_images/h50_backtick.png new file mode 100644 index 00000000..79df3fb6 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_backtick.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_bslash.png b/tests/fixtures/labelary_text_default_images/h50_bslash.png new file mode 100644 index 00000000..ce12fd13 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_bslash.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_caret.png b/tests/fixtures/labelary_text_default_images/h50_caret.png new file mode 100644 index 00000000..fcc953db Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_caret.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lbrace.png b/tests/fixtures/labelary_text_default_images/h50_lbrace.png new file mode 100644 index 00000000..72e81508 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lbrace.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lbrack.png b/tests/fixtures/labelary_text_default_images/h50_lbrack.png new file mode 100644 index 00000000..1579ff68 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lbrack.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcAE.png b/tests/fixtures/labelary_text_default_images/h50_lcAE.png new file mode 100644 index 00000000..c52dde13 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcAE.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcAWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_lcAWithAcute.png new file mode 100644 index 00000000..0dc9439b Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcAWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcAWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_lcAWithCircumflex.png new file mode 100644 index 00000000..8aedda24 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcAWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcAWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_lcAWithGrave.png new file mode 100644 index 00000000..32c36819 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcAWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcAWithRingAbove.png b/tests/fixtures/labelary_text_default_images/h50_lcAWithRingAbove.png new file mode 100644 index 00000000..905a4914 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcAWithRingAbove.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcAWithTilde.png b/tests/fixtures/labelary_text_default_images/h50_lcAWithTilde.png new file mode 100644 index 00000000..bb4492ca Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcAWithTilde.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcAeLig.png b/tests/fixtures/labelary_text_default_images/h50_lcAeLig.png new file mode 100644 index 00000000..9b516c82 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcAeLig.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcCWithCedilla.png b/tests/fixtures/labelary_text_default_images/h50_lcCWithCedilla.png new file mode 100644 index 00000000..e2fee1cb Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcCWithCedilla.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcEWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_lcEWithAcute.png new file mode 100644 index 00000000..ba296df3 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcEWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcEWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_lcEWithCircumflex.png new file mode 100644 index 00000000..5f97c5cf Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcEWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcEWithDiaeresis.png b/tests/fixtures/labelary_text_default_images/h50_lcEWithDiaeresis.png new file mode 100644 index 00000000..28ae0578 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcEWithDiaeresis.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcEWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_lcEWithGrave.png new file mode 100644 index 00000000..b117b9db Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcEWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcEth.png b/tests/fixtures/labelary_text_default_images/h50_lcEth.png new file mode 100644 index 00000000..757830d7 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcEth.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcFeminineOrdinalIndicator.png b/tests/fixtures/labelary_text_default_images/h50_lcFeminineOrdinalIndicator.png new file mode 100644 index 00000000..6fec2ccf Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcFeminineOrdinalIndicator.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcIWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_lcIWithAcute.png new file mode 100644 index 00000000..9730864f Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcIWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcIWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_lcIWithCircumflex.png new file mode 100644 index 00000000..e22b0a04 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcIWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcIWithDiaeresis.png b/tests/fixtures/labelary_text_default_images/h50_lcIWithDiaeresis.png new file mode 100644 index 00000000..00b9397a Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcIWithDiaeresis.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcIWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_lcIWithGrave.png new file mode 100644 index 00000000..d4c4287e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcIWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcMasculineOrdinalIndicator.png b/tests/fixtures/labelary_text_default_images/h50_lcMasculineOrdinalIndicator.png new file mode 100644 index 00000000..0ae097ab Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcMasculineOrdinalIndicator.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcMicro.png b/tests/fixtures/labelary_text_default_images/h50_lcMicro.png new file mode 100644 index 00000000..e1c0721d Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcMicro.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcNWithTilde.png b/tests/fixtures/labelary_text_default_images/h50_lcNWithTilde.png new file mode 100644 index 00000000..bb53411a Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcNWithTilde.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcOE.png b/tests/fixtures/labelary_text_default_images/h50_lcOE.png new file mode 100644 index 00000000..ccb1f4e9 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcOE.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcOWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_lcOWithAcute.png new file mode 100644 index 00000000..b0a8920e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcOWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcOWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_lcOWithCircumflex.png new file mode 100644 index 00000000..8dc721cb Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcOWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcOWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_lcOWithGrave.png new file mode 100644 index 00000000..58db6a38 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcOWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcOWithTilde.png b/tests/fixtures/labelary_text_default_images/h50_lcOWithTilde.png new file mode 100644 index 00000000..03aab927 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcOWithTilde.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcOstroke.png b/tests/fixtures/labelary_text_default_images/h50_lcOstroke.png new file mode 100644 index 00000000..781899ca Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcOstroke.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcThorn.png b/tests/fixtures/labelary_text_default_images/h50_lcThorn.png new file mode 100644 index 00000000..830c43e1 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcThorn.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcUE.png b/tests/fixtures/labelary_text_default_images/h50_lcUE.png new file mode 100644 index 00000000..c35607c8 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcUE.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcUWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_lcUWithAcute.png new file mode 100644 index 00000000..2d8be7a9 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcUWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcUWithCircumflex.png b/tests/fixtures/labelary_text_default_images/h50_lcUWithCircumflex.png new file mode 100644 index 00000000..162c8c0c Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcUWithCircumflex.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcUWithGrave.png b/tests/fixtures/labelary_text_default_images/h50_lcUWithGrave.png new file mode 100644 index 00000000..33717d67 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcUWithGrave.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcYWithAcute.png b/tests/fixtures/labelary_text_default_images/h50_lcYWithAcute.png new file mode 100644 index 00000000..6c956005 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcYWithAcute.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_lcYWithDiaeresis.png b/tests/fixtures/labelary_text_default_images/h50_lcYWithDiaeresis.png new file mode 100644 index 00000000..e467af5e Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_lcYWithDiaeresis.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_pipe.png b/tests/fixtures/labelary_text_default_images/h50_pipe.png new file mode 100644 index 00000000..8d491f05 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_pipe.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_rbrace.png b/tests/fixtures/labelary_text_default_images/h50_rbrace.png new file mode 100644 index 00000000..86dcc97b Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_rbrace.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_rbrack.png b/tests/fixtures/labelary_text_default_images/h50_rbrack.png new file mode 100644 index 00000000..58c8f4f5 Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_rbrack.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_ss.png b/tests/fixtures/labelary_text_default_images/h50_ss.png new file mode 100644 index 00000000..c901ce2f Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_ss.png differ diff --git a/tests/fixtures/labelary_text_default_images/h50_tilde.png b/tests/fixtures/labelary_text_default_images/h50_tilde.png new file mode 100644 index 00000000..7193d76c Binary files /dev/null and b/tests/fixtures/labelary_text_default_images/h50_tilde.png differ diff --git a/tests/fixtures/labelary_text_images/h20_n_num.png b/tests/fixtures/labelary_text_images/h20_n_num.png index 62f04335..11b3a0a7 100644 Binary files a/tests/fixtures/labelary_text_images/h20_n_num.png and b/tests/fixtures/labelary_text_images/h20_n_num.png differ diff --git a/tests/fixtures/labelary_text_images/h30_n_alpha.png b/tests/fixtures/labelary_text_images/h30_n_alpha.png index b81665cf..5cdf9bde 100644 Binary files a/tests/fixtures/labelary_text_images/h30_n_alpha.png and b/tests/fixtures/labelary_text_images/h30_n_alpha.png differ diff --git a/tests/fixtures/labelary_text_images/h30_n_date.png b/tests/fixtures/labelary_text_images/h30_n_date.png index 1ecefcfd..606f1119 100644 Binary files a/tests/fixtures/labelary_text_images/h30_n_date.png and b/tests/fixtures/labelary_text_images/h30_n_date.png differ diff --git a/tests/fixtures/labelary_text_images/h30_n_decimal.png b/tests/fixtures/labelary_text_images/h30_n_decimal.png index d2a64f6e..a08a45b1 100644 Binary files a/tests/fixtures/labelary_text_images/h30_n_decimal.png and b/tests/fixtures/labelary_text_images/h30_n_decimal.png differ diff --git a/tests/fixtures/labelary_text_images/h30_n_num.png b/tests/fixtures/labelary_text_images/h30_n_num.png index e2cd1f8b..7ea08746 100644 Binary files a/tests/fixtures/labelary_text_images/h30_n_num.png and b/tests/fixtures/labelary_text_images/h30_n_num.png differ diff --git a/tests/fixtures/labelary_text_images/h39_n_long.png b/tests/fixtures/labelary_text_images/h39_n_long.png index 13cbc802..db7d4128 100644 Binary files a/tests/fixtures/labelary_text_images/h39_n_long.png and b/tests/fixtures/labelary_text_images/h39_n_long.png differ diff --git a/tests/fixtures/labelary_text_images/h50_b_mix.png b/tests/fixtures/labelary_text_images/h50_b_mix.png index 48f19425..b82d57ca 100644 Binary files a/tests/fixtures/labelary_text_images/h50_b_mix.png and b/tests/fixtures/labelary_text_images/h50_b_mix.png differ diff --git a/tests/fixtures/labelary_text_images/h50_i_mix.png b/tests/fixtures/labelary_text_images/h50_i_mix.png index 6d603ef8..8c9349b6 100644 Binary files a/tests/fixtures/labelary_text_images/h50_i_mix.png and b/tests/fixtures/labelary_text_images/h50_i_mix.png differ diff --git a/tests/fixtures/labelary_text_images/h50_n_num.png b/tests/fixtures/labelary_text_images/h50_n_num.png index ff4726fd..4aad39f6 100644 Binary files a/tests/fixtures/labelary_text_images/h50_n_num.png and b/tests/fixtures/labelary_text_images/h50_n_num.png differ diff --git a/tests/fixtures/labelary_text_images/h50_r_mix.png b/tests/fixtures/labelary_text_images/h50_r_mix.png index cf67c655..91b69253 100644 Binary files a/tests/fixtures/labelary_text_images/h50_r_mix.png and b/tests/fixtures/labelary_text_images/h50_r_mix.png differ diff --git a/tests/fixtures/labelary_text_images/h80_n_alpha.png b/tests/fixtures/labelary_text_images/h80_n_alpha.png index 494041af..8a0ebe07 100644 Binary files a/tests/fixtures/labelary_text_images/h80_n_alpha.png and b/tests/fixtures/labelary_text_images/h80_n_alpha.png differ diff --git a/tests/fixtures/labelary_text_images/h80_n_num.png b/tests/fixtures/labelary_text_images/h80_n_num.png index 71bd0ffd..60e91fa6 100644 Binary files a/tests/fixtures/labelary_text_images/h80_n_num.png and b/tests/fixtures/labelary_text_images/h80_n_num.png differ diff --git a/tests/scripts/fetch_labelary_default_text_fixtures.ts b/tests/scripts/fetch_labelary_default_text_fixtures.ts index 42b5bf2e..55b2941c 100644 --- a/tests/scripts/fetch_labelary_default_text_fixtures.ts +++ b/tests/scripts/fetch_labelary_default_text_fixtures.ts @@ -43,19 +43,38 @@ interface FetchJob { zpl: string; } +/** ^ and ~ terminate ^FD, so such payloads go through ^FH hex escapes; + * non-ASCII needs ^CI28 (UTF-8). */ +function fdFor(text: string): { ci: string; fd: string } { + const ci = /[^\x20-\x7e]/.test(text) ? '^CI28' : ''; + if (!/[\^~\\_]/.test(text)) return { ci, fd: `^FD${text}` }; + const hex = [...text] + .map((c) => { + const b = Buffer.from(c, 'utf8'); + return /[\^~\\_]/.test(c) + ? [...b].map((x) => `_${x.toString(16).padStart(2, '0')}`).join('') + : c; + }) + .join(''); + return { ci, fd: `^FH^FD${hex}` }; +} + async function main(): Promise { fs.mkdirSync(FIXTURES_DIR, { recursive: true }); fs.mkdirSync(DEVICE_FIXTURES_DIR, { recursive: true }); const jobs: FetchJob[] = [ - ...[...textBoxMatchCases, ...font0GlyphCoverageCases].map((tc) => ({ - dir: FIXTURES_DIR, - id: tc.id, - zpl: - `^XA^FO${tc.x},${tc.y}` + - `^A0${tc.rotation},${tc.fontHeight},${tc.fontWidth || tc.fontHeight}` + - `^FD${tc.text}^FS^XZ`, - })), + ...[...textBoxMatchCases, ...font0GlyphCoverageCases].map((tc) => { + const { ci, fd } = fdFor(tc.text); + return { + dir: FIXTURES_DIR, + id: tc.id, + zpl: + `^XA${ci}^FO${tc.x},${tc.y}` + + `^A0${tc.rotation},${tc.fontHeight},${tc.fontWidth || tc.fontHeight}` + + `${fd}^FS^XZ`, + }; + }), // Device fonts: width stays 0 so the firmware derives it from the // cell matrix, matching what deviceFontMetrics does locally. ...deviceFontBoxMatchCases.map((tc) => ({ diff --git a/tests/scripts/report_font0_glyph_drift.ts b/tests/scripts/report_font0_glyph_drift.ts index 9f2a8072..d233301f 100644 --- a/tests/scripts/report_font0_glyph_drift.ts +++ b/tests/scripts/report_font0_glyph_drift.ts @@ -13,7 +13,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { PNG } from 'pngjs'; import { zplAnchorToModel } from '@zplab/core/lib/labelGeometry/textPositionTransforms'; -import { font0GlyphCoverageCases } from '../fixtures/font0GlyphCoverageCases'; +import { font0GlyphCoverageCases, KNOWN_DRIFT } from '../fixtures/font0GlyphCoverageCases'; import { darkBBox } from '../lib/darkBBox'; import { drawKonvaText } from '../lib/drawKonvaText'; import { inkCanvas } from '../lib/inkCanvas'; @@ -98,12 +98,16 @@ function main(): void { ); } + const known = new Set(KNOWN_DRIFT); const outliers = rows.filter( - (r) => Math.abs(r.dW) > 6 || Math.abs(r.dH) > 6 || Math.abs(r.dY) > 6, + (r) => + !known.has(r.char) && + (Math.abs(r.dW) > 6 || Math.abs(r.dH) > 6 || Math.abs(r.dY) > 6), ); const moderate = rows.filter( (r) => !outliers.includes(r) && + !known.has(r.char) && (Math.abs(r.dW) > 3 || Math.abs(r.dH) > 3 || Math.abs(r.dY) > 3), ); console.log(`\n${rows.length} glyphs measured at h=50 (char x3).`);