Combine .ttf fonts

A .ttf font file can only include 65535 glyf. However, the number of Chinese characters is more than hundred thousand. Therefore, it is impossible to include all Chinese characters in one .ttf file. In Windows system, there is a way to connect different .ttf files into one font.

Here is an example.

Let's assume a .ttf file can only include 10 glyf. If a font want to include "a" to "z", it could be formatted like the following.

examplepart1.ttf -> "a" to "j"

examplepart2.ttf -> "k" to "t"

examplepart3.ttf -> "u" to "z"

Then, create a file called "SurrogateFallback.reg"

The content is the following.

REGEDIT4


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack]

"SURROGATE"=dword:00000002


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows

NT\CurrentVersion\LanguagePack\SurrogateFallback]

"Plane1"="examplepart1"

"Plane2"="examplepart2"


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows

NT\CurrentVersion\LanguagePack\SurrogateFallback\examplepart3]

"Plane1"="examplepart1"

"Plane2"="examplepart2"


After that, examplepart3.ttf becomes a font including "a" to "z."

I wonder if MacOS offer similar solution for this kind of font issue.

If one knows the solution, please tell me. Thank you!


Posted on Apr 12, 2021 4:03 PM

12 replies

Apr 12, 2021 5:13 PM in response to Community User

You can't exceed the 16 bit limit of 65,535 glyphs.


What you may be referring to for "combined" fonts are .ttc , TrueType Collection fonts. The Mac also has these. It's just package file of single .ttc fonts inside the one container.


But as Tom noted, you still can't actually have that many glyphs in one font. The OS will find the glyph you need. I would imagine that's at least partly why all of these similarly named fonts are in the System folder:


ヒラギノ角ゴシック W0.ttc

ヒラギノ角ゴシック W1.ttc

ヒラギノ角ゴシック W2.ttc

ヒラギノ角ゴシック W3.ttc

ヒラギノ角ゴシック W4.ttc

ヒラギノ角ゴシック W5.ttc

ヒラギノ角ゴシック W6.ttc

ヒラギノ角ゴシック W7.ttc

ヒラギノ角ゴシック W8.ttc

ヒラギノ角ゴシック W9.ttc

Apr 12, 2021 9:28 PM in response to Community User

DiXing wrote:

I am using a dictionary software to look up some ancient Chinese books. I need a font that can show all these characters.


What software is that exactly? I've played with Chinese stuff on Mac's for many years and never come across anything that required all characters be inside a single font. Everything has worked fine with separate fonts if necessary to cover special areas. One example which people often add to their system is Babelstone Han.


https://babelstone.co.uk/Fonts/Han.html

Apr 12, 2021 5:01 PM in response to Community User

I have never heard of anyone doing something like that on a Mac.


Could you explain why you think it would be necessary? Reading and writing Chinese does not depend on having everything in one font. When you want to input or display any character, MacOS and the app will normally look for it in all the fonts on the computer. If you find some character does not display, you just download and install a font that does have it

Apr 13, 2021 5:35 PM in response to Community User

DiXing wrote:
In your test, it seems perfect but the top column. It still good.

Yes, for some reason MacOS does not apply the right encoding to the name of the dictionary file.

to make sure, you just install the .ttfs and do nothing else, right?

That is correct.

also, your Mac is not operate in Chinese but other language, right?

Right, my Mac is running in English. If it were running in Chinese, I think that wrongly encoded file name might be fixed.

Apr 13, 2021 11:57 AM in response to Tom Gewecke

Thank you for your reply.

To make us on the same page, I need to tell you the situation I face.

1. Now, I am a Windows user, and currently I plan to transfer to MacOS. Due to the need of the font is quite essential to my daily usage, I need to make sure if MacOS can provide me with similar user experience as Windows.


2. An users of the font reported that it did not work when s/he used MacOS. That is why I try to find out solution beforehand.


3. If you are willing to help me test the actual using experience of the font combining the dictionary, here are the related websites.

MDict -> The dictionary app itself.

https://www.mdict.cn/wp/?lang=en


The content of Dictionary(need to be installed in MDict)

https://fgwang.blogspot.com/2018/12/blog-post_10.html


The font

https://fgwang.blogspot.com/2021/03/blog-post.html


You may test the character "瑜".



Thank you for taking your time looking into my question.

Apr 13, 2021 4:36 PM in response to Tom Gewecke

In your test, it seems perfect but the top column. It still good.

To make sure, you just install the .ttfs and do nothing else, right?

Also, your Mac is not operate in Chinese but other language, right?

Thank you again for testing!

Apr 13, 2021 4:10 PM in response to Tom Gewecke

Thank you for your time. This potential issue has bothered me a lot. It is one of the main reasons stopping me switching to MacOS. From your test result, it seems that it won't be an issue anymore. I really don't know how to thank you for you kindly help. Again, thank you so much!


For the font in my link, it is the most complete set of Chinese characters I can find. In the introduction of how the creator came out with the font, he mentioned that the font you provide, Babelstone Han, was also be referenced. Furthermore, the creator is still updating the font, I believe one day it may include more than two hundred thousand characters!

Apr 12, 2021 7:45 PM in response to Tom Gewecke

Thank you for your reply.

The scenario of my usage is that I am using a dictionary software to look up some ancient Chinese books. I need a font that can show all these characters.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Combine .ttf fonts

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.