Skip to content

Commit

Permalink
Refine shape of capital/lower Half H. (#2676)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 authored Feb 8, 2025
1 parent f31c9cd commit 7e7a60e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 28 deletions.
6 changes: 6 additions & 0 deletions changes/33.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- Adjustable via metric override
* \[**Breaking**\] Reordered variants for `W`, `a`, `b`, `g`, `q`, `w`, `α`, Cyrillic `а`, Cyrillic `ф`, and `$`.
* Refine shape of the following characters:
- GREEK CAPITAL LETTER HETA (`U+0370`).
- GREEK SMALL LETTER HETA (`U+0371`).
- CYRILLIC CAPITAL LETTER SHHA (`U+04BA`).
- CYRILLIC CAPITAL LETTER KOMI DJE (`U+0502`) ... CYRILLIC SMALL LETTER KOMI ZJE (`U+0505`).
- CYRILLIC CAPITAL LETTER KOMI LJE (`U+0508`) ... CYRILLIC SMALL LETTER KOMI TJE (`U+050F`).
Expand All @@ -19,4 +21,8 @@
- ARMENIAN SMALL LETTER PIWR (`U+0583`).
- ARMENIAN SMALL LETTER FEH (`U+0586`).
- ARMENIAN SMALL LIGATURE ECH YIWN (`U+0587`).
- LATIN CAPITAL LETTER HALF H (`U+2C75`).
- LATIN SMALL LETTER HALF H (`U+2C76`).
- CYRILLIC CAPITAL LETTER HWE (`U+A694`).
- LATIN CAPITAL LETTER REVERSED HALF H (`U+A7F5`).
- LATIN SMALL LETTER REVERSED HALF H (`U+A7F6`).
65 changes: 37 additions & 28 deletions packages/font-glyphs/src/letter/latin/upper-h.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ glyph-block Letter-Latin-Upper-H : begin
glyph-block-import Letter-Shared-Shapes : SerifFrame RightwardTailedBar
glyph-block-import Letter-Shared-Shapes : LeftHook MidHook EngHook UpwardHookShape
glyph-block-import Letter-Shared-Shapes : CyrDescender CyrTailDescender PalatalHook
glyph-block-import Letter-Latin-Upper-F : xMidBarShrink

define SLAB-NONE 0
define SLAB-TOP-LEFT 1
Expand All @@ -25,7 +26,6 @@ glyph-block Letter-Latin-Upper-H : begin
define SLAB-ALL 4
define SLAB-ALL-BGR 5
define SLAB-TAILED-CYRILLIC-BGR 6
define SLAB-SMALL-HETA 7

define [HSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
Expand All @@ -37,7 +37,6 @@ glyph-block Letter-Latin-Upper-H : begin
[Just SLAB-ALL] : composite-proc sf.lt.full sf.rt.full 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-SMALL-HETA] : NeedSlab SLAB : begin sf.lt.outer

define [LeftHalfSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
Expand All @@ -49,7 +48,6 @@ glyph-block Letter-Latin-Upper-H : begin
[Just SLAB-ALL] : composite-proc sf.lt.fullSide 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-SMALL-HETA] : NeedSlab SLAB : begin sf.lt.outer

define [RightHalfSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
Expand All @@ -61,7 +59,6 @@ glyph-block Letter-Latin-Upper-H : begin
[Just SLAB-ALL] : composite-proc sf.rt.fullSide 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-SMALL-HETA] : glyph-proc

define [TurnedSerifs slabType t b l r sw] : begin
local sf : SerifFrame t b l r (swRef -- [fallback sw Stroke])
Expand All @@ -73,7 +70,6 @@ glyph-block Letter-Latin-Upper-H : begin
[Just SLAB-ALL] : composite-proc sf.lt.full sf.rt.full sf.rb.fullSide
[Just SLAB-ALL-BGR] : composite-proc sf.lt.outer sf.rt.inner sf.rb.fullSide
[Just SLAB-TAILED-CYRILLIC-BGR] : composite-proc sf.lt.outer sf.rt.inner
[Just SLAB-SMALL-HETA] : NeedSlab SLAB : begin sf.lt.outer

define [HShape l r top _sw] : glyph-proc
local sw : fallback _sw Stroke
Expand Down Expand Up @@ -163,14 +159,16 @@ glyph-block Letter-Latin-Upper-H : begin
topRightSerifed true

foreach { suffix { Body TurnedBody LeftHalfBody RightHalfBody slabType } } [Object.entries HConfig] : do
define fSlab : slabType !== SLAB-NONE

create-glyph "H.\(suffix)" : glyph-proc
include : MarkSet.capital
include : Body SB RightSB CAP
include : HSerifs slabType CAP 0 SB RightSB

create-glyph "grek/Eta.\(suffix)" : glyph-proc
include [refer-glyph "H.\(suffix)"] AS_BASE ALSO_METRICS
include : SetGrekUpperTonos [if (slabType === SLAB-NONE) 0 (-SideJut)]
include : SetGrekUpperTonos [if fSlab (-SideJut) 0]

create-glyph "HTurned.\(suffix)" : glyph-proc
include : MarkSet.capital
Expand All @@ -183,28 +181,44 @@ glyph-block Letter-Latin-Upper-H : begin
include : HSerifs slabType XH 0 SB RightSB

create-glyph "leftHalfH.\(suffix)" : glyph-proc
local df : include : DivFrame para.advanceScaleF
include : df.markSet.capital
include : LeftHalfBody df.leftSB df.rightSB CAP
include : LeftHalfSerifs slabType CAP 0 df.leftSB df.rightSB
include : MarkSet.capital
local xMockLeft : SB * 1.5
local xMockRight : RightSB - [xMidBarShrink fSlab]
local shift : Math.abs : Middle - [mix (xMockLeft - [if fSlab SideJut 0]) xMockRight 0.5]
local xLeft : xMockLeft + shift
local xRight : xMockRight + shift
include : LeftHalfBody xLeft xRight CAP
include : LeftHalfSerifs slabType CAP 0 xLeft xRight

create-glyph "rightHalfH.\(suffix)" : glyph-proc
local df : include : DivFrame para.advanceScaleF
include : df.markSet.capital
include : RightHalfBody df.leftSB df.rightSB CAP
include : RightHalfSerifs slabType CAP 0 df.leftSB df.rightSB
include : MarkSet.capital
local xMockLeft : SB + [xMidBarShrink fSlab]
local xMockRight : Width - SB * 1.5
local shift : Math.abs : Middle - [mix xMockLeft (xMockRight + [if fSlab SideJut 0]) 0.5]
local xLeft : xMockLeft - shift
local xRight : xMockRight - shift
include : RightHalfBody xLeft xRight CAP
include : RightHalfSerifs slabType CAP 0 xLeft xRight

create-glyph "leftHalfSmcpH.\(suffix)" : glyph-proc
local df : include : DivFrame para.advanceScaleF
include : df.markSet.e
include : LeftHalfBody df.leftSB df.rightSB XH
include : LeftHalfSerifs slabType XH 0 df.leftSB df.rightSB
include : MarkSet.e
local xMockLeft : SB * 1.5
local xMockRight : RightSB - [xMidBarShrink fSlab]
local shift : Math.abs : Middle - [mix (xMockLeft - [if fSlab SideJut 0]) xMockRight 0.5]
local xLeft : xMockLeft + shift
local xRight : xMockRight + shift
include : LeftHalfBody xLeft xRight XH
include : LeftHalfSerifs slabType XH 0 xLeft xRight

create-glyph "rightHalfSmcpH.\(suffix)" : glyph-proc
local df : include : DivFrame para.advanceScaleF
include : df.markSet.e
include : RightHalfBody df.leftSB df.rightSB XH
include : RightHalfSerifs slabType XH 0 df.leftSB df.rightSB
include : MarkSet.e
local xMockLeft : SB + [xMidBarShrink fSlab]
local xMockRight : Width - SB * 1.5
local shift : Math.abs : Middle - [mix xMockLeft (xMockRight + [if fSlab SideJut 0]) 0.5]
local xLeft : xMockLeft - shift
local xRight : xMockRight - shift
include : RightHalfBody xLeft xRight XH
include : RightHalfSerifs slabType XH 0 xLeft xRight

define enGheDf : DivFrame para.advanceScaleM 3

Expand Down Expand Up @@ -298,12 +312,7 @@ glyph-block Letter-Latin-Upper-H : begin
select-variant 'cyrl/en.BGR' (shapeFrom -- 'smcpH')

alias 'grek/Heta' 0x370 'leftHalfH'

create-glyph 'grek/heta' 0x371 : glyph-proc
local df : include : DivFrame para.advanceScaleF
include : df.markSet.e
include : LeftHalfBody df.leftSB df.rightSB XH
include : LeftHalfSerifs SLAB-SMALL-HETA XH 0 df.leftSB df.rightSB
alias 'grek/heta' 0x371 : if SLAB 'leftHalfSmcpH.topLeftSerifed' 'leftHalfSmcpH.serifless'

derive-composites 'HDescender' 0x2C67 'H/descBase' [CyrDescender.rSideJut RightSB 0]

Expand Down

0 comments on commit 7e7a60e

Please sign in to comment.