From dd4e70789e70fc22a01a52c20a320846a1dd5abc Mon Sep 17 00:00:00 2001 From: gamerdonkey Date: Mon, 22 Feb 2021 03:04:41 +0000 Subject: [PATCH] Optimizing the custom font I used because I feel bad about not using native webfonts. --- .gitignore | 2 ++ fonts/pixel_operator/build_reduced_ttf.sh | 5 +++++ fonts/pixel_operator/header_text.txt | 3 +++ index.html | 12 +++++++++--- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 fonts/pixel_operator/build_reduced_ttf.sh create mode 100644 fonts/pixel_operator/header_text.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d55e12 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.ttf +fonts/pixel_operator/LICENSE.txt diff --git a/fonts/pixel_operator/build_reduced_ttf.sh b/fonts/pixel_operator/build_reduced_ttf.sh new file mode 100644 index 0000000..dadb17e --- /dev/null +++ b/fonts/pixel_operator/build_reduced_ttf.sh @@ -0,0 +1,5 @@ +# Reduces ttf files to a subset of their original size to reduce the bandwidth +# usage. + +pyftsubset PixelOperator-Bold.ttf --output-file=PixelOperator-Bold_reduced.ttf --text-file=header_text.txt +pyftsubset PixelOperator.ttf --output-file=PixelOperator_reduced.ttf --unicodes="U+0020-007E" diff --git a/fonts/pixel_operator/header_text.txt b/fonts/pixel_operator/header_text.txt new file mode 100644 index 0000000..d3650ff --- /dev/null +++ b/fonts/pixel_operator/header_text.txt @@ -0,0 +1,3 @@ +Welcome to My Small Corner of ~town +My Things +Other People's Things diff --git a/index.html b/index.html index 5b0baf4..17b786f 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,14 @@