How to classify font into correct language category in Font Book (macOS 13 Ventura)?

Hi all,

In macOS 13 Ventura, the Font Book application has a new feature that it can sort fonts by different language in sidebar, such like English, Japanese, Traditional Chinese, Korean and so on. (It’s not Smart Collection / Collections which can be customized, it’s a built-in feature.)

The built-in fonts have be classified into correct language, however, the user installed font doesn’t, even it is a Japanese / Chinese font, the Font Book still classify it into English category.

I’m confuse about the mechanism. In macOS 12 Monterey, there’s a “LanguageAlphabets.plist” file in Font Book package to recognize the language of font by matching the glyphs whether the font file contains or not.

However, in macOS 13 Ventura, the Font Book application has been redesigned and i can’t find the *.plist file anymore. I think Font Book in these two version have different definition of “launguage”. :smiling_face_with_tear: Here’s my question,

Does anyone know the mechanism of language category in Ventura’s new Font Book application?
Can I set it in Glyphs metric or font info?
or I need to compile the *.ttx (XML format of depackaged *.ttf and *.otf) files?

Thank you very much.

The old .plist has been removed because FontBook now uses the CLDR and CoreText APIs to examine the cmap to identify languages supported.

This is augmented by any data found in the font’s ‘meta’ table. Metadata Table - TrueType Reference Manual - Apple Developer

If a font is designed to support a language, but has a few characters missing from the CLDR exemplar string, then add a ’slng’ tag in the meta table for each missing supported language

e.g. the CLDR exemplar string for Chinese is about 2000 characters. CLDR Survey Tool
If any of these are missing, CLDR won’t report Chinese as one of the supported languages.

Your choice is then to either add the missing characters to automatically classify as Chinese via the CLDR ‘Main Letters’ string; or to add a ‘slng’ tag to the ‘meta’ table to patch the CLDR result.

From the Apple tech spec: “… for Chinese fonts, “Hans” and “Hant” should normally be used to distinguish between Simplified and Traditional orthographies rather than the more generic declaration “Hani”. Region-specific variations such as “Hant-HK” can also be declared. In some cases, it may be appropriate to describe a font capability (but probably not design target) using the generic declaration “Hani” (Han (Hanzi, Kanji, Hanja)).”

I got some useful information via your reference.
Thank you very much!

Hi! I too am having the same problem. Where can I either edit the CLDR “Main Letters” string, or add the “meta” table with an “slng” tag? Thanks much!

I manually create meta.ttx before compiling from ttx:

  • an example of meta.ttx, you can add the supported language code referened here.
<?xml version="1.0" encoding="UTF-8"?>
<ttFont ttLibVersion="4.43">

  <meta>
    <text tag="dlng">
      en-Latn, en, en-US, en-UK, Hant, Latn, zh-Hant
    </text>
    <text tag="slng">
      en-Latn, en, en-US, en-UK, Hant, Latn, zh-Hant
    </text>
  </meta>

</ttFont>
  • Them, add meta.ttx info in your your_font.ttx for compiling:
<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="OTTO" ttLibVersion="4.43">
... // omitted
  <meta src="meta.ttx"/>
</ttFont>

Reference:

1 Like

You can’t edit the CLDR data. That is build into macOS. You could use the tool linked above to find the missing characters and add them to your font.
You an add a meta Table custom parameter to your font or instances settings.

Can you walk me through adding a meta Table custom parameter to either my font or instance settings? I’ve scoured the available custom parameters, and I don’t see that one.

Also, what is the CDLR exemplar string? I’m making a Thai font. Are the necessary glyphs those listed in the “Main Letters” section of the Thai Alphabetic Information or are there others that should be included as well?

Thanks!

.ttx is new to me, but I assume it involves converting from OpenType to XML as described here? Thanks! I’m a novice.

Before you deal with the meta table and such. Did you check the unicode and codepage ranges? Usually you should not add them manually as Glyphs can calculate them on export. So maybe you have an old, outdated unicode range parameter?

What version of Glyphs do you have?

Thanks for the tip about unicode and codepage ranges. I don’t see any outdated ones.

Ah, that’s what it is: I’m running an older version of Glyphs. I’ll try updating to the latest and add the meta Table. Thanks!

If you want to keep the old version for compatibility, you can – you can have multiple versions installed at the same time, just rename the existing version before you update.

That’s good to know. I’ll do that, thanks!