Skip to content

Commit

Permalink
Fix leaning marks of several phonetic characters. (#2183)
Browse files Browse the repository at this point in the history
* Fix leaning marks of several phonetic characters.

* cont.
  • Loading branch information
jmcwilliams403 authored Jan 27, 2024
1 parent 625cf4b commit 73a53a0
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 17 deletions.
5 changes: 5 additions & 0 deletions changes/28.0.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
* Make Ezh follow variants of `Z`/`z` (#1957).
* Fix serif form for Cyrillic Lower Tall / Iotified Yat (#2178).
* Make top serifs of Cyrillic Lower Straight U (`ү`, `ұ`) and Latin Lower Gamma (`ɣ`) respond to italics.
* Fix leaning marks of Capital Turned/Half H (`U+2C75`, `U+2C76`, `U+A78D`, `U+A7F5`, `U+A7F6`).
* Fix leaning marks of Wynn (`U+01BF`, `U+01F7`).
* Fix leaning marks of Insular R (`U+A782`, `U+A783`).
* Fix leaning marks of Greek/Latin Beta (`U+03B2`, `U+A7B4`, `U+A7B5`).
* Fix leaning marks of Greek Lower San (`U+03FB`).
3 changes: 3 additions & 0 deletions packages/font-glyphs/src/letter/latin-ext/wynn.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ glyph-module
glyph-block Letter-Latin-Wynn : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared-Shapes : SerifFrame SerifedArcStart

define [SerifLT top bot] : return [SerifFrame.fromDf [DivFrame 1] top bot].lt.outer
Expand Down Expand Up @@ -36,12 +37,14 @@ glyph-block Letter-Latin-Wynn : begin
foreach { suffix { Serifs doBS } } [Object.entries WynnConfig] : do
create-glyph "wynn.\(suffix)" : glyph-proc
include : MarkSet.p
include : LeaningAnchor.Below.VBar.l SB
include : WynnShape Descender XH
include : Serifs XH Descender

select-variant 'wynn' 0x1BF

create-glyph 'Wynn' 0x1F7 : glyph-proc
include : MarkSet.capital
include : LeaningAnchor.Below.VBar.l SB
include : WynnShape 0 CAP
if SLAB : include : FullSerifs CAP 0
34 changes: 17 additions & 17 deletions packages/font-glyphs/src/letter/latin/lower-n.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ glyph-block Letter-Latin-Lower-N : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Shared-Metrics : markHalfStroke
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared-Shapes : CurlyTail nShoulder nShoulderKnots nShoulderMask
glyph-block-import Letter-Shared-Shapes : RightwardTailedBar DToothlessRise DMBlend MidHook
glyph-block-import Letter-Shared-Shapes : CyrDescender PalatalHook RetroflexHook EngHook
Expand Down Expand Up @@ -137,21 +138,21 @@ glyph-block Letter-Latin-Lower-N : begin
if sLB : include : sLB [DivFrame 1] 0
if sRB : include : sRB [DivFrame 1] 0

create-glyph "eng.\(suffix)" : glyph-proc
if (!tailed) : create-glyph "eng.\(suffix)" : glyph-proc
include : MarkSet.p
include : Body XH SB RightSB 0 Stroke
include : EngHook RightSB 0 Descender
if sLT : include : sLT [DivFrame 1] XH
if sLB : include : sLB [DivFrame 1] 0

create-glyph "nHookBottom.\(suffix)" : glyph-proc
if (!tailed) : create-glyph "nHookBottom.\(suffix)" : glyph-proc
include : MarkSet.e
include : Body XH SB RightSB 0 Stroke
include : RetroflexHook.rExt RightSB 0
if sLT : include : sLT [DivFrame 1] XH
if sLB : include : sLB [DivFrame 1] 0

create-glyph "nCurlyTail.\(suffix)" : glyph-proc
if (!tailed) : create-glyph "nCurlyTail.\(suffix)" : glyph-proc
include : MarkSet.e
local fine : AdviceStroke 4
local rinner : clamp (Width * 0.065) (XH * 0.05) (fine * 0.35)
Expand All @@ -166,29 +167,27 @@ glyph-block Letter-Latin-Lower-N : begin
if sLT : include : sLT [DivFrame 1] XH
if sLB : include : sLB [DivFrame 1] 0

create-glyph "NExt.\(suffix)" : glyph-proc
create-glyph "latn/Eta.\(suffix)" : glyph-proc
include : MarkSet.capDesc
include : Body CAP SB RightSB [if tailed (CAP - SmallArchDepthB + O) Descender] Stroke
if tailed : include : EndingTail RightSB Descender (CAP - SmallArchDepthB) Stroke
if sLT : include : sLT [DivFrame 1] CAP
if sLB : include : sLB [DivFrame 1] 0
if sRB : include : sRB [DivFrame 1] Descender

create-glyph "nExt.\(suffix)" : glyph-proc
create-glyph "latn/eta.\(suffix)" : glyph-proc
include : MarkSet.p
include : Body XH SB RightSB [if tailed (XH - SmallArchDepthB + O) Descender] Stroke
if tailed : include : EndingTail RightSB Descender (XH - SmallArchDepthB) Stroke
if sLT : include : sLT [DivFrame 1] XH
if sLB : include : sLB [DivFrame 1] 0
if sRB : include : sRB [DivFrame 1] Descender

create-glyph "grek/eta.\(suffix)" : glyph-proc
include : MarkSet.p
if (!tailed && !sRB) : create-glyph "grek/eta.\(suffix)" : glyph-proc
include [refer-glyph "latn/eta.\(suffix)"] AS_BASE ALSO_METRICS
set-base-anchor 'lf' (SB + HalfStroke) 0
include : Body XH SB RightSB Descender Stroke
if sLT : include : sLT [DivFrame 1] XH

create-glyph "nCrossedTail.\(suffix)" : glyph-proc
if (!tailed) : create-glyph "nCrossedTail.\(suffix)" : glyph-proc
include : MarkSet.e
local fine : AdviceStroke 4
local rinner : XH * 0.15 - fine * 0.75
Expand All @@ -206,7 +205,7 @@ glyph-block Letter-Latin-Lower-N : begin
NBottomLeftSerif [DivFrame 1] 0
NBottomLeftOuterSerif [DivFrame 1] 0

create-glyph "engCrossedTail.\(suffix)" : glyph-proc
if (!tailed) : create-glyph "engCrossedTail.\(suffix)" : glyph-proc
include : MarkSet.p
include : Body XH SB RightSB 0 Stroke
local fine : AdviceStroke 3.5
Expand All @@ -220,15 +219,17 @@ glyph-block Letter-Latin-Lower-N : begin
if sLT : include : sLT [DivFrame 1] XH
if sLB : include : sLB [DivFrame 1] 0

create-glyph "RInsular.\(suffix)" : glyph-proc
if (!tailed && !sRB) : create-glyph "RInsular.\(suffix)" : glyph-proc
include : MarkSet.capDesc
include : LeaningAnchor.Below.VBar.l SB
include : Body CAP SB RightSB (-Descender) Stroke
include : RetroflexHook.rExt RightSB (-Descender)
include : VBar.l SB Descender 0
if sLT : include : sLT [DivFrame 1] CAP

create-glyph "rInsular.\(suffix)" : glyph-proc
if (!tailed && !sRB) : create-glyph "rInsular.\(suffix)" : glyph-proc
include : MarkSet.p
include : LeaningAnchor.Below.VBar.l SB
include : Body XH SB RightSB (-Descender) Stroke
include : RetroflexHook.rExt RightSB (-Descender)
include : VBar.l SB Descender 0
Expand All @@ -247,7 +248,7 @@ glyph-block Letter-Latin-Lower-N : begin

include : MidHook.m df XH

create-glyph "cyrl/yat.italic/base.\(suffix)" : glyph-proc
if (!tailed) : create-glyph "cyrl/yat.italic/base.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.e

Expand All @@ -273,14 +274,13 @@ glyph-block Letter-Latin-Lower-N : begin
select-variant 'nCrossedTail' 0xAB3B (follow -- 'eng')
select-variant 'engCrossedTail' 0xAB3C (follow -- 'eng')

select-variant 'eng/lTailBase' (shapeFrom -- 'eng')
select-variant 'RInsular' 0xA782 (follow -- 'eng/lTailBase')
select-variant 'rInsular' 0xA783 (follow -- 'eng/lTailBase')

select-variant 'grek/eta' 0x3B7
link-reduced-variant 'grek/eta/sansSerif' 'grek/eta' MathSansSerif
select-variant 'NExt' 0x220 (follow -- 'n')
select-variant 'nExt' 0x19E (follow -- 'n')
select-variant 'latn/Eta' 0x220 (follow -- 'n')
select-variant 'latn/eta' 0x19E (follow -- 'n')

derive-composites 'nDescender' 0xA791 'n/descBase' [CyrDescender.rSideJut RightSB 0]
derive-composites 'nPalatalHook' 0x1D87 'n/descBase' [PalatalHook.rSideJut RightSB 0]
Expand Down
3 changes: 3 additions & 0 deletions packages/font-glyphs/src/letter/latin/upper-b.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ glyph-module
glyph-block Letter-Latin-Upper-B : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared-Metrics : BowlXDepth
glyph-block-import Letter-Shared-Shapes : ShoulderMidKnotRhs LetterBarOverlay SerifFrame LeftHook
glyph-block-import Letter-Blackboard : BBS BBD
Expand Down Expand Up @@ -167,6 +168,7 @@ glyph-block Letter-Latin-Upper-B : begin

create-glyph "latn/Beta.\(suffix)" : glyph-proc
include : MarkSet.capDesc
include : LeaningAnchor.Below.VBar.l SB
include : body CAP [AdviceStroke2 2 3 CAP] ts false
include : VBar.l SB Descender 0
if bs : begin
Expand Down Expand Up @@ -240,6 +242,7 @@ glyph-block Letter-Latin-Upper-B : begin

create-glyph 'grek/beta' 0x3B2 : glyph-proc
include : MarkSet.bp
include : LeaningAnchor.Below.VBar.l SB
define pBar 0.55
define fine : Stroke * CThin
define yMiddle : [mix 0 Ascender pBar] - Stroke * 0.7 # Bottom edge
Expand Down
10 changes: 10 additions & 0 deletions packages/font-glyphs/src/letter/latin/upper-h.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ glyph-block Letter-Latin-Upper-H : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Shared-Metrics : markExtend
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Mark-Below : belowMarkMid
glyph-block-import Letter-Blackboard : BBS BBD
glyph-block-import Letter-Shared : SetGrekUpperTonos
Expand Down Expand Up @@ -114,6 +115,7 @@ glyph-block Letter-Latin-Upper-H : begin

create-glyph "HTurned.\(suffix)" : glyph-proc
include : MarkSet.capital
include : LeaningAnchor.Below.VBar.r RightSB
include : TurnedBody SB RightSB CAP
include : HSerifs slabType CAP 0 SB RightSB
eject-contour 'serifLB'
Expand All @@ -125,6 +127,8 @@ glyph-block Letter-Latin-Upper-H : begin

create-glyph "leftHalfH.\(suffix)" : glyph-proc
include : MarkSet.capital
include : LeaningAnchor.Above.VBar.l SB
include : LeaningAnchor.Below.VBar.l SB
include : Body SB RightSB CAP
eject-contour 'strokeR'
include : HSerifs slabType CAP 0 SB RightSB
Expand All @@ -133,6 +137,8 @@ glyph-block Letter-Latin-Upper-H : begin

create-glyph "rightHalfH.\(suffix)" : glyph-proc
include : MarkSet.capital
include : LeaningAnchor.Above.VBar.r RightSB
include : LeaningAnchor.Below.VBar.r RightSB
include : Body SB RightSB CAP
eject-contour 'strokeL'
include : HSerifs slabType CAP 0 SB RightSB
Expand All @@ -141,6 +147,8 @@ glyph-block Letter-Latin-Upper-H : begin

create-glyph "leftHalfSmcpH.\(suffix)" : glyph-proc
include : MarkSet.e
include : LeaningAnchor.Above.VBar.l SB
include : LeaningAnchor.Below.VBar.l SB
include : Body SB RightSB XH
eject-contour 'strokeR'
include : HSerifs slabType XH 0 SB RightSB
Expand All @@ -149,6 +157,8 @@ glyph-block Letter-Latin-Upper-H : begin

create-glyph "rightHalfSmcpH.\(suffix)" : glyph-proc
include : MarkSet.e
include : LeaningAnchor.Above.VBar.r RightSB
include : LeaningAnchor.Below.VBar.r RightSB
include : Body SB RightSB XH
eject-contour 'strokeL'
include : HSerifs slabType XH 0 SB RightSB
Expand Down
2 changes: 2 additions & 0 deletions packages/font-glyphs/src/letter/latin/upper-m.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ glyph-module
glyph-block Letter-Latin-Upper-M : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : LeaningAnchor
glyph-block-import Letter-Shared : CreateTurnedLetter
glyph-block-import Letter-Shared-Shapes : SerifFrame CyrTailDescender PalatalHook

Expand Down Expand Up @@ -147,6 +148,7 @@ glyph-block Letter-Latin-Upper-M : begin
create-glyph "smcpMWithDescender.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityM 3
include : df.markSet.p
include : LeaningAnchor.Below.VBar.l df.leftSB
include : MShape XH df form slab slanted

create-glyph "cyrl/EmSoft.\(suffix)" : glyph-proc
Expand Down

0 comments on commit 73a53a0

Please sign in to comment.