P4 Software P4 Software / BarcoderX English

Add these docs to Claude

Ask Claude questions about these docs. Claude reads the published pages and links you back to them. Copy this address:

https://docs.p4software.cloud/mcp

In claude.ai or Claude Desktop: open Settings, then Connectors, choose Add custom connector and paste the address.

In Claude Code, run:

claude mcp add --transport http docs https://docs.p4software.cloud/mcp

Font support

Font support

Applies to: BarcoderX Basic and Ultimate

Status: Built, not yet released. The font reader exists and is tested, but nothing is released yet and there is nothing to download. It opens and checks a font file. Drawing text with the font, kerning, ligatures and embedding a font in a PDF are not built yet. This page says what the reader does today.

Before BarcoderX uses a font, it opens the font file and checks it. This page explains what BarcoderX reads, which files it accepts, which it rejects and why, and the limits it applies. How fonts reach BarcoderX, and the rules for uploading them, are in Text, fonts and pictures.

BarcoderX reads fonts with its own code. It never asks the operating system to open a font.

What it reads

A font file is a set of named tables. BarcoderX reads these:

TableWhat it holdsWhat BarcoderX does with it
head, hhea, maxpThe font's size grid, its overall spacing and the number of glyphsReads the values and checks that they agree with each other
hmtxHow wide each glyph isReads the width of each glyph
cmapWhich glyph draws which characterReads a Unicode character map, in format 4 or 12
loca, glyfWhere each glyph's shape is, and the shape itself, as straight lines and curvesReads every shape and checks it
OS/2Extra spacing values and the font's embedding permissionReads the header and the embedding permission
name, postThe font's name, and information for printingChecks that the table exists and has a valid start; does not read its content yet

A glyph is the drawn shape of one character. A shape is stored as an outline, a closed line made of straight pieces and curves. Some glyphs are built from other glyphs, such as an accented letter built from a plain letter and an accent. These composite glyphs work, including parts that are scaled, stretched or turned.

What it accepts

  • A single font file with TrueType outlines: a .ttf file, or an .otf file whose outlines are TrueType.
  • A font that has all the tables in the list above.
  • A variable font. BarcoderX uses only its default style and tells you with an information message.

What it rejects, and why

Every rejection comes with a diagnostic code that says what is wrong and what to do. The list is in Diagnostic codes.

WhatWhy
A file that does not look like a fontThe start of the file is not a known font signature.
Fonts with CFF outlines (some .otf files)Not supported yet. Use a font with TrueType outlines.
Font collections (.ttc)Upload one font file at a time.
Web fonts (.woff and .woff2)Upload the .ttf or .otf file instead.
Fonts with color, SVG or bitmap glyphs, such as emoji fontsOnly outline glyphs are supported.
A font without a required tableThe font cannot be used without it.
A damaged, cut-off or inconsistent fileTables that overrun the file, overlap, repeat or are not aligned; counts and sizes that disagree; shapes that are broken; a character map that points at a glyph that does not exist.
A file with wrong checksumsA checksum is a number that detects a damaged or changed file. By default BarcoderX checks the checksum of every table and of the whole file.
A glyph that is built from itself, nests too deeply or has too many partsThese are signs of a damaged or hostile file.
A glyph that places one part by matching two pointsThis way of placing parts is rare and is not supported yet.
A font that needs too much checking workThe checking has a work budget so that one font cannot keep the computer busy for long.

Three cases do not reject a font. BarcoderX uses the font anyway and tells you with a message: a warning if the tables are listed out of order or the character map lacks its closing entry, and an information message if the font is a variable font.

Limits

LimitValue
Size of a font file10 MB
Glyphs in one font65,535
Points in one glyph10,000
Nesting of composite glyphs8 levels
Parts that one glyph expands to256
Tables in one font128
Checking work for one font50 million units

The limits are checked before the memory they protect is allocated. In BarcoderX's automatic tests, more than a million damaged variations of a font file are fed to the reader on every run, and none of them may crash it or make it use too much memory or time.

What is not built yet

  • Kerning (pair spacing), ligatures and the other OpenType layout features.
  • Shaping text for scripts that need it.
  • Cutting a font down to the characters used, for embedding in a PDF.
  • Reading the font's name and style information. The embedding permission is read but not acted on yet.
  • Fonts with CFF outlines.

BarcoderX is a product of P4 Software.

Was this page helpful?