Last active
January 2, 2026 08:30
-
-
Save h-kitagawa/13c757fd7b551fd475391c47395ffee6 to your computer and use it in GitHub Desktop.
LuaTeX で RTT+Identity-V を使う実験
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
| \input luaotfload.sty | |
| \input luatexbase.sty | |
| \pdfvariable compresslevel =0 | |
| \pdfvariable objcompresslevel =0 | |
| \directlua{% | |
| local mine = {} | |
| local round = tex.round | |
| local otfl_fdr=luatexbase.remove_from_callback('define_font', 'luaotfload.define_font') | |
| function mine.font_callback(name, size, id) | |
| local res=otfl_fdr(name,size,id) | |
| local r_size = (size<0) and (-655.36*size) or size | |
| if name:find("HaranoAjiMincho.Regular") then | |
| res.fullname = res.fullname .. ' (Identity-V)' %追加する文字列は何でもいい | |
| res.identity='vertical' | |
| res.writingmode='vertical' | |
| res.direction=8 | |
| end | |
| return res | |
| end | |
| luatexbase.add_to_callback('define_font',mine.font_callback,"mine.font_callback", 1) | |
| } | |
| \font\HMV=HaranoAjiMincho-Regular.otf:-kern at 10bp | |
| \def\folio{} | |
| \hbox dir RTT{% | |
| \vrule height 0bp depth 5bp width 2bp% | |
| \vrule height 5bp depth 0pt width 2bp% | |
| \HMV あいうえお | |
| \vrule height 0bp depth 5bp width 2bp% | |
| \vrule height 5bp depth 0pt width 2bp} | |
| \bye | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment