Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acdha/webfont-experiments
Experiments with webfonts
https://github.com/acdha/webfont-experiments
Last synced: about 2 months ago
JSON representation
Experiments with webfonts
- Host: GitHub
- URL: https://github.com/acdha/webfont-experiments
- Owner: acdha
- License: other
- Created: 2013-05-31T23:07:00.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T15:02:22.000Z (about 7 years ago)
- Last Synced: 2024-10-14T17:55:20.489Z (3 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Webfont Experiments
===================Container for some experiments with webfonts and Unicode
Generating CSS @font-face from font files
-----------------------------------------The goal is to automatically produce a single large stylesheet which defines webfonts using the
``unicode-range`` property to help browsers avoid downloading them until they're needed to display text on the
current page, avoiding the need for pages to explicitly hard-code all of the fonts. The second stage might be
optionally generating ``:lang()`` selectors based on Unicode ranges, although that will probably require hand
tweaking if more than one font defines a particular range.Rough notes
~~~~~~~~~~~#. Install FontForge and enable the Python module (e.g. ``brew install fontforge``)
#. Confirm everything is working by getting the text inventory::
font-unicode-inventory.py *.ttf
#. Generate your CSS::
font-unicode-inventory.py *.woff --format=css > lots-of-fonts.css