This article continuously updates the new Apple fonts extracted from macOS Catalina and later versions, including HK, SC and TC extracted from TTC font set. The font has been modified so it can be used directly in Windows.

Update record

  • 2021-10-26Updated macOS Monterey font version17.d1e2
  • 2021-07-09Updated macOS Big Sur font version16.d4e0
  • 2020-05-01Update macOS Catalina font version15.0 d2e5

Extraction method

The following extraction method is applicable to Catalina and is now invalid.

Extract the source font

According to the preset font list on apple’s official website, Catalina is used as the file source. The preset Font version is 15.0D2E5.

Use pingfang.ttc from /System/Library/Fonts in Catalina.

TTC unpack

Unpack Pingfang. TTC into an OpenType Font file with the Python script otc2otf.py for OpenType:

python otc2otf.py -w PingFang.ttc
Copy the code

Note that otc2otf.py needs to be run under Python 2. Unpacking will extract PSNameUndefined. Otf together, since it is not useful for porting can be deleted. The final result is the following file:

Migration method

The font obtained by unpacking does not have CMap of Windows platform, so it cannot be directly installed and used in Windows. In the original DP1 release, you only needed to unpack the TTC file to work properly under Windows, but later DP2 releases cannot. The root reason is that DP1 fonts have the following four CMap subtables:

<cmap_for­mat_4 plat­formID="0" pla­tEn­cID="3" lan­guage="0">
  <cmap_for­mat_12
    plat­formID="0"
    pla­tEn­cID="4"
    for­mat="12"
    re­served="0"
    length="185584"
    lan­guage="0"
    nGroups="15464"
  >
    <cmap_for­mat_4 plat­formID="3" pla­tEn­cID="1" lan­guage="0">
      <cmap_for­mat_12
        plat­formID="3"
        pla­tEn­cID="10"
        for­mat="12"
        re­served="0"
        length="185584"
        lan­guage="0"
        nGroups="15464"
      ></cmap_for­mat_12>
    </cmap_for­mat_4>
  </cmap_for­mat_12>
</cmap_for­mat_4>
Copy the code

After DP2, there are two CMap subtables:

<cmap_for­mat_4 plat­formID="0" pla­tEn­cID="3" lan­guage="0">
  <cmap_for­mat_12
    plat­formID="0"
    pla­tEn­cID="4"
    for­mat="12"
    re­served="0"
    length="189520"
    lan­guage="0"
    nGroups="15792"
  ></cmap_for­mat_12>
</cmap_for­mat_4>
Copy the code

Windows considers it an invalid font file due to the lack of a subtable with platformID 3. The way to change font files after DP2 to Windows compatible font files is to add the corresponding table.

However, after processing the font of 15.0D2E5 extracted from Catalina, it was found that the CMap table of this version had a complete set of 4 sub-tables, but Windows still could not recognize it normally, so this migration method has become invalid.

To do this, you need to install FontTools for font name table editing. For details about how to install and use FontTools on other platforms, see the Regular word as an example.

Install FontTools and extract the name table:

sudo apt install fonttools
ttx -t name PingFangSC-Regular.otf
Copy the code

Edit the generated pingfangsc-regular. TTX to remove these fields:

<namerecord nameID="0" platformID="3" platEncID="1" langID="0x404">
  Copyright © 2015 DynaComware. All rights reserved.
</namerecord>
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x404">PingFang SC Regular; 15.0 d2e5; 2019-06-14</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x404">15.0 d2e5</namerecord>
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x404">PingFangSC-Regular</namerecord>
<namerecord nameID="Seven" platformID="3" platEncID="1" langID="0x404">
  PingFang is a trademark of Apple Inc.
</namerecord>
<namerecord nameID="10" platformID="3" platEncID="1" langID="0x404">
  Designed by DynaComware &amp; Apple.
</namerecord>
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x404">http://dynacw.com</namerecord>
Copy the code

Repackage fonts:

ttx -b -m PingFangSC-Regular.otf PingFangSC-Regular.ttx
Copy the code

The obtained Pingfangsc-Regular #1. otF can be installed and used in various systems normally, and other files can be analogy.

Font download

  • DSRBLOG

The files shared here are for technical exchange only. Please delete them within 24 hours after downloading. I am not responsible for any legal disputes arising from commercial use and commercial conflicts of interest.

reference

  • Adobe Font Development Kit
  • CrossFont
  • CMap table modification technical guide
  • A Few Notes on Using OS X 10.11’s New Chinese Font