fontTools TTX is a command-line utility that converts supported TrueType and OpenType font tables into readable XML and can compile TTX data back into a font. For translation and localization teams, this makes TTX valuable when a font looks correct in a design file but fails after publishing: the character map, language-related layout tables or family metadata may differ between versions. This guide explains how to inspect font tables without damaging the approved source and how to interpret the evidence.
A reliable TTX investigation starts with a licensed copy of the exact font that failed in a specific application. Use ttx -l to list tables, inspect selected tables such as cmap, name, GSUB, GPOS and GDEF, and compare the results with the last known good build. XML is a human-readable diagnostic representation, not a proof that every shaping engine will render the language correctly. Preserve the original, avoid casual edits to compiled fonts and validate every round trip before shipping anything.
Readers looking for TTX fontTools examples, OpenType cmap troubleshooting, GSUB and GPOS inspection, font naming, Unicode coverage and multilingual font quality checks will find practical commands, table explanations, production failure scenarios, source-documentation links, and a release checklist. The method applies to websites, apps, publishing workflows, education materials and language archives worldwide. It focuses on actual reader consequences instead of assuming that an impressive-looking XML file is a completed localization.
Quick answer: inspect the smallest useful set of tables
Copy the failing font into a diagnostic directory. List its table inventory with ttx -l, dump only tables relevant to the observed problem, compare against a trusted previous version and verify the same test string in the actual application. Protect source files, document licence permissions and avoid publishing an unreviewed XML round-trip as a repaired font.
- Use cmap to investigate Unicode character mapping.
- Use name to investigate family and style identity.
- Use GSUB and GPOS to investigate substitution and positioning hypotheses.
- Use metrics and variation tables for relevant layout changes.
- Confirm findings in the actual rendering environment.
Basic commands with controlled inputs
These illustrative commands follow fontTools’ documented CLI patterns. Use an approved working copy of the source font and inspect generated files before any further operation.
ttx -h
ttx -l myfont.ttf
ttx -t cmap -t name myfont.ttf
ttx -t GSUB -t GPOS -t GDEF myfont.ttf
# For a complete diagnostic dump:
ttx myfont.ttfDo not pass a partial TTX export into an uncontrolled compilation step expecting all original tables to remain present. TTX offers merge and compilation options whose exact behavior should be checked in current help. Record output names, working directories and tool versions. Most importantly, decide which user-visible defect each exported table is intended to help explain.
What TTX can and cannot tell you
A font has several layers of meaning. A Unicode character must map to glyph data; a shaping engine may substitute or position glyphs; then a renderer paints the result. TTX exposes many tables that participate in this sequence. It is especially useful for comparing two font binaries that appear to come from the same family yet behave differently in a localized product. Instead of guessing, a developer can locate absent cmap entries, changed family names or missing layout features.
TTX is not itself a translation engine, professional type designer or end-to-end rendering validator. A table dump can show that a feature exists without proving that a particular app activates it. Likewise, a font can contain a Unicode mapping but still be inappropriate for a language because the letterforms or marks are wrong. Use XML findings to create focused questions and controlled tests; do not treat them as an automatic certificate of linguistic accuracy.
The smallest safe command sequence
The fontTools documentation describes ttx -l for listing table information and ttx -t followed by a table name for selective dumping. Run ttx -h in the installed environment to confirm supported switches. A useful diagnostic session starts by listing tables in the approved source and the failing font, then exporting only relevant tables into a clean directory. Use descriptive filenames, timestamps and source hashes. Keep the original outside any folder where compiled output might overwrite it.
The common ttx command can decompile a supported binary font into an XML representation, and TTX input can be compiled back into font data. Do not recompile a partial dump and call the result a complete original. The -t and -x options are for selecting included or excluded tables, not for guaranteeing a safe modified release. Work from copies and review output destinations before execution. XML text may expose font metadata; protect proprietary files as carefully as the binaries.
Read the table list as an investigation map
OpenType and TrueType files contain a table directory rather than a single undifferentiated block of letter outlines. A table listing helps investigators decide where to look next. If the symptom is a missing Unicode code point, start with cmap. If the application unexpectedly identifies the family, inspect name. If an Indic conjunct or Arabic joining behavior differs from the approved font, examine GSUB and GPOS availability while remembering that actual shaping must be tested elsewhere.
Other tables can matter for metrics, variable font axes, vertical writing, color glyphs and licensing information. A table absent from one version is not automatically a defect; not every font uses every feature. Ask whether that absence explains the observed symptom. Compare table inventory across exact binaries and source versions, and record which tests were run. This turns font troubleshooting into a narrow inquiry instead of a fishing expedition through hundreds of lines of XML.
Unicode cmap: a mapped character is not a correct word
The cmap table connects character codes to glyph identifiers in the font. For a multilingual product, it is a logical first place to verify that expected code points can be requested. A missing cmap mapping can explain a visible tofu box or fallback for an individual character. But cmap alone does not establish that combining sequences, contextual forms or whole words will be correct. The relationship between Unicode input and final glyph sequence can involve substitutions that are not obvious from a one-to-one mapping.
Read code points carefully. Some characters have visually similar forms but distinct meanings, while combining marks may be represented differently from precomposed characters. Do not manually replace characters in translations to satisfy a flawed font mapping. Instead, confirm the text content, inspect the mappings and choose an appropriate corrected font or fallback. Test the original Unicode strings after any fix; preserving the information in the words matters more than suppressing an error symbol.
The name table and family identity
The name table stores strings associated with family names, styles and related metadata, often with platform and language distinctions. Incorrect or inconsistent names can make two files from the same intended family appear separate to an application or be selected in an unexpected order. When an app shows the wrong style only for one locale, compare the actual font files and the style declarations before assuming that the translation caused the problem.
Do not casually translate or rewrite internal identifiers. Some names are intended for human-facing displays; others participate in software matching, uniqueness or compatibility. A localized display name is not the same decision as changing a PostScript name or family grouping. Where a font is distributed under a licence, follow its naming requirements, including any reserved-name provisions. TTX helps observe the current state, but controlled build tooling should usually own the final metadata change.
GSUB substitutions and contextual scripts
GSUB holds glyph-substitution information used by OpenType shaping systems. Depending on font and script, it can support ligatures, contextual alternatives, localized forms and other transformations. If a word fails to form the appropriate glyph sequence in one build, a GSUB comparison may reveal missing or changed features. This does not mean that the table is the only possible cause: application shaping settings, script identification and fallback choices also determine which rules are used.
Investigate with complete examples. For Arabic, examine connected forms within words; for Indic writing systems, include clusters and vowel positions; for Latin typography, compare any optional ligatures without confusing stylistic preference with language necessity. A raw XML list is easy to misread without knowing the font’s design. Partner with a font engineer and fluent language reviewer to decide whether a table change corresponds to a real defect.
GPOS positioning and combining marks
GPOS stores positioning information that can affect mark placement, pair adjustment and other visual relationships between glyphs. When a word contains accents or vowel marks, a font may possess all necessary character mappings and still render poorly because mark attachment or positioning is ineffective. TTX can reveal the presence of GPOS data and help compare lookup structures between versions. It cannot show the full rendered result the way a screenshot or shaping trace can.
Measure the actual symptom. Are accents floating too far away, colliding with another letter, clipping in the UI or changing under bold styling? Compare matched font sizes and environments, then relate those observations to GPOS changes. Avoid fixing every collision by adding CSS letter spacing: such a global change may damage unrelated scripts and still not correct mark attachment. The appropriate fix depends on whether the font, the rendering environment or the layout constraint is responsible.
GDEF and glyph classes
GDEF provides information about glyph classes and other data used in OpenType layout workflows. It can be relevant when mark handling or lookup behavior changes, although its interpretation requires understanding other tables and the shaping engine. A developer comparing two XML dumps should not declare a defect because a class number differs. The question is whether the structure and lookups together satisfy the font’s intended script behavior in supported applications.
Use a small reproducible string and a matched pair of binaries. If a problematic combining mark works in the original build but fails in the changed one, record the rendered result and the table differences. That gives the font engineer a meaningful starting point. Without controlled input, a GDEF investigation can become an exercise in interpreting differences that have no observable consequence for readers.
Metrics tables and unexpected line breaks
Font metrics affect the space occupied by text, even when every character is correctly shaped. Tables such as hhea, hmtx, OS/2 and related data contribute to different aspects of font measurements and application behavior. When localized headings clip vertically or a translated button expands unexpectedly, inspect computed CSS and font selection as well as the metrics of the files being compared. A design can break because a substitution font has different advances or ascender values.
Do not ‘repair’ a language by forcing a fixed box to hide overflow. Translators often produce longer legitimate text, and scripts differ in vertical mark requirements. TTX can explain whether a new build changed a metric, but the interface still needs responsive layouts and content tests. Record expected width and height tolerances for critical UI components, then validate on actual devices. Good typography and flexible layout work together.
Variable fonts: axis records are not visual guarantees
Variable fonts may contain tables such as fvar, avar, STAT and variation-specific outline or metric data. TTX can help reveal whether a variable font has axes and named instances that match how a site declares weights or widths. A common problem arises when CSS requests an axis range not actually supported by the file or a style declaration maps to an unexpected instance. The browser may choose a fallback or synthesize a style.
Compare the variation metadata to the documented font family, then test representative instances at real reading sizes. A name in STAT does not certify that a glyph looks right at every coordinate. Some letterforms and marks need particular attention at extreme weights or widths. Treat TTX as an inspection view and fontmake or specialist font-authoring tools as separate build surfaces, with human review between them.
Color and pictographic glyphs
Some fonts use COLR, CPAL, CBDT, CBLC, sbix or SVG-related structures for color glyphs and pictographic content. A localization might rely on symbols, icons or emoji-like text in a navigation bar. If an asset changes from a color form to a monochrome fallback, table inventory can reveal whether relevant data survived a build. The visual result still depends on the application’s support for that color-font technology.
Avoid treating emoji as interchangeable with translated instructions. A pictogram can have different cultural associations or screen-reader behavior, and color alone should not carry essential meaning. Test accessible text labels, contrast and fallback glyphs. A decoded font that retains all tables does not prove that the browser or assistive technology exposes the content as intended. The final acceptance test belongs at the application level.
Vertical writing and punctuation
East Asian text may be arranged horizontally or vertically, and vertical layout can involve different glyph forms and metric choices. A font’s available tables and features can matter when a publishing product uses vertical Japanese headings or complex mixed-direction content. TTX is a way to inspect relevant font data, but a plain table list cannot predict correct punctuation orientation, line progression or ruby annotation.
Prepare sample passages that contain punctuation, numerals, Latin abbreviations and named entities. Test the actual CSS writing mode or typesetting engine rather than reading the XML alone. If the rendering changes after a font update, compare the binaries and layout settings together. A narrowly focused font repair should not create a new problem in horizontal content or screen-reader order.
XML round-trips: preserve meaning, not a myth of sameness
Decompiling and recompiling a font can be useful for research, controlled modifications and investigating tool behavior. Yet binary files may change for reasons unrelated to a visible language defect. Table ordering, checksums, timestamps, formatting and implementation choices can make byte-for-byte comparisons misleading. For a meaningful round-trip test, inspect structure, glyph access, feature behavior and visual rendering alongside any binary checksums.
Do not use TTX as a casual text editor for arbitrary table surgery on a production font. Complex relationships between tables can break even when the XML is syntactically well formed. Keep change logs, perform structural validation and use a supported authoring pipeline. If the source is proprietary, an XML dump may disclose data that must remain confidential. Protect artifacts, restrict access and share only the minimum evidence needed for troubleshooting.
Comparison strategy for two font versions
When version A works and version B fails, compare them systematically. Start with the exact filenames, checksums, table inventories and language sample used to reproduce the defect. Compare cmap and name if the symptom is missing characters or wrong face selection; compare GSUB, GPOS and GDEF if glyph sequence or positioning changed. Review metrics if layout changes without a visible character error. Do not examine every table equally when the defect points strongly to one part of the pipeline.
Changes can be legitimate. A font designer might remove an obsolete glyph, correct a name, or change a substitution for another language. The meaningful question is whether the current build meets the approved supported-language specification. Attach screenshots and a smallest reproducing string to the table-difference report. This makes it easier to distinguish a harmless binary change from a regression that affects people reading instructions, names or educational material.
Integrating TTX in a repeatable review
Automated scripts can list tables or extract selected XML for comparison, but the pipeline needs clear error handling and controlled output names. If a command fails or produces an unexpectedly empty file, stop the process and report it rather than continuing with stale output. Maintain a small corpus of reference strings, expected glyph coverage and validated binaries so investigators can link technical changes to actual reading outcomes.
Keep XML diffs as evidence, not as an excuse to publish unreviewed fonts. A sound pipeline separates authoring, compilation, sanitation, browser delivery and human language review. TTX belongs in the inspection and controlled repair stages. If the organization lacks font expertise, its best first step may be to send a focused defect report to the font vendor or maintainers with reproduction data, rather than experimenting with low-level tables in production.
Release governance for multilingual publishers
A release should identify the approved font source, licence, supported scripts, style variants, build tool versions, validation results, page samples and actual deployment URLs. For each locale, record which person or team reviewed visible output. Translators should not be expected to interpret all OpenType internals; font specialists should not be asked to guarantee that a translation communicates the right meaning. Their responsibilities meet in the acceptance test.
Preserve a rollback path and avoid silently overwriting live assets with changed tables. Versioned filenames and change logs help distinguish genuine font updates from cached CSS or incomplete deployments. If a new language is added, revisit the font coverage contract. A release that was correct for three locales may be inadequate for a fourth. Good documentation allows the team to expand responsibly instead of solving the same missing-character problem repeatedly.
When TTX is the wrong first tool
Not every typography problem begins inside a font file. A page may display replacement characters because text was decoded using the wrong encoding. The browser might load a fallback family due to a network failure. The translation could contain a typo, or CSS might clip a perfectly rendered word. In those cases, a table dump adds little until the more direct problems are resolved. Check the source string, encoding, computed font, downloaded asset and browser console first.
Reach for TTX when the evidence indicates a font-internal question: a suspected mapping, missing table, changed font name, layout-feature regression or structural difference between builds. Keep a concrete hypothesis and a minimal reproduction. This sequence protects engineers from spending hours deciphering XML while users are still receiving a 404 response for the actual webfont.
Explain the finding to readers and decision-makers
A technical diagnosis should produce an understandable action. Instead of saying ‘GSUB changed,’ explain that a particular script’s word formation differs after a font update, identify affected locales and describe the proposed fix. Include screenshots or accessible text examples without reproducing personal data. Distinguish confirmed failures from possibilities. An audit trail should state what is known, what remains uncertain and who is responsible for the next decision.
For editors, the key questions are whether the published words remain correct, which pages require review and whether the font can be rolled back safely. For engineers, attach checksums, table excerpts, tool versions and reproduction steps. For product owners, explain the user impact and release risk. That is the practical value of TTX: it turns an obscure binary question into evidence that helps a team protect multilingual communication.
Worked investigations across languages and publishing formats
The situations below show how to interpret table evidence without overlooking errors in source text, network delivery, application layout or script shaping. Each example presents a plausible diagnostic path, not an assertion that a particular font or language is inherently defective.
1. Vietnamese accents differ between releases
A healthcare portal begins showing badly positioned tone marks after a font upgrade. The text itself is correct and the computed CSS family is unchanged. The investigator compares GPOS-related data and font versions with TTX, rather than changing every accent in the translation. A matched screenshot of both builds helps determine whether the difference is a positioning regression or a rendering setting.
Use complete names and medical terms, including combinations the page actually contains. Verify the input Unicode strings, compare the approved and candidate font at the same size, and ask a Vietnamese reviewer whether the result distinguishes the intended words. If the table change explains the defect, repair the font through its normal build source. Retest in the browser before accepting a new binary.
2. Arabic words break in a mobile receipt
An Arabic checkout receipt shows disconnected letter forms only after a new font package is deployed. TTX can inspect GSUB availability and compare binaries, but it cannot show whether the receipt’s renderer activates the relevant shaping rules. A font table that exists on disk may not be used when the receipt generator substitutes another family.
Capture the precise font path used for both web preview and generated receipt, then test the same sentence across them. Inspect script and direction handling. If the receipt lacks shaping support, replace the export path or rendering configuration rather than rewriting Arabic into separated characters. Keep the legal receipt content unchanged and review punctuation and numerals with the text.
3. A school website shows blank mathematics symbols
A teacher’s lesson uses ordinary prose plus mathematical operators. After a font optimization, some formulas show fallback boxes while headings remain correct. A cmap comparison can identify absent mapped characters, but the missing glyphs may also belong to a separate mathematics font that was never loaded. The right diagnosis requires identifying the actual family used around the equation.
Test a representative formula, subscripts and explanatory sentence, not just a single plus sign. Keep mathematics markup and semantics accessible. If the optimized font was subset without math characters, restore the required mappings or correct the fallback. Never substitute a lookalike symbol that changes the mathematical meaning merely to make the typography appear complete.
4. Japanese vertical titles change punctuation
A magazine exports horizontal and vertical Japanese layouts from the same content system. A newly supplied font looks fine on ordinary pages but punctuation orientation changes in vertical headings. TTX may reveal relevant layout-data differences, yet writing-mode support and engine behavior must also be checked. The problem cannot be solved by assuming that one Latin-style screenshot certifies the entire font.
Compare real headings containing brackets, long-vowel marks, numerals and Latin abbreviations. Verify the same font and style was selected in both modes. If a font feature is missing, contact the font maintainer with the exact strings and table evidence. If the layout engine is at fault, correct that path. Ask an experienced Japanese typesetter to approve the visual result.
5. An app switches between two font families
A multilingual app unintentionally bundles fonts with conflicting family identifiers. The design system requests one family, while the platform resolves another after installation. TTX inspection of the name table can reveal mismatched internal labels. However, changing those identifiers without coordination could create a second compatibility problem or violate reserved-font-name conditions.
Document the file names, internal names and style mappings across each platform. Establish one approved naming contract with the font vendor or build team. Rebuild and test fresh installations, upgraded installations and fallback scenarios. The visible success criterion is that the intended typeface and style appear consistently for supported languages, not merely that two XML strings now match.
6. A Khmer learning app loses a cluster
A literacy application adds material containing clusters that were absent from earlier examples. The new font file maps the characters but the cluster shapes incorrectly in one runtime. A simple cmap check gives false reassurance because substitution and positioning may still matter. Investigate GSUB and GPOS along with the application’s shaping support.
Use teacher-reviewed full words and sentences. Capture the failing app version and compare against a supported reference environment. Keep examples orthographically correct rather than splitting sequences to suit a broken renderer. If the platform lacks needed shaping capabilities, describe that incompatibility explicitly and provide a validated alternative for learners.
7. A variable font has a confusing bold setting
The CSS declares a broad weight range but the installed font’s variable metadata does not match the design assumption. Bold headings render inconsistently across browsers. TTX can inspect fvar and STAT data, while browser computed styles indicate which face is selected. The evidence should be interpreted together rather than blaming the translation’s longer headings.
Test actual weight coordinates on representative Latin, Greek and Cyrillic strings. Inspect legibility of thin marks and small counters, especially at mobile text sizes. Declare supported ranges accurately and consider separate approved static faces if necessary. Ensure the site’s bold emphasis remains perceptible for accessibility rather than merely different in file metadata.
8. A minority-language orthography uses unusual combining marks
An archive depends on a small set of carefully chosen combining marks. The characters appear in Unicode text but an upgraded font positions them poorly. A cmap entry demonstrates only mapping, not correct mark behavior. TTX can help find GPOS differences and support a conversation with the font author.
Build minimal pairs selected by community linguists and photograph or capture both builds under identical settings. Preserve the underlying Unicode sequence so search and copying remain correct. Do not replace meaningful marks with private-use substitutes without a comprehensive preservation strategy. Archive the approved source and review report with the relevant community.
9. Emoji appear monochrome in a service dashboard
A dashboard uses a few colored symbols as visual cues. After conversion, the symbols appear monochrome in one environment, prompting an assumption that translated UI strings are broken. A table inventory may reveal whether color-glyph data differs between binaries, but engine support and fallback selection also influence the result.
Test the symbols with text labels so meaning is not color-dependent. Compare the actual font resource and rendering technology in each environment. If the product requires particular symbols, validate them under supported platforms and provide accessible alternatives. Avoid turning decorative pictographs into the sole communication channel for important actions.
10. The PDF and website show different line breaks
A bilingual legal article appears correct on the website but wraps differently in an exported PDF. TTX can compare the embedded or selected fonts’ metrics, names and layout features, yet the two renderers may use different defaults and font substitution policies. A browser-only acceptance test misses the PDF risk.
Identify the actual font embedded in the PDF and the browser-loaded resource. Compare original content, sizes and layout constraints. Correct the rendering pipeline or use a validated font consistently, while allowing legitimate language expansion. Review headings, footnotes and signatures where line breaks affect legal interpretation or readability.
11. A remote stylesheet loads the wrong version
A fresh build contains the correct font but users still see old glyphs. TTX dumps of the local source show no relevant defect because the browser downloads a stale resource from a CDN. The investigation goes astray if the team does not verify the live file checksum before comparing font internals.
Use the network panel to capture the returned file and compare it with the approved asset. Fix cache invalidation and style references, then run the same localized sample again. Only begin table-level debugging if the actual delivered binary still shows a reproducible difference. This ordering saves time and avoids unnecessary edits to a correct font.
12. An old scanner archive has unusual characters
A historical document is transcribed with uncommon letters, punctuation and mathematical signs. The team considers changing a font’s cmap to force the characters to render, but the archive’s text encoding and source transcription may also contain errors. Editing the font without understanding the text risks obscuring source evidence.
Confirm the characters against the primary material, preserve scholarly transcription and use a font with appropriate coverage. TTX can compare maps of candidate fonts, but the written source needs independent verification. Store the image, transcription and font-version record together so later readers can distinguish a transcription decision from a display defect.
13. A multilingual signage system clips text
A transport kiosk has translated labels whose diacritics extend beyond the allotted text box. The font is structurally valid, but changing metrics or substituting a fallback can alter line height. TTX helps compare hhea, OS/2 and advance data while the layout team examines fixed-height widget constraints.
Test large text, accessibility scaling and the longest supported translations. Fix clipping by allowing appropriate vertical space and selecting metrics that match the intended font. Do not delete accents or compress spacing so aggressively that the label becomes hard to read. A passing table inspection never overrides the visible evidence of missing strokes.
Frequently asked questions
What is TTX?
TTX is the XML-oriented inspection and compilation utility distributed with fontTools. It exposes many OpenType and TrueType tables in a human-readable form; it does not translate or render complete multilingual words.
How do I list a font’s tables?
The documented command is ttx -l myfont.ttf for brief table information. Check local help and use a copy of the actual file you are investigating.
Can I export only cmap and name?
Yes. TTX supports repeated -t table selectors, such as ttx -t cmap -t name myfont.ttf. Inspect the output location and keep source files protected.
Does cmap prove a language is supported?
No. A mapped code point is a necessary piece of evidence, but complete words may require shaping, positioning, appropriate letterforms and a compatible application.
How are GSUB and GPOS different?
GSUB describes glyph substitutions; GPOS handles positioning adjustments. Their effects depend on the font, selected features, shaping engine and input text.
Can I edit the XML and recompile?
TTX can compile its XML representation, but arbitrary edits can damage a font or violate licence restrictions. Prefer approved source builds and validate results structurally and visually.
Why do two fonts with similar names differ?
They may contain different table contents, version metadata, subsets, variation settings or build histories. Compare exact binary checksums and controlled outputs.
Should a round-trip preserve identical bytes?
Not as a universal acceptance requirement. Evaluate meaningful font behavior and structural validity; binary differences may arise from compilation details.
Which tables matter for line height?
Metrics and application behavior both matter. Tables such as hhea, hmtx and OS/2 are useful leads, but CSS, font selection and rendering engines must also be tested.
What should translators review?
They should review complete words and sentences, proper names, punctuation, marks, line breaks and accessibility outcomes. They need not personally interpret the entire XML table structure.
Documentation and further reading
Official fontTools TTX documentation
fontTools source and project information
Related: fontTools pyftsubset and Unicode coverage
Related: FontForge OpenType authoring
Related: OpenType Sanitizer validation
From XML evidence to a readable published page
TTX is most useful when the team has already defined a precise font question. It can reveal the structure behind multilingual text but cannot replace readers, typographers or actual application testing. Preserve the original, follow a controlled comparison, distinguish mapping from shaping, and communicate findings in ordinary language. The purpose of font-table inspection is not to produce more XML; it is to protect the names, instructions, stories and ideas carried by translated text.
