Optimizing the custom font I used because I feel bad about not using native webfonts.

master
gamerdonkey 2021-02-22 03:04:41 +00:00
parent cfaca7af90
commit dd4e70789e
4 changed files with 19 additions and 3 deletions

2
.gitignore vendored 100644
View File

@ -0,0 +1,2 @@
*.ttf
fonts/pixel_operator/LICENSE.txt

View File

@ -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"

View File

@ -0,0 +1,3 @@
Welcome to My Small Corner of ~town
My Things
Other People's Things

View File

@ -5,8 +5,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<style>
@font-face {
font-family: "PixelOperator";
src: url("./fonts/PixelOperator-Bold.ttf");
font-family: "PixelOperator_reduced";
src: url("./fonts/pixel_operator/PixelOperator_reduced.ttf");
}
@font-face {
font-family: "PixelOperator_reduced";
font-weight: bold;
src: url("./fonts/pixel_operator/PixelOperator-Bold_reduced.ttf");
}
html {
@ -18,7 +24,7 @@
background: repeating-linear-gradient(rgb(0,0,170), rgb(0,0,170) 20px, rgb(0,170,170) 20px, rgb(0,170,170) 40px);
min-height: 100%;
margin: 0;
font-family: PixelOperator, monospace, fixed;
font-family: PixelOperator_reduced, monospace, fixed;
font-size: 14pt;
}