simon-git: technicality (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Apr 20 15:22:30 BST 2025
TL;DR:
2c9b31f Make EPS previews work, and document them.
32a603f Add a phony ninja target per font.
383e2c5 ninjagen.py: remove spurious ref to monospace .spacing files.
ca7fe66 Turn off Fontforge autohinting and use my own stem hints.
a3dcbcd Add some missing horizontal stem hints.
Repository: https://git.tartarus.org/simon/technicality.git
On the web: https://git.tartarus.org/?p=simon/technicality.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2025-04-20 15:22:30
commit 2c9b31f160ca27132746984f8e70606c3946e378
web diff https://git.tartarus.org/?p=simon/technicality.git;a=commitdiff;h=2c9b31f160ca27132746984f8e70606c3946e378;hp=2e4757acb617e8fffec8d95bc6ea6c70a286dbd6
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Apr 20 13:49:47 2025 +0100
Make EPS previews work, and document them.
The -e option failed because of a str/bytes mismatch, suggesting that
I haven't used that feature since before migrating to Python 3. Fixed
it, and added an example of using the preview feature in combination
with the new glyph-by-glyph build system.
README | 18 ++++++++++++++++++
gfparse.py | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
commit 32a603f12f878c6a030bc15eed9957fa54e0db61
web diff https://git.tartarus.org/?p=simon/technicality.git;a=commitdiff;h=32a603f12f878c6a030bc15eed9957fa54e0db61;hp=2c9b31f160ca27132746984f8e70606c3946e378
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Apr 20 13:50:37 2025 +0100
Add a phony ninja target per font.
Means that if I'm building just one font, I can type 'ninja -C build
TechnicalityBold' (or whichever) and not have to specify a file
extension.
ninjagen.py | 2 ++
1 file changed, 2 insertions(+)
commit 383e2c597f1ff981ab8801651570f2d26f9b2bdd
web diff https://git.tartarus.org/?p=simon/technicality.git;a=commitdiff;h=383e2c597f1ff981ab8801651570f2d26f9b2bdd;hp=32a603f12f878c6a030bc15eed9957fa54e0db61
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Apr 20 14:58:09 2025 +0100
ninjagen.py: remove spurious ref to monospace .spacing files.
For variable-pitch fonts, we pass an option to the tracing command to
also generate spacing data for the interactive spacing tool. So we
list a '.spacing' file as one of the outputs of that rule. For
monospace fonts, we don't generate that file - but I accidentally
listed it as an output of the rule anyway, and so ninja believed it
always had to rebuild all the monospace glyphs because that output
file didn't exist.
ninjagen.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit ca7fe66cd4980309316f66d2c04053e553bfd7ad
web diff https://git.tartarus.org/?p=simon/technicality.git;a=commitdiff;h=ca7fe66cd4980309316f66d2c04053e553bfd7ad;hp=383e2c597f1ff981ab8801651570f2d26f9b2bdd
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Apr 20 13:11:23 2025 +0100
Turn off Fontforge autohinting and use my own stem hints.
Ben has been looking at this font after I put it up on a web page
recently, and diagnosed a lot of my display problems as due to
amazingly terrible hints - so terrible that he recommended turning off
hints completely in preference to using _those_. He mentioned in
particular horizontal stem zones so huge they covered half the height
of the character.
However, it looks to me as if the horrible hints are actually
generated by Fontforge's autohinter. In particular, the 't' had a
horizontal stem zone for each end of its crossbar, and none at the
bottom, and those aren't the hints I wrote in latin/t.mf. Apparently I
should have more vigorously told Fontforge _not_ to do autohinting.
In the course of debugging this, I gave gfparse.py some command-line
options to turn on and off both FF autohinting and the generation of
my manual stem hints. Those might as well stay, in case they come in
useful again.
gfparse.py | 64 +++++++++++++++++++++++++++++++++++++++----------------------
ninjagen.py | 2 +-
2 files changed, 42 insertions(+), 24 deletions(-)
commit a3dcbcd43a06ed11cc71169761699d33a29cd43c
web diff https://git.tartarus.org/?p=simon/technicality.git;a=commitdiff;h=a3dcbcd43a06ed11cc71169761699d33a29cd43c;hp=ca7fe66cd4980309316f66d2c04053e553bfd7ad
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Apr 20 14:43:51 2025 +0100
Add some missing horizontal stem hints.
Ben explained to me yesterday that (at least the way Freetype handles
stem hints) the idea is to first decide what pixel range each stem
zone will map to; then move points of the font design so that the
parts in those stem zones are moved to the target pixel ranges, and
interpolate the rest of the points. The idea is that if you have a lot
of characters that all want to be the same height, you provide a
horizontal stem hint at the bottom and the top of each one, and the
hinter will stretch each character so that the bottoms and tops all
line up.
But if you only provide _one_ horizontal stem hint, no stretching is
done: the hinter simply _translates_ the font vertically to get the
stem zone to its target location. So if you leave out one hint in,
say, a lower-case letter, it may lift off the baseline, or drop below
it.
And it turns out that eight out of my 26 lower-case letters
accidentally had only one stem hint! Also the dotless version of
j (repeating the mistake in j itself); several of the ligatures; the
Greek η; and for some reason two of the four floor/ceiling brackets.
No wonder things were lining up badly.
'git grep -c hstem | grep :1' still lists a lot of characters with
only one stem hint, but I think the remaining ones seem more sensible,
because they're symbols or punctuation marks which float in the air,
so it _is_ potentially sensible for the hinter to translate them
vertically to a good height.
greek/eta.mf | 1 +
latin/b.mf | 1 +
latin/d.mf | 1 +
latin/dotlessj.mf | 1 +
latin/f_defs.mf | 1 +
latin/filig_defs.mf | 1 +
latin/fllig_defs.mf | 1 +
latin/h.mf | 1 +
latin/j.mf | 1 +
latin/n.mf | 1 +
latin/r.mf | 1 +
latin/t.mf | 1 +
maths/closeceil.mf | 1 +
maths/openfloor.mf | 1 +
14 files changed, 14 insertions(+)
More information about the tartarus-commits
mailing list