zenozeng / fonts.css

跨平台 CSS 中文字体解决方案
2.09k stars 137 forks source link

楷体和仿宋在 macOS 下无法正常工作 #36

Open zh99998 opened 7 years ago

zh99998 commented 7 years ago

如图,官网除了黑体之外,其余中文字显示全都显示为宋体

Google Chrome 60.0.3112.90 macOS Sierra 10.12.6 (16G29) 未做任何字体相关自定义设置

image

zh99998 commented 7 years ago

补充,Safari 10.1.2 (12603.3.8) 表现相同

airinghost commented 2 years ago

下划线标注的为检测到的可用字体(本地存在的字体)

你的截图中,好像没有检测到本地存在楷体和仿宋的中文字体?所以汉字才会调用到最后一项 serif

zenozeng commented 2 years ago

在 macOS Monterey 上,Chrome 可以读取到 华文楷体,但是 Safari 不行。system_profiler SPFontsDataType 输出如下:

system_profiler SPFontsDataType | grep -i kai
    Kaiti.ttc:
      Location: /System/Library/AssetsV2/com_apple_MobileAsset_Font7/4187e64a3368781656782ccb95eadb9c19796e1d.asset/AssetData/Kaiti.ttc
        STKaitiSC-Regular:
          Unique Name: Kaiti SC Regular; 17.0d1e2; 2021-06-23
        STKaitiTC-Regular:
          Unique Name: Kaiti TC Regular; 17.0d1e2; 2021-06-23
        STKaitiTC-Bold:
          Unique Name: Kaiti TC Bold; 17.0d1e2; 2021-06-23
        STKaitiTC-Black:
          Unique Name: Kaiti TC Black; 17.0d1e2; 2021-06-23
        STKaitiSC-Black:
          Unique Name: Kaiti SC Black; 17.0d1e2; 2021-06-23
        STKaitiSC-Bold:
          Unique Name: Kaiti SC Bold; 17.0d1e2; 2021-06-23
        STKaiti:
          Unique Name: STKaiti; 17.0d1e2; 2021-06-23
    Kai.ttf:
      Location: /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3dd54153251d4dcaa7dc108579f7320f5978c120.asset/AssetData/Kai.ttf
        SIL-Kai-Reg-Jian:
          Full Name: Kai Regular
          Family: Kai
          Unique Name: Kai Regular; 13.0d1e2; 2017-06-16
    Xingkai.ttc:
      Location: /System/Library/AssetsV2/com_apple_MobileAsset_Font7/bfbc9bc525d32306ff2510c82b472f2302314104.asset/AssetData/Xingkai.ttc
        STXingkaiTC-Bold:
          Unique Name: Xingkai TC Bold; 17.0d1e3; 2021-06-23
        STXingkaiTC-Light:
          Unique Name: Xingkai TC Light; 17.0d1e3; 2021-06-23
        STXingkaiSC-Light:
          Unique Name: Xingkai SC Light; 17.0d1e3; 2021-06-23
        STXingkaiSC-Bold:
          Unique Name: Xingkai SC Bold; 17.0d1e3; 2021-06-23
    BiauKai.ttf:
      Location: /System/Library/AssetsV2/com_apple_MobileAsset_Font7/3654e7b6d86b822469492a09d0fab2027254ac74.asset/AssetData/BiauKai.ttf
        DFKaiShu-SB-Estd-BF:
          Unique Name: BiauKai; 13.0d1e2; 2017-06-04
    Kailasa.ttc:
      Location: /System/Library/Fonts/Supplemental/Kailasa.ttc
        Kailasa:
          Full Name: Kailasa Regular
          Family: Kailasa
          Unique Name: Kailasa Regular; 16.0d1e1; 2020-07-06
        Kailasa-Bold:
          Full Name: Kailasa Bold
          Family: Kailasa
          Unique Name: Kailasa Bold; 16.0d1e1; 2020-07-06
zenozeng commented 2 years ago

https://stackoverflow.com/questions/52692905/font-family-display-issue-in-safari-12-on-macos-mojave