From af97adacbe354bc3ed61fd62494fec8ca443ee59 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 24 Jun 2025 11:25:35 -0400 Subject: [PATCH 1/2] "fix" issue #3 by manually including the cyrillic small e, u0435 --- build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 0bcbf29..f1b9caf 100755 --- a/build.sh +++ b/build.sh @@ -44,7 +44,10 @@ for font in \ subset_ttf="${font%.ttf}-Subset.ttf" hb-subset "$font" \ --output-file="$subset_ttf" \ - --keep-everything \ + --text-file=all_chars.txt \ + --layout-features='*' \ + --passthrough-tables \ + --unicodes+="0x0435" # this is the cyrillic e. For some reason, alegreya's ff calt breaks without it woff2_compress "$subset_ttf" From 84699c3143289a185347add56572b75933eb5092 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 24 Jun 2025 12:07:08 -0400 Subject: [PATCH 2/2] cache supported lexers for pygments --- .gitignore | 1 + build.sh | 5 +++++ syntax_wrapper.sh | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 474022f..027c80a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ all_chars.txt **/fonts/**/*-Subset.* woff2/ **/serve_* +**/lexers.* diff --git a/build.sh b/build.sh index f1b9caf..6cb5c98 100755 --- a/build.sh +++ b/build.sh @@ -18,6 +18,11 @@ function soup_config { source ./pgvv/bin/activate +if ! [[ -f lexers.out ]] || [[ "$(head -1 lexers.out)" != "$(pygmentize -V)" ]]; then + pygmentize -L lexer | grep '* ' >lexers.out + echo "Created pygments lexer cache at lexers.out" +fi + find acl.cool/site/ ytheleus.org/site/ -type f \( -name '*.dj' -o -name '*.html' \) -exec cat {} + >all_chars.txt cat common_chars.txt >>all_chars.txt diff --git a/syntax_wrapper.sh b/syntax_wrapper.sh index a74245c..b4ba4d1 100755 --- a/syntax_wrapper.sh +++ b/syntax_wrapper.sh @@ -1,7 +1,7 @@ #! /usr/bin/env sh -if [ $# -lt 1 ] || ! pygmentize -L lexers | grep -qw "$1"; then +if [ $# -lt 1 ] || ! grep -qw "$1" lexers.out; then recode utf8..html else - pygmentize -l $1 -f html | head -c -13 | awk -F '
' '{print $NF}'
+    pygmentize -l $1 -f html | awk -F '
' '{print substr($NF, 14)}'
 fi
\ No newline at end of file