Skip to content

Commit

Permalink
Cleanup of #2684 . (#2685)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcwilliams403 authored Feb 20, 2025
1 parent fa6460d commit cd2661d
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions packages/font-glyphs/src/letter/latin-ext/thorn.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ glyph-block Letter-Latin-Thorn : begin

define xThornLeftStroke : SB * 1.25

define [yThornBowlSymmetricBot top slab] : top * 0.19 + [if slab (Stroke * 0.375) 0]
define [yThornBowlSymmetricTop top slab] : top - [yThornBowlSymmetricBot top slab]

define [yThornBowlAsymmetricBot top slab] : top * 0.25 + [if slab (Stroke * 0.125) 0]
define [yThornBowlAsymmetricTop top slab] : top - 0.7 * [yThornBowlAsymmetricBot top slab] + [if slab (-0.125) 0.25] * Stroke

define [yThornBowlSymmetricBot top slab] : mix [yThornBowlAsymmetricBot top slab] (top - [yThornBowlAsymmetricTop top slab]) 0.5
define [yThornBowlSymmetricTop top slab] : top - [yThornBowlSymmetricBot top slab]

define [ThornShapeImpl top slabTop slabBot yBowlBot yBowlTop] : glyph-proc
local turn : mix yBowlTop yBowlBot (ArchDepthB / (ArchDepthA + ArchDepthB))
local turnRadius : (yBowlTop - yBowlBot) / 2
Expand All @@ -43,14 +43,14 @@ glyph-block Letter-Latin-Thorn : begin
include : LeaningAnchor.Above.VBar.l xThornLeftStroke
include : LeaningAnchor.Below.VBar.l xThornLeftStroke

define [ThornAsymmetricShape top slabTop slabBot] : ThornShapeImpl top slabTop slabBot
yThornBowlAsymmetricBot top slabBot
yThornBowlAsymmetricTop top slabBot

define [ThornSymmetricShape top slabTop slabBot] : ThornShapeImpl top slabTop slabBot
yThornBowlSymmetricBot top slabBot
yThornBowlSymmetricTop top slabBot

define [ThornAsymmetricShape top slabTop slabBot] : ThornShapeImpl top slabTop slabBot
yThornBowlAsymmetricBot top slabBot
yThornBowlAsymmetricTop top slabBot

define ThornConfig : SuffixCfg.weave
object # symmetry
"" ThornSymmetricShape
Expand Down Expand Up @@ -81,13 +81,11 @@ glyph-block Letter-Latin-Thorn : begin
include [refer-glyph "Thorn.\(suffix)"] AS_BASE ALSO_METRICS
include : LetterBarOverlay.l.in
x -- xThornLeftStroke
bot -- (0 + [if doSB Stroke 0])
top -- (0 + [yThornBowlAsymmetricBot CAP doSB])
bot -- [if doSB Stroke 0]
top -- [yThornBowlAsymmetricBot CAP doSB]

select-variant 'Thorn' 0xDE
select-variant 'ThornStroke' 0xA764
select-variant 'ThornStrokeBottom' 0xA766

create-glyph 'grek/Sho' 0x3F7 : glyph-proc
include : MarkSet.capital
include : ThornSymmetricShape CAP SLAB SLAB
alias 'grek/Sho' 0x3F7 : if SLAB 'Thorn.serifed' 'Thorn.serifless'

0 comments on commit cd2661d

Please sign in to comment.