Mark adjustments

This commit is contained in:
be5invis 2022-12-13 20:12:58 -08:00
parent e6695e62bf
commit 67a79b80ea
10 changed files with 53 additions and 32 deletions

View file

@ -7,6 +7,7 @@ glyph-module
glyph-block Letter-Greek-Lower-Epsilon : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
glyph-block-import Letter-Shared : CreateAccentedComposition
glyph-block-import Letter-Shared-Shapes : SerifedArcStart_RtlLhs SerifedArcStart_LtrRhs
glyph-block-import Letter-Shared-Shapes : InwardSlabArcStart_RtlLhs InwardSlabArcStart_LtrRhs
@ -214,6 +215,7 @@ glyph-block Letter-Greek-Lower-Epsilon : begin
RetroflexHook (RightSB - HVContrast * [RetroflexHook.sw Stroke]) 0
derive-composites 'latn/epsilonRevRetroflexHook' 0x1D94 'latn/epsilonRev/descBase'
RetroflexHook SB 0
ExtendBelowBaseAnchors (-Hook)
CreateAccentedComposition 'cyrl/Ksi' 0x46E 'cyrl/KsiBase' 'caronAbove'
CreateAccentedComposition 'cyrl/ksi' 0x46F 'cyrl/ksiBase' 'caronAbove'

View file

@ -129,9 +129,8 @@ glyph-block Letter-Latin-Long-S : begin
alias 'esh' 0x283 'longs.flatHookTailed'
derive-composites 'eshPalatalHook' 0x1D8B 'esh'
difference
PalatalHook (x -- RightSB) (y -- 0) (xAttach -- Middle) (refSw -- [AdviceStroke 3])
intersection [MaskBelow 0] [MaskLeft (Middle + HVContrast * HalfStroke)]
PalatalHook (x -- RightSB) (y -- 0) (xAttach -- Middle) (refSw -- [AdviceStroke 3])
maskOut -- [intersection [MaskBelow 0] [MaskLeft (Middle + HVContrast * HalfStroke)]]
create-glyph 'eshRetroflexHook' 0x1D98 : glyph-proc
include : MarkSet.if
include : LongSShape Ascender (Descender + Hook) (HookX + 0.25 * Stroke) Hook

View file

@ -8,6 +8,7 @@ glyph-module
glyph-block Letter-Latin-C : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
glyph-block-import Letter-Shared : CreateAccentedComposition
glyph-block-import Letter-Shared-Shapes : SerifFrame CurlyTail DToothlessRise ArcStartHookTop
glyph-block-import Letter-Shared-Shapes : SerifedArcStart_RtlLhs SerifedArcStart_LtrRhs
@ -365,7 +366,9 @@ glyph-block Letter-Latin-C : begin
alias 'grek/revLunateSmallSigma' 0x37B 'revSmallC.serifless'
turned 'turnc/turnDescBase' null 'c/turnDescBase' Middle (XH / 2)
derive-composites 'turncRetroflexHook' 0x1D97 'turnc/turnDescBase' : RetroflexHook SB 0
derive-composites 'turncRetroflexHook' 0x1D97 'turnc/turnDescBase'
RetroflexHook SB 0
ExtendBelowBaseAnchors (-Hook)
define [LunateSigmaShape k fRound kdr] : begin
local halfDotWidth : kdr * [Math.min DotRadius ((RightSB - SB - HVContrast * Stroke * 2) / 4)]

View file

@ -9,7 +9,7 @@ glyph-block Letter-Latin-Lower-E : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : FlatHookDepth RetroflexHook
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
glyph-block-import Mark-Shared-Metrics : markExtend markStroke markStress markFine
glyph-block-import Mark-Above : aboveMarkTop aboveMarkBot aboveMarkMid aboveMarkStack
@ -217,10 +217,12 @@ glyph-block Letter-Latin-Lower-E : begin
select-variant 'schwa' 0x259
alias 'cyrl/schwa' 0x4D9 'turne'
derive-composites 'schwaRetroflexHook' 0x1D95 'schwa' : RetroflexHook.r
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
y -- 0
yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75]
derive-composites 'schwaRetroflexHook' 0x1D95 'schwa'
RetroflexHook.r
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
y -- 0
yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75]
ExtendBelowBaseAnchors (-Hook)
select-variant 'eRev' 0x258 (follow -- 'e')

View file

