mirror of
https://git.acl.cool/al/pages.git
synced 2025-12-16 12:31:18 -05:00
Compare commits
No commits in common. "84699c3143289a185347add56572b75933eb5092" and "1b0e96f4643e0881ed3d2a45568e21491265f2a7" have entirely different histories.
84699c3143
...
1b0e96f464
3 changed files with 3 additions and 12 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,4 +6,3 @@ all_chars.txt
|
||||||
**/fonts/**/*-Subset.*
|
**/fonts/**/*-Subset.*
|
||||||
woff2/
|
woff2/
|
||||||
**/serve_*
|
**/serve_*
|
||||||
**/lexers.*
|
|
||||||
|
|
|
||||||
10
build.sh
10
build.sh
|
|
@ -18,11 +18,6 @@ function soup_config {
|
||||||
|
|
||||||
source ./pgvv/bin/activate
|
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
|
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
|
cat common_chars.txt >>all_chars.txt
|
||||||
|
|
||||||
|
|
@ -49,10 +44,7 @@ for font in \
|
||||||
subset_ttf="${font%.ttf}-Subset.ttf"
|
subset_ttf="${font%.ttf}-Subset.ttf"
|
||||||
hb-subset "$font" \
|
hb-subset "$font" \
|
||||||
--output-file="$subset_ttf" \
|
--output-file="$subset_ttf" \
|
||||||
--text-file=all_chars.txt \
|
--keep-everything \
|
||||||
--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"
|
woff2_compress "$subset_ttf"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#! /usr/bin/env sh
|
#! /usr/bin/env sh
|
||||||
|
|
||||||
if [ $# -lt 1 ] || ! grep -qw "$1" lexers.out; then
|
if [ $# -lt 1 ] || ! pygmentize -L lexers | grep -qw "$1"; then
|
||||||
recode utf8..html
|
recode utf8..html
|
||||||
else
|
else
|
||||||
pygmentize -l $1 -f html | awk -F '<pre>' '{print substr($NF, 14)}'
|
pygmentize -l $1 -f html | head -c -13 | awk -F '<pre>' '{print $NF}'
|
||||||
fi
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue