Optimize overshoot of Half H.

This commit is contained in:
John McWilliams 2025-03-22 07:22:10 -04:00
parent 9aa765838e
commit 8f2f859a6f
2 changed files with 27 additions and 23 deletions

View file

@ -1,7 +1,13 @@
* Add `flat-top` variants for `curly`, `straight-vertical-sides`, and `rounded-vertical-sides` forms of `W` and `w` (#2146). * Add `flat-top` variants for `curly`, `straight-vertical-sides`, and `rounded-vertical-sides` forms of `W` and `w` (#2146).
* Add `almost-flat-top` variants for `curly` forms of `W` and `w`. * Add `almost-flat-top` variants for `curly` forms of `W` and `w`.
* Refine shape of the following characters: * Refine shape of the following characters:
- GREEK CAPITAL LETTER HETA (`U+0370`).
- GREEK SMALL LETTER HETA (`U+0371`).
- ARMENIAN SMALL LIGATURE ECH YIWN (`U+0587`). - ARMENIAN SMALL LIGATURE ECH YIWN (`U+0587`).
- LATIN CAPITAL LETTER HALF H (`U+2C75`).
- LATIN SMALL LETTER HALF H (`U+2C76`).
- LATIN CAPITAL LETTER AU (`U+A736`). - LATIN CAPITAL LETTER AU (`U+A736`).
- LATIN CAPITAL LETTER REVERSED HALF H (`U+A7F5`).
- LATIN SMALL LETTER REVERSED HALF H (`U+A7F6`).
- LATIN SMALL LIGATURE FFI (`U+FB03`). - LATIN SMALL LIGATURE FFI (`U+FB03`).
* Fix variant application of `cv38` on `U+1DF0F`. * Fix variant application of `cv38` on `U+1DF0F`.

View file

@ -38,7 +38,7 @@ glyph-block Letter-Latin-Upper-H : begin
[Just SLAB-ALL-BGR] : composite-proc sf.lt.outer sf.rt.inner sf.lb.full sf.rb.full [Just SLAB-ALL-BGR] : composite-proc sf.lt.outer sf.rt.inner sf.lb.full sf.rb.full
[Just SLAB-TAILED-CYRILLIC-BGR] : composite-proc sf.lt.outer sf.rt.inner sf.lb.full [Just SLAB-TAILED-CYRILLIC-BGR] : composite-proc sf.lt.outer sf.rt.inner sf.lb.full
define [LeftHalfSerifs slabType t b l r sw] : begin define [LeftHalfHSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke]) local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
return : match slabType return : match slabType
[Just SLAB-NONE] : glyph-proc [Just SLAB-NONE] : glyph-proc
@ -49,7 +49,7 @@ glyph-block Letter-Latin-Upper-H : begin
[Just SLAB-ALL-BGR] : composite-proc sf.lt.outer sf.lb.fullSide [Just SLAB-ALL-BGR] : composite-proc sf.lt.outer sf.lb.fullSide
[Just SLAB-TAILED-CYRILLIC-BGR] : composite-proc sf.lt.outer sf.lb.fullSide [Just SLAB-TAILED-CYRILLIC-BGR] : composite-proc sf.lt.outer sf.lb.fullSide
define [RightHalfSerifs slabType t b l r sw] : begin define [RightHalfHSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke]) local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
return : match slabType return : match slabType
[Just SLAB-NONE] : glyph-proc [Just SLAB-NONE] : glyph-proc
@ -60,7 +60,7 @@ glyph-block Letter-Latin-Upper-H : begin
[Just SLAB-ALL-BGR] : composite-proc sf.rt.inner sf.rb.fullSide [Just SLAB-ALL-BGR] : composite-proc sf.rt.inner sf.rb.fullSide
[Just SLAB-TAILED-CYRILLIC-BGR] : begin sf.rt.inner [Just SLAB-TAILED-CYRILLIC-BGR] : begin sf.rt.inner
define [TurnedSerifs slabType t b l r sw] : begin define [TurnedHSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke]) local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
return : match slabType return : match slabType
[Just SLAB-NONE] : glyph-proc [Just SLAB-NONE] : glyph-proc
@ -89,14 +89,14 @@ glyph-block Letter-Latin-Upper-H : begin
include : LeaningAnchor.Above.VBar.l l include : LeaningAnchor.Above.VBar.l l
include : LeaningAnchor.Below.VBar.l l include : LeaningAnchor.Below.VBar.l l
include : tagged 'strokeL' : VBar.l l 0 top sw include : tagged 'strokeL' : VBar.l l 0 top sw
include : HBar.m (l - O) (r + O) (top * HBarPos) sw include : HBar.m (l - O) r (top * HBarPos) sw
define [RightHalfHShape l r top _sw] : glyph-proc define [RightHalfHShape l r top _sw] : glyph-proc
local sw : fallback _sw Stroke local sw : fallback _sw Stroke
include : LeaningAnchor.Above.VBar.r r include : LeaningAnchor.Above.VBar.r r
include : LeaningAnchor.Below.VBar.r r include : LeaningAnchor.Below.VBar.r r
include : tagged 'strokeR' : VBar.r r 0 top sw include : tagged 'strokeR' : VBar.r r 0 top sw
include : HBar.m (l - O) (r + O) (top * HBarPos) sw include : HBar.m l (r + O) (top * HBarPos) sw
define [TailedHShape l r top _sw] : glyph-proc define [TailedHShape l r top _sw] : glyph-proc
local sw : fallback _sw Stroke local sw : fallback _sw Stroke
@ -159,21 +159,19 @@ glyph-block Letter-Latin-Upper-H : begin
topRightSerifed true topRightSerifed true
foreach { suffix { Body TurnedBody LeftHalfBody RightHalfBody slabType } } [Object.entries HConfig] : do foreach { suffix { Body TurnedBody LeftHalfBody RightHalfBody slabType } } [Object.entries HConfig] : do
define fSlab : slabType !== SLAB-NONE
create-glyph "H.\(suffix)" : glyph-proc create-glyph "H.\(suffix)" : glyph-proc
include : MarkSet.capital include : MarkSet.capital
include : Body SB RightSB CAP include : Body SB RightSB CAP
include : HSerifs slabType CAP 0 SB RightSB include : HSerifs slabType CAP 0 SB RightSB
create-glyph "grek/Eta.\(suffix)" : glyph-proc create-glyph "grek/Eta.\(suffix)" : glyph-proc
include [refer-glyph "H.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "H.\(suffix)"] AS_BASE ALSO_METRICS
include : SetGrekUpperTonos [if fSlab (-SideJut) 0] include : SetGrekUpperTonos [if (slabType === SLAB-NONE) 0 (-SideJut)]
create-glyph "HTurned.\(suffix)" : glyph-proc create-glyph "HTurned.\(suffix)" : glyph-proc
include : MarkSet.capital include : MarkSet.capital
include : TurnedBody SB RightSB CAP include : TurnedBody SB RightSB CAP
include : TurnedSerifs slabType CAP 0 SB RightSB include : TurnedHSerifs slabType CAP 0 SB RightSB
create-glyph "smcpH.\(suffix)" : glyph-proc create-glyph "smcpH.\(suffix)" : glyph-proc
include : MarkSet.e include : MarkSet.e
@ -183,42 +181,42 @@ glyph-block Letter-Latin-Upper-H : begin
create-glyph "leftHalfH.\(suffix)" : glyph-proc create-glyph "leftHalfH.\(suffix)" : glyph-proc
include : MarkSet.capital include : MarkSet.capital
local xMockLeft : SB * 1.5 local xMockLeft : SB * 1.5
local xMockRight : RightSB - [xMidBarShrink fSlab] local xMockRight : RightSB - [xMidBarShrink (slabType === SLAB-ALL)]
local shift : Math.abs : Middle - [mix (xMockLeft - [if fSlab SideJut 0]) xMockRight 0.5] local shift : Math.abs : Middle - [mix (xMockLeft - [if (slabType === SLAB-NONE) 0 SideJut]) xMockRight 0.5]
local xLeft : xMockLeft + shift local xLeft : xMockLeft + shift
local xRight : xMockRight + shift local xRight : xMockRight + shift
include : LeftHalfBody xLeft xRight CAP include : LeftHalfBody xLeft xRight CAP
include : LeftHalfSerifs slabType CAP 0 xLeft xRight include : LeftHalfHSerifs slabType CAP 0 xLeft xRight
create-glyph "rightHalfH.\(suffix)" : glyph-proc create-glyph "rightHalfH.\(suffix)" : glyph-proc
include : MarkSet.capital include : MarkSet.capital
local xMockLeft : SB + [xMidBarShrink fSlab] local xMockLeft : SB + [xMidBarShrink (slabType === SLAB-ALL)]
local xMockRight : Width - SB * 1.5 local xMockRight : Width - SB * 1.5
local shift : Math.abs : Middle - [mix xMockLeft (xMockRight + [if fSlab SideJut 0]) 0.5] local shift : Math.abs : Middle - [mix xMockLeft (xMockRight + [if (slabType === SLAB-NONE) 0 SideJut]) 0.5]
local xLeft : xMockLeft - shift local xLeft : xMockLeft - shift
local xRight : xMockRight - shift local xRight : xMockRight - shift
include : RightHalfBody xLeft xRight CAP include : RightHalfBody xLeft xRight CAP
include : RightHalfSerifs slabType CAP 0 xLeft xRight include : RightHalfHSerifs slabType CAP 0 xLeft xRight
create-glyph "leftHalfSmcpH.\(suffix)" : glyph-proc create-glyph "leftHalfSmcpH.\(suffix)" : glyph-proc
include : MarkSet.e include : MarkSet.e
local xMockLeft : SB * 1.5 local xMockLeft : SB * 1.5
local xMockRight : RightSB - [xMidBarShrink fSlab] local xMockRight : RightSB - [xMidBarShrink (slabType === SLAB-ALL)]
local shift : Math.abs : Middle - [mix (xMockLeft - [if fSlab SideJut 0]) xMockRight 0.5] local shift : Math.abs : Middle - [mix (xMockLeft - [if (slabType === SLAB-NONE) 0 SideJut]) xMockRight 0.5]
local xLeft : xMockLeft + shift local xLeft : xMockLeft + shift
local xRight : xMockRight + shift local xRight : xMockRight + shift
include : LeftHalfBody xLeft xRight XH include : LeftHalfBody xLeft xRight XH
include : LeftHalfSerifs slabType XH 0 xLeft xRight include : LeftHalfHSerifs slabType XH 0 xLeft xRight
create-glyph "rightHalfSmcpH.\(suffix)" : glyph-proc create-glyph "rightHalfSmcpH.\(suffix)" : glyph-proc
include : MarkSet.e include : MarkSet.e
local xMockLeft : SB + [xMidBarShrink fSlab] local xMockLeft : SB + [xMidBarShrink (slabType === SLAB-ALL)]
local xMockRight : Width - SB * 1.5 local xMockRight : Width - SB * 1.5
local shift : Math.abs : Middle - [mix xMockLeft (xMockRight + [if fSlab SideJut 0]) 0.5] local shift : Math.abs : Middle - [mix xMockLeft (xMockRight + [if (slabType === SLAB-NONE) 0 SideJut]) 0.5]
local xLeft : xMockLeft - shift local xLeft : xMockLeft - shift
local xRight : xMockRight - shift local xRight : xMockRight - shift
include : RightHalfBody xLeft xRight XH include : RightHalfBody xLeft xRight XH
include : RightHalfSerifs slabType XH 0 xLeft xRight include : RightHalfHSerifs slabType XH 0 xLeft xRight
define enGheDf : DivFrame para.advanceScaleM 3 define enGheDf : DivFrame para.advanceScaleM 3