Skip to content

Instantly share code, notes, and snippets.

@exkuretrol
Created January 26, 2023 17:32
Show Gist options
  • Save exkuretrol/316c6bbcc617a7eae3fa7d947dcd9446 to your computer and use it in GitHub Desktop.
Save exkuretrol/316c6bbcc617a7eae3fa7d947dcd9446 to your computer and use it in GitHub Desktop.
適用於 mac ctex 的繁體中文字體庫。目前只有 XeLaTeX 可以編譯。
\ProvidesExplFile{ctex-fontset-macnew-tc.def}{\ExplFileDate}{0.0.1}{\ExplFileDescription}
\ctex_fontset_case:nnnn
{ \ctex_fontset_error:n { mac } }
{ }
{ }
{
\setCJKmainfont { Songti~TC }
[
BoldFont = Songti~TC~Bold,
ItalicFont = Kaiti~TC,
BoldItalicFont = Kaiti~TC~Bold
]
\setCJKsansfont { PingFang~TC }
\setCJKmonofont { Lantinghei~TC }
\setCJKfamilyfont { zhsong } { Songti~TC~Regular } [ BoldFont = Songti~TC~Bold ]
\setCJKfamilyfont { zhhei } { Heiti~TC~Light } [ BoldFont = Heiti~TC~Medium ]
\setCJKfamilyfont { zhpf } { PingFang~TC }
\setCJKfamilyfont { zhkai } { Kaiti~TC } [ BoldFont = Kaiti~TC~Bold ]
\setCJKfamilyfont { zhli } { Baoli~TC }
\setCJKfamilyfont { zhyuan } { Yuanti~TC~Light } [ BoldFont = Yuanti~SC~Regular ]
}
\NewDocumentCommand \song { } { \CJKfamily { zhsong } }
\NewDocumentCommand \hei { } { \CJKfamily { zhhei } }
\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } }
\NewDocumentCommand \kai { } { \CJKfamily { zhkai } }
\NewDocumentCommand \lishu { } { \CJKfamily { zhli } }
\NewDocumentCommand \yuan { } { \CJKfamily { zhyuan } }
\NewDocumentCommand \pingfang { } { \CJKfamily { zhpf } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment