Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UFO/OpenType conversion #25

Open
wants to merge 61 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
51b6e52
delete old conversion
dpk May 7, 2020
1e9b24d
initial conversion to UFO format
dpk May 7, 2020
c5a259a
add fontplots of the UFOs to more easily see what character is which
dpk May 7, 2020
94587d9
first try at merging the Roman LF into the Roman OSF font
dpk May 7, 2020
a50501c
corrected support for OSF/LF in the single Roman-style font
dpk May 7, 2020
e2d54b3
automatic ligature substitution in the new Roman font
dpk May 7, 2020
d2120b3
accidentally committed a test build file
dpk May 7, 2020
ae9e61e
add ligatures feature to the Semibold font, which is now renamed to b…
dpk May 7, 2020
6e3f633
rename Bold OSF to bold ready to merge the lining numerals in
dpk May 7, 2020
0ed627a
merge lining figures into the Bold font
dpk May 7, 2020
5392ec2
add ligature support to the bold font
dpk May 7, 2020
b757dcc
add ligatures to italic
dpk May 7, 2020
01010da
add ligatures to display italic
dpk May 7, 2020
318c66f
add the precomposed fractions from the expert font to the Roman font
dpk May 7, 2020
8547b35
small caps support for letters
dpk May 7, 2020
12df131
add AFM files from Fondu (contains basic kerning information)
dpk May 11, 2020
741fd85
redo Roman font kerning from the original font suitcase metrics
dpk Mar 1, 2021
682b448
add a README file which actually documents what's going on in this br…
dpk Mar 1, 2021
cc2ad71
add pyfontaine to requirements.txt
dpk Mar 1, 2021
a39c7e0
add c2sc punctuation; fixes #11
dpk Mar 1, 2021
2304f5a
add proportional numbers from the figure kerning in the expert font
dpk Mar 1, 2021
657fe18
kerning for all the fonts
dpk Mar 1, 2021
eb5258c
new version of Makefile
dpk Mar 1, 2021
f88431e
add WOFF and WOFF2 builds to the Makefile
dpk Mar 1, 2021
b660e11
add glyph2svgpath script that can be used to check the rendering of g…
dpk Mar 2, 2021
63ff590
add numerators, denominators, and OpenType fraction support
dpk Mar 2, 2021
5c79fe9
fix style mapping for the Roman font
dpk Mar 2, 2021
63c7fe3
fixes for Roman kerning (added small caps kerning)
dpk Mar 2, 2021
7a335e1
update README with news of fractions
dpk Mar 2, 2021
8128d36
add pangrams page to test language support
dpk Mar 5, 2021
11e3f09
add doc directory
dpk Mar 5, 2021
e4fe1c3
begin documenting accent positions for italic
dpk Mar 5, 2021
16881ee
re-add fi and fl glyphs, fixes #13
dpk Mar 8, 2021
df8f7dc
fix Markdown error in accent position docs
dpk Mar 8, 2021
2da4ed2
add dcroat and Dcroat to Roman and Italic fonts
dpk Mar 8, 2021
75e5c08
normalize italic dcroat, add semibold dcroat
dpk Mar 8, 2021
40b2b3c
add dcroat to bold font
dpk Mar 8, 2021
e398d24
add dcroat and Dcroat to DisplayItalic font
dpk Mar 8, 2021
21afc8c
add draft f_j and f.deu glyphs
dpk Mar 8, 2021
149cd36
correct names of the draft f_j glyphs
dpk Mar 8, 2021
7874dd6
draft glyphs for double-dagger and single guillemets
dpk Mar 8, 2021
55bbbad
update README with latest news
dpk Mar 8, 2021
811f92b
Add hinting test for Roman font w/ some blue values that look okay.
dpk Apr 2, 2021
4c8d1b3
capitalization typo fix in README
dpk Apr 2, 2021
faede05
Generate hinted TTFs and test their hinting too.
dpk Apr 2, 2021
df3de11
don't error on mkdir if dir already exists
dpk Apr 2, 2021
be696bf
DRY in the Makefile.
dpk Apr 2, 2021
48c1eee
(unsuccessful) attempt to tweak blue values
dpk Apr 2, 2021
05f2ee9
Make WOFFs from TTFs, not OTFs, for now, as TTF hinting is better.
dpk Apr 2, 2021
9ba5910
convert originals to AppleSingle, so they're not useless empty files
dpk Apr 8, 2021
9644e56
Remove spurious <unicode hex="..." /> tags from OT variant characters
dpk Nov 7, 2021
f811e53
Correct name of lining zero and six glyphs
dpk Nov 8, 2021
6cac31f
New draft Roman double-dagger with fixed curves
dpk Nov 8, 2021
61c7077
ignore glyphs autosaves
dpk Nov 8, 2021
af0db9e
Italic double dagger draft glyph
dpk Nov 8, 2021
012186f
standardize draft glyph names
dpk Nov 8, 2021
f6eb9f3
draft Roman font vowels with ogonek + hbar
dpk Nov 8, 2021
930c203
merge fj ligatures into fonts
dpk Nov 8, 2021
5fa46e6
Add single guillemets to Roman font
dpk Mar 7, 2022
138dd99
Convert Roman to Glyphs UFO and add aogonek
dpk Mar 7, 2022
88873f5
Aogonek
dpk Mar 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
152 changes: 151 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,151 @@
.DS_Store
tests
*.sfd-*
build
otf
woff
*.otf

