Page MenuHome

BLF: Corrected Hinting
Changes PlannedPublic

Authored by Harley Acheson (harley) on Apr 13 2022, 1:08 AM.

Details

Summary

This patch improves our positioning and fixes our text hinting.


We allow users to selected different "Hinting" options in Preferences / Interface / Text Rendering but these have never worked typographically correctly. The following shows how None, Slight, and Full vary in spacing and width:

However "Slight" hinting simply aligns features vertically to the grid, and has no alteration to the horizontal placement of features. "Full" hinting aligns features both vertically and horizontally but this should only have subpixel effect. The following shows how these three options look after this patch is applied:

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Apr 13 2022, 1:08 AM
Harley Acheson (harley) created this revision.
Harley Acheson (harley) edited the summary of this revision. (Show Details)
Harley Acheson (harley) planned changes to this revision.Apr 13 2022, 2:10 AM

Hmmm.... Have to think it through but the character-spacing changes could be inside blf_kerning and therefore not affect glyph caches at all.

I'd rather not use float spacing and apply: D14582 (we could round-down to avoid changes in behavior) before applying a patch like this.

I'd question how useful it is to add too many knobs & sliders to control these things, someone can then report bugs that certain spacing settings don't work well which gives us more corner cases to investigate (issues with layout, wider spacing causing text getting clipped... etc).

Perhaps it's OK, I just feel like this is exposing more possible problems users could run into, and for the vast majority of users would just leave this setting at it's default anyway. So I'd rather spend time on improving the default instead of making this tweakable.

Harley Acheson (harley) requested review of this revision.Apr 13 2022, 2:37 AM

Yuck No, character-spacing can't move into blf_kerning. It needs the nicer control of affecting the individual float advances.

Harley Acheson (harley) edited the summary of this revision. (Show Details)

Removal of the user character-spacing/

Harley Acheson (harley) planned changes to this revision.Apr 13 2022, 3:57 AM

Harley: Use the results from this as a reference for hinting after D14582: BLF: sub-pixel positioning support goes in.