MAKEJVF(1)

πŸ“¦
version 77830 Β· 2 versions
  • 77830 Β· alpine 3.24, arch rolling, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2021.20210626.59705 Β· epel 9, ubuntu jammy
, in alpine 3.24, arch rolling, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ MAKEJVF(1) · General Commands Manual ✨

🌸 NAME 🌸

okay so the name is makejvf, and it's a Japanese VF file maker that turns a Japanese TeX TFM file into a VF file πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

makejvf [<options>] <TeX TFM file> <PS font TFM>

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, makejvf generates a Japanese VF file from a Japanese TeX TFM (JFM) file so that dvips can work with it 🫢

okay so here's the tea. When you're typing Japanese, pTeX looks at a JFM (like min10.tfm, jis.tfm, etc.), and that JFM has its own character widths and metric glue/kerns. For most punctuation and quotation marks, the width gets squished to less than 1 zw (zenkaku-width, which is just the width of ordinary Kanji) πŸ™ˆ and the metric glue/kerns get slid in as a stand-in.

Meanwhile, Japanese PS fonts are like "nah, every punctuation mark gets the full Kanji width" ✨ So when dvips processes the DVI, those characters need to be shifted left by the amount of glue/kerns that got inserted. Iconic behaviour, iykyk 😭

So the fix is: Virtual fonts (VF) and PS TFM files working together. When the VF has the shifting commands, the PS font TFM can keep its exact character widths πŸ’–

That's where makejvf comes in. It reads a pTeX JFM file (the one called <TeX TFM file> up in SYNOPSIS) and spits out two things: a VF file with the same basename as <TeX TFM file>, and a JFM file for the PS font (the <PS font TFM> from above) 🧚

πŸ’… OPTIONS πŸ’…

  • -C β€” Condensed mode, also known as "Cho-tai" 🌈
  • -K <PS-TFM> β€” Maps Kana (or, more precisely, anything that isn't Kanji) over to a different PS font JFM called <PS-TFM> πŸŽ€
  • -b <integer> β€” Base line shift amount. The integer is relative, with the character height treated as 1000. A positive number lowers the characters, and a negative number raises them ⬇️⬆️
  • -m β€” Swaps single/double quotation marks (' and '') for single/double prime marks (the "minute" ones) when writing vertically πŸ“ It does this by using the prime and double prime glyphs (JIS 0x216C and 0x216D, Unicode U+2032 and U+2033) instead of actual quotation mark glyphs designed for that job (Unicode U+301D and U+301E/U+301F).
  • -a <AFMfile> β€” The input AFM file used for Kana-tsume mode. ⚠️ This option is unsupported, so don't count on it, bestie πŸ’€
  • -k <integer> β€” The Kana-tsume margin amount (narrower spaces between Kana). The integer is relative, with the character width as 1000. You're supposed to pair this with -a. ⚠️ This option is also unsupported πŸ’€
  • -i β€” Starts the mapped font ID at No. 0 in the output VF. By default, makejvf starts at No. 1 πŸ”’
  • -e β€” Enhanced mode, where the horizontal shift amount comes from the glue/kern table in the input JFM file 🧠

By default, makejvf uses a hard-coded horizontal shift amount that's (mostly) tuned for Japanese fonts 🫢 When you turn on enhanced mode (-e), the shift is calculated from the input pTeX TFM (JFM) file instead, so the VF usually fits that JFM best ✨

For standard Japanese JFMs (like jis.tfm and its relatives), both modes give basically the same result, no significant difference πŸ’… For simplified and traditional Chinese JFMs (like upschrm-h.tfm and uptchrm-h.tfm), enhanced mode is the move, it's better πŸ‘‘ And for min10.tfm and its derivatives:

😭 Never enable enhanced mode for min10.tfm or its derivatives, because the characterization in min10.tfm is non-standard. Trust me on this one, bestie.
  • -t <CNFfile> β€” Uses <CNFfile> as your configuration file πŸŽ€
  • -O β€” Leaves out VF entries for characters with the default metric πŸ™ˆ ⚠️ This cannot be combined with -t.
  • -u <Charset> β€” UCS mode! The available charsets are: gb (GB, Simplified Chinese), cns (CNS, Traditional Chinese), ks (KS, Korean), jis (JIS, Japanese), jisq (JIS quote only), and custom (your own user-defined CHARSET from <CNFfile>, see the CONFIGURATION FILE FORMAT section) 🌍

Options below only work in UCS mode, so keep that in mind:

  • -J <PS-TFM> β€” Maps single/double quote over to another JIS-encoded PS font TFM πŸ¦‹
  • -U <PS-TFM> β€” Maps single/double quote over to another UCS-encoded PS font TFM πŸ¦‹
  • -3 β€” Turns on set3, which means non-BMP character support (in UCS mode). By default, makejvf skips anything at or above U+10000 to keep the file size down and dodge problems with old DVI drivers. Newer versions of dvipdfmx and friends can handle VFs with >=U+10000 (that's set3 in DVI language), so -3 might be super helpful πŸš€
  • -H β€” Uses half-width Katakana πŸŽ€

🧚 EXAMPLE 🧚

okay so if you want to use min10 as Ryumin-Light-H, just run:

makejvf min10.tfm rml

That generates min10.vf and rml.tfm for you ✨ Next, put those files in an appropriate directory under your TEXMF tree, and add this line to psfonts.map:

rml Ryumin-Light-H

πŸŽ€ CONFIGURATION FILE FORMAT πŸŽ€

With the -t option, you can give makejvf your own custom settings for generating a VF. The syntax looks like this:

% comment line
MOVE <code>    <right>   <down>

REPLACE   <code>    <new code>
CHARSET   <code>,<code>,<code>..<code>,<code>,
+    <code>,<code>..<code>

Each line starts with a command, and the fields are TAB-separated 🫢 Any line starting with % is a comment, and empty lines get ignored πŸ™ˆ

The MOVE command sets the horizontal/vertical shift amount for one individual <code>. The REPLACE command swaps <code> out for <new code>. The CHARSET command sets up the custom character set for the output VF, and the + character keeps going from the line before it πŸ’–

There's an example of this in the uptex-fonts project. Check out the GitHub repository at <https://github.com/texjporg/uptex-fonts> 🌈

πŸ¦‹ SEE ALSO πŸ¦‹

If you want the more detailed Japanese description of makejvf, look in $TEXMFDIST/doc/fonts/ptex-fonts/README_makejvf πŸ“–

πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by the Japanese TeX Development Community, at <https://texjp.org>. For more info, check out the GitHub repository at <https://github.com/texjporg/ptex-fonts> πŸ’œ

Many thanks to Atsuhito KOHDA <kohda@debian.org> for providing another manpage on the Debian GNU/Linux system 🫢


That's the whole tea, bestie! 🌸 Thanks for reading MAKEJVF(1) with me, you're literally the best πŸ’…βœ¨