Commit e05f23b
committed
Rename the "preserve line spacing" setting to "use macOS calculation"
The setting was added to "preserve" the font's original line spacing
intents, but after further investigation I cannot find why Apple's
calculation for font line spacing to be so wide. Furthermore it's quite
odd because the default line spacing is wide, but the only thing that
setting does is by re-initializing the font under Core Text (instead of
using NSFont like the default) using CTFont and somehow the issue is
fixed. Inspecting font metrics (using ttx) also didn't seem to give any
hints why the spacing are so wide (e.g. ascent / descent / line gap etc
all look fine). A StackOverflow comment seems to suggest that Apple is
simply adding a 1.2x scale to some fonts
(https://stackoverflow.com/questions/5511830/how-does-line-spacing-work-in-core-text-and-why-is-it-different-from-nslayoutm)
which seems to match the observation. My guess is that Apple looks at
some fonts and think they are too aggressive in their font metrics
design and "helpfully" introduces a 1.2x multiplier to space them out,
where Core Text is lower level than AppKit and therefore does not have
this auto-inflation.
By renaming the option it should make it clearer that this is a somewhat
arbitrary distinction instead of it being an inherent property of the
font.1 parent 233e188 commit e05f23b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | | - | |
| 428 | + | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| |||
0 commit comments