chiark / gitweb /
Try to generate more-symmetric stem hints
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 30 Aug 2025 13:01:56 +0000 (14:01 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sat, 30 Aug 2025 13:01:56 +0000 (14:01 +0100)
commit912f9e1ff3fb02b1694ba707eadba43ebf5ab827
tree89dad92bd7fee11b44b08d30e2593ed923e88a6d
parentbb5d6c879bff224e3066a7dbd468a3eadf232365
Try to generate more-symmetric stem hints

When generating hints for a symmetric glyph like 'v', it's helpful if
the hits are symmetric because that means that the hinted bitmap is
also likely to be symmetric.  This is particularly visible on
Microsoft Windows where the version of 'v' before this patch ended up
horribly distorted when rendered at 20 ppem in Bedstead Condensed.  To
try to avoid such horrors, we now select hints starting at the outside
edges of the character and working inwards, instead of going from left
to right or top to bottom.  This means that where hints conflict,
we'll tend to choose the ones towards the outside edge of the
character, rather than towards the top or left.

This changes the hinting for 50 glyphs, but all in ways that look
superficially reasonable.

For more complicated characters we probably still want to think about
hint substitution, but that still scares me.
bedstead.c