Skip to content

Instantly share code, notes, and snippets.

@dohyunkim
Last active September 8, 2024 09:54
Show Gist options
  • Save dohyunkim/0eafd909852665bf15904f0f550ffe58 to your computer and use it in GitHub Desktop.
Save dohyunkim/0eafd909852665bf15904f0f550ffe58 to your computer and use it in GitHub Desktop.
Don't Embed Fonts
\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