Skip to content

A tool to dynamically generate the HTML and CSS in use by RetroTxt for The Oldschool PC fonts.

License

Notifications You must be signed in to change notification settings

bengarrett/retrotxt-fonts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retrotxt-fonts

retrotxt-fonts is a tool to dynamically generate the HTML and CSS in use by RetroTxt for The Oldschool PC fonts.

The tool requires Go and the RetroTxt repository.

Usage

# clone the repositories if they don't exist
git clone [email protected]:bengarrett/retrotxt-fonts.git
git clone [email protected]:bengarrett/RetroTxt.git

cd retrotxt-fonts
go run .

Afterwards, font.css and fonts.html will be saved.

fonts.css

It is a drop in replacement for RetroTxt/ext/css/fonts_ibm.css

fonts.html

It needs to be pasted into RetroTxt/ext/html/options.html
between the HTML comments...
<!-- automatic generation begin (00 XXX 00 00:00 +0000)-->
<!-- (00 XXX 00 00:00 +0000) automatic generation end -->

Update or restore The Oldschool PC fonts

The process relies on Python 3 scripts and libraries that need to be installed.

# change directory to the font sources
cd RetroTxt/fonts

# unzip webfonts
unzip -j oldschool_pc_font_pack_v2.2_web.zip "woff - Web (webfonts)/*.woff" -d ../ext/fonts

# change directory to the extension fonts
cd RetroTxt/ext/fonts

# if missing, install python libraries
pip3 install fontTools[woff]
pip3 install Brotli

# convert woff fonts into better compressed woff2 format
python3 woff-to-woff2.py

# cleanup and remove woff fonts
python3 woff-cleanup.py

About

A tool to dynamically generate the HTML and CSS in use by RetroTxt for The Oldschool PC fonts.

Resources

License

Stars

Watchers

Forks