System: Slackware Linux (version 14.2)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Installation of woff2-1.0.2.tar.gz.
See the previous Posts on python3 and meson, respectively regarding Python 3.7.2
and ninja 1.9.0 installation.
bash-4.3$ su -
Password:
root@darkstar:~# cd /tmp
root@darkstar:/tmp# sbopkg -i brotli
...
brotli:
Checking GPG for brotli.tar.gz ... OK
Processing brotli 1.0.7-1
Using original .info file
Using original SlackBuild file
No build options selected.
...
Do you wish to proceed based on the search results above? Packages not
found will be skipped during the process.
(P)roceed or (Q)uit?: P
...
Done upgrading/installing package.
...
root@darkstar:/tmp# sbopkg -i woff2
...
woff2:
Checking GPG for woff2.tar.gz ... OK
Processing woff2 1.0.2-1
Using original .info file
Using original SlackBuild file
No build options selected.
...
Do you wish to proceed based on the search results above? Packages not
found will be skipped during the process.
(P)roceed or (Q)uit?: P
...
Done upgrading/installing package.
...
root@darkstar:/tmp# exit
logout
bash-4.3$
Generate a .woff2 file.
bash-4.3$ cd /tmp
bash-4.3$ git clone -q https://github.com/varehus/Bitstream.git
bash-4.3$ cp Bitstream/VeraMono.ttf .
bash-4.3$ woff2_compress VeraMono.ttf
Processing VeraMono.ttf => VeraMono.woff2
Compressed 44968 to 21928.
bash-4.3$ rm -rf Bitstream
bash-4.3$ rm VeraMono.ttf
bash-4.3$ git clone -q https://github.com/nurmi-labs/nurmi-labs.github.io.git
bash-4.3$ mv VeraMono.woff2 nurmi-labs.github.io/fonts
bash-4.3$ cd nurmi-labs.github.io
bash-4.3$ ed css/fonts.css << END
> 4i
> url("../fonts/VeraMono.woff2"),
> .
> w
> q
> END
227
268
bash-4.3$ git add .
bash-4.3$ git commit -m "Add .woff2 file"
[master a7d16fc] Add .woff2 file
2 files changed, 1 insertion(+)
create mode 100644 fonts/VeraMono.woff2
bash-4.3$ git push origin master
Username for 'https://github.com': username
Password for 'https://username@github.com':
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 21.97 KiB | 1.83 MiB/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To https://github.com/nurmi-labs/nurmi-labs.github.io.git
6bb2e7d..a7d16fc master -> master
bash-4.3$
The file size of the .woff2 is 6K smaller than the .woff generated by J. Kew's code.
bash-4.3$ ls -lh fonts
total 156K
-rw-r--r-- 1 eric eric 49K Jul 14 06:22 VeraMono.eot
-rw-r--r-- 1 eric eric 49K Jul 14 06:22 VeraMono.ttf
-rw-r--r-- 1 eric eric 28K Jul 14 06:22 VeraMono.woff
-rw-r--r-- 1 eric eric 22K Jul 14 06:06 VeraMono.woff2
bash-4.3$ cd ..
bash-4.2$ rm -fr nurmi-labs.github.io
bash-4.3$ exit