I've noticed that the font file PingFang.ttc is no longer in /System/Library/Fonts/LanguageSupport/ on iOS 18. And I use CoreText APIs get the new font file, which is int the FontServices.framework and named PingFangUI.ttc.
But it doesn't seem to be a regular TrueType font collection. It can't be parsed correctly by stb_truetype. I copied this file to my mac, and it can't be opened by Font.app either, which says it doesn't contain installable fonts. It also can’t pass font validation (Font.app → File → Verify File), saying “System validation failed”, I don't know what that means.
So I tried to read the binary of that file. I've noticed that the ‘CFF ‘ table is missing in the new font file, and there is a new table 'hvgl'. But I can't find any documentation for this table. Maybe this is a new format. And what confuses me is that the TTC header of the new font file has not changed, same as the old PingFang.ttc file, with a ‘ttcf’ tag, and majorVersion is 2 minorVersion is 0.
Please tell me how to parse the new format, so maybe I can modify stb_truetype to get our app to work.
Thanks!
Post
Replies
Boosts
Views
Activity
I'm an iOS developer, and I've been testing our app in iOS 18.0 Beta. I noticed that there's a problem with the font rendering, and after troubleshooting, I've found out that it's caused by the removal of the PingFang.ttc font in 18.0.
I would like to ask the reason for removing this font file and which font should be used to display Chinese in the future?
My test device is an iPhone 11 Pro and the system version is iOS 18.0 (22A5297). I have also tested Beta 1 and it has the same issue.
In previous versions of the system, the PingFang font is located in this directory /System/Library/Fonts/LanguageSupport/PingFang.ttc. But in iOS 18.0, the font file in this directory has become Kohinoor.ttc, and I've tested that this font can't display Chinese either.
I traversed the following system font directories and could not find the PingFang.ttc font file.
/System/Library/Fonts/AppFonts
/System/Library/Fonts/Core
/System/Library/Fonts/CoreAddition
/System/Library/Fonts/CoreUI
/System/Library/Fonts/LanguageSupport
/System/Library/Fonts/UnicodeSupport
/System/Library/Fonts/Watch
Looking for answers, thanks for the help!