specimen/specimen.aux
specimen/specimen.log
specimen/specimen.pdf

* (Autosaved).glyphs

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
65 changes: 65 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.PHONY: all clean test psautohint otf ttf woff woff2
ALL_PSAUTOHINTS = $(patsubst ufo/%.ufo,build/psautohint/%.ufo,$(wildcard ufo/*.ufo))
ALL_OTFS = $(patsubst ufo/%.ufo,build/otf/%.otf,$(wildcard ufo/*.ufo))
ALL_TTFS = $(patsubst ufo/%.ufo,build/ttf/%.ttf,$(wildcard ufo/*.ufo))
ALL_WOFFS = $(patsubst ufo/%.ufo,build/woff/%.woff,$(wildcard ufo/*.ufo))
ALL_WOFF2S = $(patsubst ufo/%.ufo,build/woff2/%.woff2,$(wildcard ufo/*.ufo))

all: ${ALL_OTFS} ${ALL_TTFS} ${ALL_WOFFS} ${ALL_WOFF2S}

psautohint: ${ALL_PSAUTOHINTS}
otf: ${ALL_OTFS}
woff: ${ALL_WOFFS}
woff2: ${ALL_WOFF2S}

clean:
rm -rf build/ tests/

build:
mkdir -p build
build/psautohint: | build
mkdir -p build/psautohint
build/otf: | build
mkdir -p build/otf
build/ttf: | build
mkdir -p build/ttf
build/woff: | build
mkdir -p build/woff
build/woff2: | build
mkdir -p build/woff2

build/psautohint/%.ufo: ufo/%.ufo ufo/%.ufo/* | build/psautohint
rm -rf $@
psautohint -o $@ $<

build/otf/%.otf: build/psautohint/%.ufo | build/otf
makeotf -r -f $< -o build/otf/

build/ttf/%.ttf: build/otf/%.otf | build/ttf
otf2ttf -o /dev/stdout $< | ttfautohint /dev/stdin $@

build/woff/%.woff: build/ttf/%.ttf | build/woff
ttf2woff $< $@

build/woff2/%.woff2: build/ttf/%.ttf | build/woff2
woff2_compress $< && mv build/ttf/$*.woff2 build/woff2/

HINTING_TEST_SIZES = 14 15 16 17 18 19 20 21

ALL_OTF_HINTING_TESTS = $(patsubst %,tests/otf-hinting/Roman-%.png,${HINTING_TEST_SIZES})
ALL_TTF_HINTING_TESTS = $(patsubst %,tests/ttf-hinting/Roman-%.png,${HINTING_TEST_SIZES})

test: ${ALL_OTF_HINTING_TESTS} ${ALL_TTF_HINTING_TESTS}

tests:
mkdir -p tests
tests/otf-hinting: | tests
mkdir -p tests/otf-hinting
tests/ttf-hinting: | tests
mkdir -p tests/ttf-hinting

tests/otf-hinting/Roman-%.png: build/otf/ETBook-Roman.otf | tests/otf-hinting
convert -background white -fill black -font build/otf/ETBook-Roman.otf -pointsize $* label:'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ß' $@

tests/ttf-hinting/Roman-%.png: build/ttf/ETBook-Roman.ttf | tests/ttf-hinting
convert -background white -fill black -font build/ttf/ETBook-Roman.ttf -pointsize $* label:'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ß' $@
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
### ET Book
# ET Book

A webfont version of the typeface used in Edward Tufte’s [books](https://www.edwardtufte.com/tufte/books_vdqi).
An OpenType version of the typeface used in Edward Tufte’s [books][], from the open-source release of the typeface at [edwardtufte/et-book][orig].

[books]: https://www.edwardtufte.com/tufte/books_vdqi
[orig]: https://github.com/edwardtufte/et-book

The `fontforge-old` branch contains a usable, but not really very good, conversion of the original fonts using FontForge. This branch contains a work-in-progress second attempt at a conversion using more modern toolchains, in particular the UFO font format.

At the moment, the conversion is essentially complete:

* All fonts have been converted from the original PostScript Type 1 files to UFO format.
* The Roman and Bold weights have had the lining and old-style variant files merged into single fonts, which use the OpenType `onum` and `lnum` features to select between the two figure styles.
* The letter combinations ff, fi, fl, ffi, and ffl are replaced by their corresponding ligatures with the OpenType `liga` feature. A new fj ligature has been supplied for North Germanic languages and loanwords therefrom.
* Small caps are supported for all letters in the Roman font, and for hopefully all of the smaller punctuation activated by the `c2sc` feature.
* Numerator and denominator figures are available as `numr` and `dnom` in the Roman font, and OpenType fractions can be built using the `frac` feature.
* The kerning tables which were present in the original font suitcase files have been merged into the OpenType `kern` table.
* … but there are still one or two odd characters from the Expert font which aren’t supported in the OpenType font. These will probably end up under `ss01` or something.

But before these fonts are actually released as version 2.0, the following additional features will be added/problems addressed:

* Support for all the official languages of the European Union that use the Latin alphabet. There was fairly decent support for Western European languages in the original ET Book fonts, but characters for Eastern European languages were lacking. There are two characters that need(ed) designing specially, d with crossbar for Croatian and h with crossbar for Maltese. The former is done, the latter will be done soon. The remainder are simple compositions of a base character plus a diacritic, and the design of the existing accented characters in the fonts is currently being analysed to facilitate adding further such characters to harmonize with the original ones. See issue #2.
* **Help wanted!** The original ET Book fonts had no hinting information — as a result, the webfonts rendered badly on various platforms. I’m trying to get auto-hinting for PostScript outlines to work, but it seems to be a bit of a dark art. If you have knowledge in this area, please let me know! See issue #4.
* The original PostScript fonts had replaced the ‹, ›, and ‡ characters with extended ligatures, presumably because Edward Tufte did not need those characters for his books, but access to those ligatures without having to switch to the Expert font was rather handy. Regardless, since those ligatures are now automatically used with the right letter combinations, and those characters are actually used in many countries, new guillemets and double-dagger characters will be supplied. See issue #17.
* In time for (or perhaps after) 2.0, figures in the Roman font will be available in superscript and subscript positions as well as numerator and denominator positions.

Also after 2.0: language support will be further improved to also cover all the minority and regional languages of Europe; I hope to improve the kerning, which at present is rather minimal; there may well be further ligatures of fb, fh, etc., and a specially designed f for situations where a ligature can’t be used to avoid an unsightly collission or near-miss; and who knows what else.

-------------------------------------

ET Book was designed by Dmitry Krasny, Bonnie Scranton, and [Edward Tufte](https://www.edwardtufte.com/tufte/). It was converted from the original `suit` files by [Adam Schwartz](http://adamschwartz.co) ([@adamschwartz](https://github.com/adamschwartz)).
ET Book was designed by Dmitry Krasny, Bonnie Scranton, and [Edward Tufte][et]. It was converted from the original `suit` files by [Daphne Preston-Kendal][dpk] ([@dpk][dpkgh]) following the original webfont conversion by [Adam Schwartz][as] ([@adamschwartz][asgh]).

[et]: https://www.edwardtufte.com/tufte/
[dpk]: http://dpk.io/
[dpkgh]: https://github.com/dpk
[as]: http://adamschwartz.co/
[asgh]: https://github.com/adamschwartz

ET Book is MIT License. You may use it in both personal and commercial projects.
ET Book OT is MIT-licensed. You may use it in both personal and commercial projects.
80 changes: 80 additions & 0 deletions doc/accent-positions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Diacritic mark positioning

These the correct `xOffset` and `yOffset` values for characters built from the following bases plus accents above the character in question, calculated using dieresis as the combining character except where noted (and therefore possibly incorrect for others, but this will eventually be checked and noted).

## Roman

| base | `xOffset` | `yOffset` |
| -- | --:| --:|
| A | 180 | 222 |
| a | 0 | 0 |
| a.sc | 74 | 75 |
| c* | 33 | 0 |
| E† | 137 | 222 |
| e† | 56 | 0 |
| e.sc | 45 | 75 |
| I‡ | 0 | 222 |
| dotlessi‡ | -39 | 0 |
| i.sc | -30 | 75 |
| N§ | 256 | 228 |
| n§ | 81 | 0 |
| n.sc§ | 119 | 75 |
| O | 240 | 222 |
| o† | 77 | 0 |
| o.sc | 111 | 75 |
| S‖ | 83 | 222 |
| s‖ | -17 | 0 |
| U | 240 | 222 |
| u* | 89 | 0 |
| u.sc | 119 | 75 |
| Y | 196 | 222 |
| y | 72 | 0 |
| y.sc | 86 | 75 |
| Z‡ | 180 | 222 |
| z‡ | 39 | 0 |

\* based on observation that c + cedilla matches up with ccedilla at 33, -10, and that accent marks underneath seem generally to be at yOffset -10.
† the dots on Edieresis, edieresis, odieresis, and udieresis are slightly smaller than those in dieresis itself. The numbers give the centre-point position, i.e. so that the right edge of the left dot and the left edge of the right dot match up.
‡ accented I and i characters might need to be made wider to accommodate the accent mark? I’m unsure.
§ tested with tilde, not dieresis.
‖ tested with caron, not dieresis.

## Semibold

To be filled in.

## Bold

To be filled in.

## Italic

| base | ¨ `xOffset` | ¨ `yOffset` | ´ `xOffset` | ´ `yOffset` | \` `xOffset` | \` `yOffset` | Other |
| -- | --:| --:| --:| --:| --:| --:| -- |
| A | 326 | 219 | 336 | 219 | 286 | 219 | | |
| a* | 32 | 16 | 32 | 0 | 32 | 0 | | |
| E | 198 | 219 | 227 | 217 | 157 | 219 | | |
| e† | 12 | 20 | 7 | 0 | 7 | 0 | | |
| I | 73 | 219 | 73 | 219 | 23 | 219 | | |
| dotlessi | -49 | 20 | -47 | 0 | -84 | 0 | | |
| N | — | — | — | — | — | — | See ‡ | See ‡ |
| n | — | — | — | — | — | — | See ‡ | See ‡ |
| O | 273 | 238 | 313 | 219 | 262 | 219 | | |
| o | 26 | 10 | 33 | 0 | 33 | 0 | | |

<!-- | S | @@ | @@ | -->
<!-- | s | @@ | @@ | -->
<!-- | U | @@ | @@ | -->
<!-- | u | @@ | @@ | -->
<!-- | Y | @@ | @@ | -->
<!-- | y | @@ | @@ | -->
<!-- | Z | @@ | @@ | -->
<!-- | z | @@ | @@ | -->

\* The dots on adieresis are slightly larger than the ones in dieresis. This takes a value such that the dieresis dots are pretty much dead centre in the adieresis dots.
† The dots on edieresis are slightly smaller than the ones in dieresis. The numbers give the centre-point position, i.e. so that the right edge of the left dot and the left edge of the right dot match up.
‡ The tilde on Ntilde and ntilde is a different shape from tilde. 300, 219 makes tilde roughly line up with Ntilde; 55, 0 with ntilde. If other tilde’d accented characters are needed, it would probably be best to pull the tildes out pof Ntilde and ntilde, as they look somewhat more italic (and more balanced) than tilde.

## Display Italic

To be filled in.
Loading