simon-git: technicality (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Thu May 1 17:05:54 BST 2025
TL;DR:
8d115c1 Work around a bug in Fontforge's simplifier.
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-05-01 17:05:54
commit 8d115c17837986f9236668eda32f963640b33bb4
web diff https://git.tartarus.org/?p=simon/technicality.git;a=commitdiff;h=8d115c17837986f9236668eda32f963640b33bb4;hp=b6ae0e522d1f8576a623a3776aeffcea2c443e09
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Apr 30 16:25:56 2025 +0100
Work around a bug in Fontforge's simplifier.
A user (wow, a user!) reported that on Windows 11 these fonts had
twice the line spacing they should, in the form of a huge descender
section. That turned out to be because the OS/2 winDescent metric was
more like 1500 design units than the expected 200. That in turn was
caused by some glyphs having a huge bounding box, which was apparently
introduced when I called contour.simplify().
(I wasn't seeing the wrong line spacing on _my_ Windows machine. But
that's Windows 10, so I have to guess that some change in OS font
handling affects which of the 'descent' header fields to use.)
I have no idea what contour.simplify() is playing at. I've done the
very simplest workaround, which is to check whether the bounding box
of a contour has hugely increased during simplification, and if so,
revert to the unsimplified version!
With this change, the metrics go back to being reasonably sensible.
gfparse.py | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
More information about the tartarus-commits
mailing list