@ -150,16 +150,12 @@ glyph-block Letter-Latin-Lower-G : begin
define dfSub : DivFrame 0.75 2
include : bodyShape dfSub XH
include : hookShape dfSub (XH - hookStart)
include : difference
PalatalHook
x -- RightSB
y -- 0
xAttach -- dfSub.rightSB
refSw -- dfSub.mvs
intersection
MaskBelow 0
MaskLeft dfSub.rightSB
include : PalatalHook
x -- RightSB
y -- 0
xAttach -- dfSub.rightSB
refSw -- dfSub.mvs
maskOut -- [intersection [MaskBelow 0] [MaskLeft dfSub.rightSB]]
select-variant 'g' 'g'
link-reduced-variant 'g/sansSerif' 'g' MathSansSerif

View file

@ -272,11 +272,12 @@ glyph-block Letter-Latin-Lower-I : begin
create-glyph "lPalatalHook.\(suffix)" : glyph-proc
include [refer-glyph "l.\(suffix)"] AS_BASE ALSO_METRICS
local { attach posX maskY } : calcPhoneticHookPos currentGlyph
include : intersection [MaskBelow maskY] : PalatalHook
include : PalatalHook
x -- posX
y -- 0
xAttach -- attach.x
yOverflow -- Stroke
maskOut -- [MaskAbove maskY]
do "i glyphs"
select-variant 'dotlessi' 0x131

View file

@ -65,9 +65,10 @@ glyph-block Letter-Latin-Lower-P : begin
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
y -- 0
yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75]
intersection
MaskBelow 0
MaskLeft (SB + HVContrast * Stroke + [Math.max (Width / 16) [AdviceStroke 12]])
maskOut -- [intersection
[MaskBelow 0]
[MaskLeft (SB + HVContrast * Stroke + [Math.max (Width / 16) [AdviceStroke 12]])]
]
CreateAccentedComposition 'pTildeOver' 0x1D71 'p' 'tildeOverOnBar'

View file

@ -112,6 +112,7 @@ glyph-block Letter-Shared-Metrics : begin
glyph-block Letter-Shared-Shapes : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
glyph-block-export RightwardTailedBar
define [RightwardTailedBar] : params [x low high [sw Stroke]] : begin
@ -530,17 +531,21 @@ glyph-block Letter-Shared-Shapes : begin
glyph-proc
glyph-block-export PalatalHook
define [PalatalHook] : params [x y [xAttach x] [yAttach y] [yOverflow 0] [refSw Stroke]] : glyph-proc
define [PalatalHook] : params [x y [xAttach x] [yAttach y] [yOverflow 0] [refSw Stroke] [maskOut null]] : glyph-proc
local sw : PalatalHook.sw refSw
local hd : FlatHookDepth [DivFrame 1]
if (xAttach < x) : include : HBarBottom xAttach x yAttach
include : dispiro
widths.rhs sw
flat x (yAttach + yOverflow) [heading Downward]
curl x (y + hd.y - Hook - 0.25 * sw)
arcvh
flat (x - hd.x + 0.25 * sw * HVContrast) (y - Hook)
curl (x - HookX - 0.5 * sw * HVContrast) (y - Hook)
include : ExtendBelowBaseAnchors (y - Hook)
include : difference
union
if (xAttach < x) [HBarBottom xAttach x yAttach] [no-shape]
dispiro
widths.rhs sw
flat x (yAttach + yOverflow) [heading Downward]
curl x (y + hd.y - Hook - 0.25 * sw)
arcvh
flat (x - hd.x + 0.25 * sw * HVContrast) (y - Hook)
curl (x - HookX - 0.5 * sw * HVContrast) (y - Hook)
if maskOut maskOut [no-shape]
set PalatalHook.adviceGap : function [refSw]
HVContrast * [PalatalHook.sw refSw] + [Math.max (Width / 16) [AdviceStroke 12]]

View file

@ -0,0 +1,10 @@
$$include '../../meta/macros.ptl'
glyph-module
glyph-block Mark-Adjustment : begin
glyph-block-export ExtendBelowBaseAnchors
define [ExtendBelowBaseAnchors y] : glyph-proc
if currentGlyph.baseAnchors.below : begin
local a : currentGlyph.gizmo.unapply currentGlyph.baseAnchors.below
if (a.y > y) : set-base-anchor 'below' a.x y

View file

@ -12,3 +12,5 @@ export : define [apply] : begin
run-glyph-module "./tie.mjs"
run-glyph-module "./composite.mjs"
run-glyph-module "./doppelganger.mjs"
run-glyph-module "./adjust.mjs"