Files
kichikuou 3318bebf6c fonts: Replace mincho font with IPA Mincho
Switch the bundled mincho font from a Source Han Serif JP subset to a
subset of IPA Mincho, which has monospace ASCII glyphs.

IPA Mincho's hhea ascent/descent already match its OS/2 typo metrics, so
adjust_metrics.py is no longer needed. However, IPA Mincho is distributed
under the IPA Font License v1.0, under which a subset is a "Derived
Program"; Article 3.1(4) forbids the derived font's name from containing
the licensed program's name ("IPA"). Add rename_font.py to rewrite the
name table accordingly, and replace licenses/mincho.txt with the IPA Font
License.
2026-06-23 17:40:22 +09:00

18 lines
588 B
CMake

install(FILES
MTLc3m.ttf
mincho.ttf
DESTINATION share/xsystem35/fonts)
# pyftsubset is included in fonttools.
find_program(PYFTSUBSET_FOUND pyftsubset)
if (PYFTSUBSET_FOUND)
add_custom_target(fonts
COMMAND uchars > uchars.txt
COMMAND wget -O ipam.zip https://moji.or.jp/wp-content/ipafont/IPAfont/ipam00303.zip
COMMAND unzip -o -j ipam.zip ipam00303/ipam.ttf
COMMAND pyftsubset ipam.ttf --text-file=uchars.txt --output-file=subset.ttf
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/rename_font.py subset.ttf ${CMAKE_CURRENT_SOURCE_DIR}/mincho.ttf
)
endif()