aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-11-21 19:07:47 +0100
committerneodarz <neodarz@neodarz.net>2020-11-21 19:07:47 +0100
commit2dbd18c1e85defb0eec444303016c13b120bb9e4 (patch)
tree7493933af602ccf0a93a568be665acbf5e48a06f /README.md
parent20ff154971954ff760ef5d22aa7fe1af5b891515 (diff)
downloadalicorn.network-2dbd18c1e85defb0eec444303016c13b120bb9e4.tar.xz
alicorn.network-2dbd18c1e85defb0eec444303016c13b120bb9e4.zip
Make the font more lighter
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index e466991..e8f8b72 100644
--- a/README.md
+++ b/README.md
@@ -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!