Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Mac cannot find fonts Kaiti SC #540

Closed
wenxingguo opened this issue Sep 17, 2020 · 13 comments
Closed

New Mac cannot find fonts Kaiti SC #540

wenxingguo opened this issue Sep 17, 2020 · 13 comments

Comments

@wenxingguo
Copy link

wenxingguo commented Sep 17, 2020

Full log

This is XeTeX, Version 3.14159265-2.6-0.999992 (MiKTeX 20.6.29)
entering extended mode
(test.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-09-03>
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/base/
article.cls"
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class

("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/base/
size10.clo"))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
ctex.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/l3ker
nel/expl3.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/l3bac
kend/l3backend-xetex.def"))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/l3pac
kages/xparse/xparse.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/l3pac
kages/xparse/xparse-generic.tex"))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/l3pac
kages/l3keys2e/l3keys2e.sty")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
ctexhook.sty")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
ctexpatch.sty")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/base/
fix-cm.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/base/
ts1enc.def"))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ms/ev
erysel.sty")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
config/ctexopts.cfg")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
engine/ctex-engine-xetex.def"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/xelatex/xec
jk/xeCJK.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/l3pac
kages/xtemplate/xtemplate.sty")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/fonts
pec/fontspec.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/fonts
pec/fontspec-xetex.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/base/
fontenc.sty")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/fonts
pec/fontspec.cfg")))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/xelatex/xec
jk/xeCJK.cfg")))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/zhnum
ber/zhnumber.sty"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/zhnum
ber/zhnumber-utf8.cfg"))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
scheme/ctex-scheme-chinese.def"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
config/ctex-name-utf8.cfg"))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/tools
/indentfirst.sty")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
ctex-c5size.clo")
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
fontset/ctex-fontset-mac.def"
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
fontset/ctex-fontset-macnew.def"Running miktex-makemf...
Running miktex-hbf2gf...

Package fontspec Warning: Font "Songti SC Light" does not contain requested
(fontspec) Script "CJK".

! Package fontspec Error: The font "Kaiti SC" cannot be found.

For immediate help type H .
...

l.99 }

? Running miktex-makemf...
Running miktex-hbf2gf...

! Package fontspec Error: The font "Kaiti SC" cannot be found.

For immediate help type H .
...

l.99 }

? Running miktex-makemf...
Running miktex-hbf2gf...

! Package fontspec Error: The font "Kaiti SC Bold" cannot be found.

For immediate help type H .
...

l.99 }

? Running miktex-makemf...
Running miktex-hbf2gf...

! Package fontspec Error: The font "Kaiti SC Bold" cannot be found.

For immediate help type H .
...

l.99 }

? )))
("/Users/wood/Library/Application Support/MiKTeX/texmfs/install/tex/latex/ctex/
config/ctex.cfg") (test.aux) ABD: EverySelectfont initializing macros [1]
(test.aux) )
Output written on test.pdf (1 page).
Transcript written on test.log.

@muzimuzhi
Copy link
Contributor

Apart from the standard output, please provide a minimal working example (MWE), and the versions of both your macOS and installed ctex bundle.

@wenxingguo
Copy link
Author

test.tex
%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{ctex}
\title{first tex article}
\author{guowenxing}
\begin{document}
\maketitle
你好
\end{document}
%%%%%%%%%%%%%%%%%
macOS 10.15.6
MikTex with ctex 2.5.4

@wenxingguo
Copy link
Author

font Kaiti.ttc can be found in /System/Library/AssetsV2/com_apple_MobileAsset_Font6/XXXXXXXXXXXXXX.asset/AssetData/Kaiti.ttc

@Liam0205
Copy link
Contributor

This is a known issue. The system detecting feature of CTeX fails in MikTeX, on both macOS & Linux.

Specifying fontset = mac solves this problem.

@wenxingguo
Copy link
Author

wenxingguo commented Sep 17, 2020

It really does not work, but I solve this problem by moving the Kaiti.ttc to /Library/Fonts. It seems that the fc-list program cannot find fonts in non-standard path.

@muzimuzhi
Copy link
Contributor

@wenxingguo
Does running sudo tlmgr conf texmf OSFONTDIR /System/Library/AssetsV2/com_apple_MobileAsset_Font6 help?

@wenxingguo
Copy link
Author

@wenxingguo
Does running sudo tlmgr conf texmf OSFONTDIR /System/Library/AssetsV2/com_apple_MobileAsset_Font6 help?

Miktex manages packages through mpm, not tlmgr.

@Liam0205
Copy link
Contributor

It really does not work, but I solve this problem by moving the Kaiti.ttc to /Library/Fonts. It seems that the fc-list program cannot find fonts in non-standard path.

Well, specifying fontset = mac also relays on the broken mechanism, sorry for that.

Try fontset = macnew instead.

@btstream
Copy link

btstream commented Mar 31, 2021

@wenxingguo
Does running sudo tlmgr conf texmf OSFONTDIR /System/Library/AssetsV2/com_apple_MobileAsset_Font6 help?

Miktex manages packages through mpm, not tlmgr.

I use this method to make it work.

Edit ~/Library/Application Support/MiKTeX/texmfs/config/fontconfig/config/localfonts2.conf file, add /System/Library/AssetsV2/com_apple_MobileAsset_Font6 to it.

@gaotongsh
Copy link

I use this method to make it work.

Edit /Users/lzc/Library/Application Support/MiKTeX/texmfs/config/fontconfig/config/localfonts2.conf file, add /System/Library/AssetsV2/com_apple_MobileAsset_Font6 to it.

This also did the trick for me. I think we should add this to an FAQ or wiki page for all those MikTeX users on Mac.

@talengu
Copy link

talengu commented Dec 4, 2021

macOS 12.0.1 Kaiti.ttc may in this path

/System/Library/AssetsV2/com_apple_MobileAsset_Font7

/Users/lzc/Library/Application Support/MiKTeX/texmfs/config/fontconfig/config/localfonts2.conf

<?xml version="1.0"?>
<fontconfig>
<dir>/System/Library/AssetsV2/com_apple_MobileAsset_Font7</dir>
</fontconfig>

Then work OK 😸
Thanks!

@reisenmiao
Copy link

open the Pages once. It will install Kaiti into you font library.

@rami3l
Copy link

rami3l commented Nov 15, 2022

@talengu This post seems to have found a better path for such fonts that seems to be consistent for longer:

<?xml version="1.0"?>
<fontconfig>
<dir>/System/Library/PrivateFrameworks/FontServices.framework/Resources/Fonts</dir>
</fontconfig>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants