Make ɚ/ɝ slightly wider under Quasi-Proportional. (#2636)

This commit is contained in:
John McWilliams 2025-01-06 20:44:25 -05:00 committed by GitHub
parent 52c5e55053
commit 70554e6b50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 63 additions and 62 deletions

View file

@ -1,5 +1,8 @@
* Add `curved` variant for `¶` (#2045). * Add `curved` variant for `¶` (#2045).
* Add `top-cut` variants for `a`/`g`/`q`. * Add `top-cut` variants for `a`/`g`/`q`.
* Add `bottom-cut` variants for `b`. * Add `bottom-cut` variants for `b`.
Make certain characters slightly wider under Quasi-Proportional. Affected characters:
- LATIN SMALL LETTER SCHWA WITH HOOK (`U+025A`).
- LATIN SMALL LETTER REVERSED OPEN E WITH HOOK (`U+025D`).
* Add characters: * Add characters:
- CURVED STEM PARAGRAPH SIGN ORNAMENT (`U+2761`). - CURVED STEM PARAGRAPH SIGN ORNAMENT (`U+2761`).

View file

@ -1669,35 +1669,6 @@ glyph-block Autobuild-Pnonetic-Ligatures : begin
createPhoneticLigatures ToLetter 'thSlash' 1 2 stdShrink 1 : list createPhoneticLigatures ToLetter 'thSlash' 1 2 stdShrink 1 : list
list 0x1D7A { 't/phoneticLeft1' 'h' 'wideSlash' } 'b' list 0x1D7A { 't/phoneticLeft1' 'h' 'wideSlash' } 'b'
glyph-block Autobuild-Rhotic : begin
glyph-block-import Mark-Shared-Metrics : markFine
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Recursive-Build : Widen
glyph-block-import Letter-Latin-Rhotic : ErTail
glyph-block-import Autobuild-Transformed-Shared : extendRelatedGlyphs link-relations
define [createRhotics groupName yTail _records] : begin
local {records relSets targetNameMap} : extendRelatedGlyphs "rhotic_\(groupName)" _records
local pendingGlyphs : records.map : [record] => record.1
local thinFont : Widen pendingGlyphs 0.85 1
foreach {unicode glyphid pri} [items-of records]
if [not : query-glyph targetNameMap.(glyphid)]
create-glyph (targetNameMap.(glyphid)) unicode : glyph-proc
if [not : thinFont.queryByName glyphid] : begin
throw : new Error "Cannot find glyph \(glyphid)"
include : MarkSet.e
include : thinFont.queryByName glyphid
include : ErTail (Width * 0.85 - SB - [HSwToV : 1.25 * markFine]) yTail (XH * 0.2)
link-relations relSets
return { targetNameMap records }
createRhotics 'er' (XH / 2)
list { 0x25A 'schwa' }
createRhotics 'revLatinEpsilonEr' (XH * [mix 0.65 1 0.5])
list { 0x25D 'latn/epsilonRev' }
glyph-block Autobuild-Double-Emotions : begin glyph-block Autobuild-Double-Emotions : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives

View file

@ -9,13 +9,15 @@ glyph-module
glyph-block Letter-Greek-Lower-Epsilon : begin glyph-block Letter-Greek-Lower-Epsilon : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Mark-Shared-Metrics : markFine
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
glyph-block-import Letter-Shared : CreateTurnedLetter glyph-block-import Letter-Shared : CreateTurnedLetter
glyph-block-import Letter-Shared-Shapes : SerifedArcStart SerifedArcEnd SerifFrame glyph-block-import Letter-Shared-Shapes : SerifedArcStart SerifedArcEnd SerifFrame
glyph-block-import Letter-Shared-Shapes : InwardSlabArcStart InwardSlabArcEnd glyph-block-import Letter-Shared-Shapes : InwardSlabArcStart InwardSlabArcEnd
glyph-block-import Letter-Shared-Shapes : ArcStartSerif ArcEndSerif glyph-block-import Letter-Shared-Shapes : ArcStartSerif ArcEndSerif
glyph-block-import Letter-Shared-Shapes : OBarLeft OBarRight glyph-block-import Letter-Shared-Shapes : OBarLeft OBarRight
glyph-block-import Letter-Shared-Shapes : DToothlessRise RetroflexHook CyrDescender UpwardHookShape glyph-block-import Letter-Shared-Shapes : DToothlessRise RetroflexHook CyrDescender
glyph-block-import Letter-Shared-Shapes : UpwardHookShape RhoticHookShape
define SLAB-NONE 0 define SLAB-NONE 0
define SLAB-CLASSICAL 1 define SLAB-CLASSICAL 1
@ -262,6 +264,20 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
VBar.m [arch.adjust-x.bot Middle] desc (Stroke + O) VJutStroke VBar.m [arch.adjust-x.bot Middle] desc (Stroke + O) VJutStroke
zeNoO.ShapeMask zeNoO.ShapeMask
create-glyph "cyrl/zeRhoticHook.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityM 1
include : df.markSet.e
local divSub : Math.min 1 : 0.85 * para.diversityM
local dfSub : DivFrame divSub 2
local stroke : AdviceStroke2 2 3 XH divSub
local ze : CyrZe slabTop slabBot XH 0
left -- dfSub.leftSB
right -- dfSub.rightSB
hook -- SHook
stroke -- stroke
include : union [ze.Shape] [ze.AutoStartSerifL] [ze.AutoEndSerifL]
include : RhoticHookShape (dfSub.rightSB - [HSwToV : 1.25 * markFine]) df.width (XH * 0.825) (XH * 0.2)
create-glyph "cyrl/DzjeKomi.\(suffix)" : glyph-proc create-glyph "cyrl/DzjeKomi.\(suffix)" : glyph-proc
include : MarkSet.capital include : MarkSet.capital
local ze : CyrZe slabTop OPEN-VERTICAL CAP 0 (hook -- Hook) local ze : CyrZe slabTop OPEN-VERTICAL CAP 0 (hook -- Hook)
@ -537,7 +553,6 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
include : MarkSet.e include : MarkSet.e
include : Base df XH Slabs SHook SmallArchDepthA SmallArchDepthB include : Base df XH Slabs SHook SmallArchDepthA SmallArchDepthB
select-variant 'AeVolapuk' 0xA79A (follow -- [conditional-follow SLAB 'a/singleStorey/autoSerifed/slab' 'a/singleStorey/autoSerifed/sans']) select-variant 'AeVolapuk' 0xA79A (follow -- [conditional-follow SLAB 'a/singleStorey/autoSerifed/slab' 'a/singleStorey/autoSerifed/sans'])
select-variant 'aeVolapuk' 0xA79B (follow -- [conditional-follow SLAB 'a/singleStorey/autoSerifed/slab' 'a/singleStorey/autoSerifed/sans']) select-variant 'aeVolapuk' 0xA79B (follow -- [conditional-follow SLAB 'a/singleStorey/autoSerifed/slab' 'a/singleStorey/autoSerifed/sans'])
select-variant 'UeVolapuk' 0xA79E (follow -- 'u') select-variant 'UeVolapuk' 0xA79E (follow -- 'u')
@ -559,6 +574,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
alias 'latn/EpsilonRev' 0xA7AB 'cyrl/Ze' alias 'latn/EpsilonRev' 0xA7AB 'cyrl/Ze'
alias 'latn/epsilonRev' 0x25C 'cyrl/ze' alias 'latn/epsilonRev' 0x25C 'cyrl/ze'
select-variant 'latn/epsilonRevRhoticHook' 0x25D (shapeFrom -- 'cyrl/zeRhoticHook') (follow -- 'cyrl/ze')
select-variant 'cyrl/KsiBase' (follow -- 'cyrl/ZeTopSerifOnly') select-variant 'cyrl/KsiBase' (follow -- 'cyrl/ZeTopSerifOnly')
select-variant 'cyrl/ksiBase' (follow -- 'cyrl/zeTopSerifOnly') select-variant 'cyrl/ksiBase' (follow -- 'cyrl/zeTopSerifOnly')

View file

@ -8,30 +8,14 @@ glyph-module
glyph-block Letter-Latin-Rhotic : begin glyph-block Letter-Latin-Rhotic : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Mark-Shared-Metrics : markFine glyph-block-import Letter-Shared-Shapes : RhoticHookShape
glyph-block-export ErTail
define [ErTail left y rise w dohook] : glyph-proc
local right Width
local mid : mix left right 0.5
local sw : fallback w [AdviceStroke 5]
include : dispiro
widths.rhs sw
g2 (left - [HSwToV : 0.5 * sw]) (y)
g2 (mid - [HSwToV : 0.5 * sw]) (y + rise)
include : dispiro
widths.center sw
flat mid (y + rise) [heading Downward]
curl mid (y + [if dohook 0 (rise - 1)]) [heading Downward]
if dohook {[hookend (y - rise) (sw -- sw)]} {[arcvh]}
g4 (right - [if dohook sw 0]) (y - [if dohook (rise * 0.5) rise]) [if dohook nothing [heading Rightward]]
create-glyph 'rhoticHook' 0x2DE : glyph-proc create-glyph 'rhoticHook' 0x2DE : glyph-proc
include : ErTail (-[HSwToV Stroke]) (XH / 2) (XH * 0.3) Stroke true include : RhoticHookShape (-[HSwToV Stroke]) Width (XH / 2) (XH * 0.3) Stroke true
create-glyph 'rhoticHook/sup' : glyph-proc create-glyph 'rhoticHook/sup' : glyph-proc
local sw : [AdviceStroke 3.5] / 0.7 local sw : [AdviceStroke 3.5] / 0.7
include : ErTail (-[HSwToV Stroke] - 3 * SB) (XH / 2) (XH * 0.3) sw true include : RhoticHookShape (-[HSwToV Stroke] - 3 * SB) Width (XH / 2) (XH * 0.3) sw true
include : Ungizmo include : Ungizmo
include : Translate (-Middle) (-CAP) include : Translate (-Middle) (-CAP)
include : Scale 0.7 include : Scale 0.7

View file

@ -9,7 +9,7 @@ glyph-block Letter-Latin-Lower-E : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared : CreateSelectorVariants DefineSelectorGlyph CreateTurnedLetter glyph-block-import Letter-Shared : CreateSelectorVariants DefineSelectorGlyph CreateTurnedLetter
glyph-block-import Letter-Shared-Shapes : FlatHookDepth RetroflexHook glyph-block-import Letter-Shared-Shapes : FlatHookDepth RetroflexHook RhoticHookShape
glyph-block-import Letter-Shared-Shapes : SerifedArcEnd InwardSlabArcEnd ArcEndSerif glyph-block-import Letter-Shared-Shapes : SerifedArcEnd InwardSlabArcEnd ArcEndSerif
glyph-block-import Mark-Shared-Metrics : markExtend markStroke markStress markFine glyph-block-import Mark-Shared-Metrics : markExtend markStroke markStress markFine
glyph-block-import Mark-Above : aboveMarkTop aboveMarkBot aboveMarkMid aboveMarkStack glyph-block-import Mark-Above : aboveMarkTop aboveMarkBot aboveMarkMid aboveMarkStack
@ -235,6 +235,19 @@ glyph-block Letter-Latin-Lower-E : begin
include [refer-glyph "e.\(suffix)"] AS_BASE ALSO_METRICS include [refer-glyph "e.\(suffix)"] AS_BASE ALSO_METRICS
include : FlipAround Middle (XH / 2) include : FlipAround Middle (XH / 2)
create-glyph "schwaRhoticHook.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityM 1
include : df.markSet.e
local divSub : Math.min 1 : 0.85 * para.diversityM
local dfSub : DivFrame divSub 2
local stroke : AdviceStroke2 2 3 XH divSub
include : Body dfSub XH
stroke -- stroke
ada -- [dfSub.archDepthA SmallArchDepth stroke]
adb -- [dfSub.archDepthB SmallArchDepth stroke]
include : FlipAround dfSub.middle (XH / 2)
include : RhoticHookShape (dfSub.rightSB - [HSwToV : 1.25 * markFine]) df.width (XH * 0.5) (XH * 0.2)
create-glyph "schwaRetroflexHook.\(suffix)" : glyph-proc create-glyph "schwaRetroflexHook.\(suffix)" : glyph-proc
local df : include : DivFrame para.diversityM 1 local df : include : DivFrame para.diversityM 1
include : df.markSet.e include : df.markSet.e
@ -340,6 +353,7 @@ glyph-block Letter-Latin-Lower-E : begin
select-variant 'Schwa' 0x18F select-variant 'Schwa' 0x18F
select-variant 'schwa' 0x259 select-variant 'schwa' 0x259
select-variant 'schwaRhoticHook' 0x25A (follow -- 'schwa')
select-variant 'schwaRetroflexHook' 0x1D95 (follow -- 'schwa') select-variant 'schwaRetroflexHook' 0x1D95 (follow -- 'schwa')
select-variant 'eRev' 0x258 (follow -- 'e') select-variant 'eRev' 0x258 (follow -- 'e')

View file

@ -160,8 +160,7 @@ glyph-block Letter-Shared-Shapes : begin
flat (x + hookTurn) (high - overshoot) [heading Rightward] flat (x + hookTurn) (high - overshoot) [heading Rightward]
curl (x + hookDepth + sw * TanSlope) (high - overshoot) curl (x + hookDepth + sw * TanSlope) (high - overshoot)
glyph-block-export DToothlessRise glyph-block-export DToothlessRise DMBlend
glyph-block-export DMBlend
define DToothlessRise : Hook * 0.25 + Stroke / 16 define DToothlessRise : Hook * 0.25 + Stroke / 16
define DMBlend 0.80 define DMBlend 0.80
@ -589,7 +588,7 @@ glyph-block Letter-Shared-Shapes : begin
glyph-block-export ArcStartSerifDepth glyph-block-export ArcStartSerifDepth
define [ArcStartSerifDepth hook] : hook - 0 define [ArcStartSerifDepth hook] : hook - 0
define [ArcStartInwardSerifDepth hook stroke] : Math.max hook (DToothlessRise + stroke) define [ArcStartInwardSerifDepth hook stroke] : Math.max hook : DToothlessRise + stroke
glyph-block-export : ArcStartSerif glyph-block-export : ArcStartSerif
define ArcStartSerif : namespace define ArcStartSerif : namespace
@ -641,8 +640,8 @@ glyph-block Letter-Shared-Shapes : begin
define dxTurn : [HSwToV : 0.5 * sw] + rIn + 0.5 * sign * TanSlope * fine define dxTurn : [HSwToV : 0.5 * sw] + rIn + 0.5 * sign * TanSlope * fine
define dxTailStart : dxTurn + sinAngle * (r * [mix 1 HVContrast sinAngle]) define dxTailStart : dxTurn + sinAngle * (r * [mix 1 HVContrast sinAngle])
define dyTailStart : (rIn + fine) - cosAngle * r define dyTailStart : (rIn + fine) - cosAngle * r
define dxDepth : (depth - 0.25 * sw) * +dSinAngle define dxDepth : (depth - 0.25 * sw) * (+dSinAngle)
define dyDepth : (depth - 0.25 * sw) * -dCosAngle define dyDepth : (depth - 0.25 * sw) * (-dCosAngle)
return : list return : list
g4.[if (sign > 0) "right" "left"].mid g4.[if (sign > 0) "right" "left"].mid
cx + sign * dxTurn cx + sign * dxTurn
@ -688,7 +687,7 @@ glyph-block Letter-Shared-Shapes : begin
define [JutIn left right jut swRef hSplit] : begin define [JutIn left right jut swRef hSplit] : begin
local ink : HSwToV swRef local ink : HSwToV swRef
local gap : (right - left - hSplit * ink) / (hSplit - 1) local gap : (right - left - hSplit * ink) / (hSplit - 1)
Math.min jut (0.5 * ink + [Math.max (Stroke * TanSlope) (0.375 * gap)]) Math.min jut : 0.5 * ink + [Math.max (Stroke * TanSlope) (0.375 * gap)]
class CSerifFrame class CSerifFrame
public [new top bot left right swRef swSerif div hSplit fForceSymmetric] : begin public [new top bot left right swRef swSerif div hSplit fForceSymmetric] : begin
@ -707,7 +706,7 @@ glyph-block Letter-Shared-Shapes : begin
local jutFS MidJutSide local jutFS MidJutSide
local jut : mix [HSwToV : 0.5 * swRef] Jut [Math.min 1 : div * 2.25 / hSplit] local jut : mix [HSwToV : 0.5 * swRef] Jut : Math.min 1 : div * 2.25 / hSplit
local sideJut : jut - 0.5 * ink local sideJut : jut - 0.5 * ink
local jutIn : if fForceSymmetric jut : JutIn left right jut swRef hSplit local jutIn : if fForceSymmetric jut : JutIn left right jut swRef hSplit
@ -824,6 +823,20 @@ glyph-block Letter-Shared-Shapes : begin
flat right ada flat right ada
curl right yend [heading Upward] curl right yend [heading Upward]
glyph-block-export RhoticHookShape
define [RhoticHookShape] : with-params [left right y rise [sw [AdviceStroke 5]] [doHook false]] : glyph-proc
local mid : mix left right 0.5
include : dispiro
widths.rhs sw
g2 (left - [HSwToV : 0.5 * sw]) (y)
g2 (mid - [HSwToV : 0.5 * sw]) (y + rise)
include : dispiro
widths.center sw
flat mid (y + rise) [heading Downward]
curl mid (y + [if doHook 0 (rise - 1)]) [heading Downward]
if doHook {[hookend (y - rise) (sw -- sw)]} {[arcvh]}
g4 (right - [if doHook sw 0]) (y - [if doHook (rise * 0.5) rise]) [if doHook nothing [heading Rightward]]
# Generic "connected" vertical hooks # Generic "connected" vertical hooks
glyph-block-export VerticalHook glyph-block-export VerticalHook
define VerticalHook : namespace define VerticalHook : namespace
@ -941,7 +954,7 @@ glyph-block Letter-Shared-Shapes : begin
xDepth -- (-TailX) xDepth -- (-TailX)
yDepth -- TailY yDepth -- TailY
sw -- sw sw -- sw
yExtension -- [Math.max 0 (yAttach + yOverflow - y + (fullDepth - TailY))] yExtension -- [Math.max 0 : yAttach + yOverflow - y + (fullDepth - TailY)]
if maskOut maskOut [no-shape] if maskOut maskOut [no-shape]
# Retroflex hooks # Retroflex hooks
@ -957,7 +970,7 @@ glyph-block Letter-Shared-Shapes : begin
xDepth -- TailX xDepth -- TailX
yDepth -- TailY yDepth -- TailY
sw -- sw sw -- sw
yExtension -- [Math.max 0 (yAttach + yOverflow - y + (fullDepth - TailY))] yExtension -- [Math.max 0 : yAttach + yOverflow - y + (fullDepth - TailY)]
# Cyrillic "Middle Hook" Characters # Cyrillic "Middle Hook" Characters
glyph-block-export MidHook glyph-block-export MidHook
@ -983,7 +996,7 @@ glyph-block Letter-Shared-Shapes : begin
ada -- ArchDepthA ada -- ArchDepthA
adb -- ArchDepthB adb -- ArchDepthB
sw -- df.mvs sw -- df.mvs
xDepth -- (-[Math.max [HSwToV df.mvs] : Math.min HookX (0.5 * (df.rightSB - df.leftSB - [HSwToV : 2 * df.mvs]))]) xDepth -- (-[Math.max [HSwToV df.mvs] : Math.min HookX : 0.5 * (df.rightSB - df.leftSB) - [HSwToV df.mvs]])
# Hook for Eng shape # Hook for Eng shape
glyph-block-export EngHook glyph-block-export EngHook