summaryrefslogtreecommitdiff
path: root/gen.sh
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-11-02 09:36:34 +0100
committerLars-Dominik Braun <lars@6xq.net>2019-11-02 09:36:34 +0100
commitf1e969402ea4a1dadba6c4c72028dc76cc6daa38 (patch)
tree127217c2045f52e9de316085c30cfdb462dcb603 /gen.sh
parentbaa78a97e4a15293b691cbb0e33533666bf95b41 (diff)
downloadlulua-f1e969402ea4a1dadba6c4c72028dc76cc6daa38.tar.gz
lulua-f1e969402ea4a1dadba6c4c72028dc76cc6daa38.tar.bz2
lulua-f1e969402ea4a1dadba6c4c72028dc76cc6daa38.zip
render: Improve generated SVG compatibility
Switch to proper SVG user coordinate rendering instead of font-dependent sizes. Embed WOFF2 fonts, so images have proper fonts when embedded. Remove font blobs and submodule IBM’s plex git repo.
Diffstat (limited to 'gen.sh')
-rwxr-xr-xgen.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/gen.sh b/gen.sh
index 6e984c3..df59e57 100755
--- a/gen.sh
+++ b/gen.sh
@@ -12,6 +12,7 @@ corpusdir=corpus
statsdir=stats
docdir=doc
wikiextractor=3rdparty/wikiextractor/WikiExtractor.py
+fontdir=3rdparty/plex/IBM-Plex-Arabic/fonts/complete/woff2/
optrounds=100000
# pin layers, keep hand-optimized numbers, keep top row free
optpins=0;1;2;0,B*;3,*
@@ -84,13 +85,14 @@ rule cp
build \$docdir/_build: mkdir
build \$docdir/_build/fonts: mkdir
build \$docdir/_temp: mkdir
-
build \$docdir/_build/index.html: cpp \$docdir/index.html || \$docdir/_build
build \$docdir/_build/letterfreq.json: letterfreq \$statsdir/ar-lulua/all.pickle || \$docdir/_build
build \$docdir/_build/style.css: cp \$docdir/style.css || \$docdir/_build
build \$docdir/_build/lulua-logo.svg: cp \$docdir/lulua-logo.svg || \$docdir/_build
-build \$docdir/_build/fonts/IBMPlexArabic-Regular.woff2: cp \$docdir/fonts/IBMPlexArabic-Regular.woff2 || \$docdir/_build/fonts
-build \$docdir/_build/fonts/IBMPlexArabic-Thin.woff2: cp \$docdir/fonts/IBMPlexArabic-Thin.woff2 || \$docdir/_build/fonts
+
+
+build \$docdir/_build/fonts/IBMPlexArabic-Regular.woff2: cp \$fontdir/IBMPlexArabic-Regular.woff2 || \$docdir/_build/fonts
+build \$docdir/_build/fonts/IBMPlexArabic-Thin.woff2: cp \$fontdir/IBMPlexArabic-Thin.woff2 || \$docdir/_build/fonts
EOF
for l in $layouts; do