unoplatform/uno · error · Exception
No supported cmap subtable found (Platform 3/Encoding 1 or 1
Error message
No supported cmap subtable found (Platform 3/Encoding 1 or 10, or Platform 0)
What it means
The cmap table exists but none of its encoding records matched the selector: Platform 3 (Windows) Encoding 1 (Unicode BMP) or 10 (Unicode full), or Platform 0 (Unicode). If selectedSubtableOffset stays 0 after scanning all subtable records, the tool throws. Fonts with only legacy platform encodings (e.g. Platform 1 Macintosh only) or malformed encoding records hit this.
Source
Thrown at src/FontFallbackPreprocessor/Program.cs:317
if (platformId == 3 && (encodingId == 1 || encodingId == 10))
{
if (selectedPlatformId != 3 || (encodingId == 10 && selectedEncodingId == 1))
{
selectedSubtableOffset = offset;
selectedPlatformId = platformId;
selectedEncodingId = encodingId;
}
}
else if (platformId == 0 && selectedPlatformId != 3)
{
selectedSubtableOffset = offset;
selectedPlatformId = platformId;
selectedEncodingId = encodingId;
}
}
if (selectedSubtableOffset == 0)
throw new Exception("No supported cmap subtable found (Platform 3/Encoding 1 or 10, or Platform 0)");
// 4. Parse subtable
// The offset in the encoding record is relative to the beginning of the cmap table.
long subtablePosition = cmapOffset + selectedSubtableOffset;
fs.Seek(subtablePosition, SeekOrigin.Begin);
ushort format = ReadUInt16Be(reader);
if (format == 4)
{
return ReadFormat4(reader);
}
else if (format == 12)
{
return ReadFormat12(reader);
}
else
{
throw new Exception($"cmap format {format} not supported (only 4 and 12)");View on GitHub (pinned to 0418340488)
Solutions
- Replace the font with a Unicode-encoded version (Noto fonts ship Platform 3/Encoding 1 subtables).
- Extend the selector to accept Macintosh Platform 1 as a last-resort fallback if Unicode coverage is acceptable.
- Skip fonts with no usable Unicode cmap when generating fallback maps.
Defensive patterns
Strategy: validation
Validate before calling
// After scanning subtables, fall back to Macintosh Platform 1 if no Unicode subtable
if (selectedSubtableOffset == 0 && macSubtableOffset != 0) { selectedSubtableOffset = macSubtableOffset; } Try / catch
try { ReadCmap(path); }
catch (Exception ex) when (ex.Message.Contains("No supported cmap subtable")) { Log.Warn($"{path} has no Unicode cmap; skipping."); } Prevention
- Prefer fonts with Platform 3/Encoding 1 cmap subtables (Noto fonts).
- Skip legacy Mac-only-platform fonts in fallback-map generation.
- Extend the selector with a Macintosh fallback only if Unicode coverage is acceptable.
When it happens
Trigger: A cmap table whose encoding records are exclusively legacy (Macintosh/Platform 1, or custom platform IDs), or whose Platform-3/0 records have offsets of 0, leaving no selectable Unicode subtable.
Common situations: Parsing older legacy fonts (early Mac TTFs, symbol fonts) that predate Unicode cmap subtables; an OTF with only format-0/2 subtables on Macintosh platform; a font whose Windows Unicode subtable was stripped.
Related errors
AI-assisted analysis of unoplatform/uno@0418340488 (2026-08-13).
Data as JSON: /api/errors/f1bb474470be2324.
Report an issue: GitHub.