Last active
September 8, 2024 09:54
-
-
Save dohyunkim/0eafd909852665bf15904f0f550ffe58 to your computer and use it in GitHub Desktop.
Don't Embed Fonts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{kotex} | |
\newfontfeature{NoEmbedding}{noembedding} | |
\directlua{ | |
local function noembed (tfmdata) | |
local properties = tfmdata.properties | |
if not properties.filename then | |
properties.filename = tfmdata.filename | |
end | |
fonts.constructors.dontembed[properties.filename] = 1 | |
end | |
fonts.constructors.features.otf.register { | |
name = "noembedding", | |
manipulators = { | |
node = noembed, | |
plug = noembed, | |
}, | |
} | |
} | |
\setmainhangulfont{Noto Serif CJK KR}[NoEmbedding,Renderer=HarfBuzz] | |
\setsanshangulfont{Noto Sans CJK KR}[NoEmbedding] | |
\begin{document} | |
가나다. Test. | |
\sffamily | |
가나다. Test. | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment