diff options
Diffstat (limited to '')
-rw-r--r-- | README.md | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -9,3 +9,22 @@ website elsewhere. For keeping this repo light, the font unifont_jp-13.0.03.ttf is not commited. The official website is: http://unifoundry.com/unifont/index.html + +*BUT* the font is overweight (11MB!) for reduce it one can use the following +command to generate the ascii list of used char (don't forget to update it +if needed). The unicode list aswell the unicode list is commited for simplicity. + +``` +python -c 'import sys; print("\n".join(["u+%04x" % (ord(c)) for c in sys.stdin.read()]))' < letters-in-unicode.txt > letters-in-ascii.txt +``` + +Then you need to generated the lightened font based on the official you need +to install [fonttools](https://github.com/fonttools/fonttools) and use the +following command: + +``` +pyftsubset unifont_jp-13.0.03.ttf --output-file=unifont_jp-13.0.03_custom.ttf --unicodes-file=letters-in-ascii.txt +``` + +The file `unifont_jp-13.0.03_custom.ttf` *IS* the font name hardcoded in the +page style! |