Mark adjustments
This commit is contained in:
parent
e6695e62bf
commit
67a79b80ea
10 changed files with 53 additions and 32 deletions
|
@ -7,6 +7,7 @@ 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-Adjustment : ExtendBelowBaseAnchors
|
||||||
glyph-block-import Letter-Shared : CreateAccentedComposition
|
glyph-block-import Letter-Shared : CreateAccentedComposition
|
||||||
glyph-block-import Letter-Shared-Shapes : SerifedArcStart_RtlLhs SerifedArcStart_LtrRhs
|
glyph-block-import Letter-Shared-Shapes : SerifedArcStart_RtlLhs SerifedArcStart_LtrRhs
|
||||||
glyph-block-import Letter-Shared-Shapes : InwardSlabArcStart_RtlLhs InwardSlabArcStart_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
|
RetroflexHook (RightSB - HVContrast * [RetroflexHook.sw Stroke]) 0
|
||||||
derive-composites 'latn/epsilonRevRetroflexHook' 0x1D94 'latn/epsilonRev/descBase'
|
derive-composites 'latn/epsilonRevRetroflexHook' 0x1D94 'latn/epsilonRev/descBase'
|
||||||
RetroflexHook SB 0
|
RetroflexHook SB 0
|
||||||
|
ExtendBelowBaseAnchors (-Hook)
|
||||||
|
|
||||||
CreateAccentedComposition 'cyrl/Ksi' 0x46E 'cyrl/KsiBase' 'caronAbove'
|
CreateAccentedComposition 'cyrl/Ksi' 0x46E 'cyrl/KsiBase' 'caronAbove'
|
||||||
CreateAccentedComposition 'cyrl/ksi' 0x46F 'cyrl/ksiBase' 'caronAbove'
|
CreateAccentedComposition 'cyrl/ksi' 0x46F 'cyrl/ksiBase' 'caronAbove'
|
||||||
|
|
|
@ -129,9 +129,8 @@ glyph-block Letter-Latin-Long-S : begin
|
||||||
alias 'esh' 0x283 'longs.flatHookTailed'
|
alias 'esh' 0x283 'longs.flatHookTailed'
|
||||||
|
|
||||||
derive-composites 'eshPalatalHook' 0x1D8B 'esh'
|
derive-composites 'eshPalatalHook' 0x1D8B 'esh'
|
||||||
difference
|
PalatalHook (x -- RightSB) (y -- 0) (xAttach -- Middle) (refSw -- [AdviceStroke 3])
|
||||||
PalatalHook (x -- RightSB) (y -- 0) (xAttach -- Middle) (refSw -- [AdviceStroke 3])
|
maskOut -- [intersection [MaskBelow 0] [MaskLeft (Middle + HVContrast * HalfStroke)]]
|
||||||
intersection [MaskBelow 0] [MaskLeft (Middle + HVContrast * HalfStroke)]
|
|
||||||
create-glyph 'eshRetroflexHook' 0x1D98 : glyph-proc
|
create-glyph 'eshRetroflexHook' 0x1D98 : glyph-proc
|
||||||
include : MarkSet.if
|
include : MarkSet.if
|
||||||
include : LongSShape Ascender (Descender + Hook) (HookX + 0.25 * Stroke) Hook
|
include : LongSShape Ascender (Descender + Hook) (HookX + 0.25 * Stroke) Hook
|
||||||
|
|
|
@ -8,6 +8,7 @@ glyph-module
|
||||||
glyph-block Letter-Latin-C : begin
|
glyph-block Letter-Latin-C : begin
|
||||||
glyph-block-import CommonShapes
|
glyph-block-import CommonShapes
|
||||||
glyph-block-import Common-Derivatives
|
glyph-block-import Common-Derivatives
|
||||||
|
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
|
||||||
glyph-block-import Letter-Shared : CreateAccentedComposition
|
glyph-block-import Letter-Shared : CreateAccentedComposition
|
||||||
glyph-block-import Letter-Shared-Shapes : SerifFrame CurlyTail DToothlessRise ArcStartHookTop
|
glyph-block-import Letter-Shared-Shapes : SerifFrame CurlyTail DToothlessRise ArcStartHookTop
|
||||||
glyph-block-import Letter-Shared-Shapes : SerifedArcStart_RtlLhs SerifedArcStart_LtrRhs
|
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'
|
alias 'grek/revLunateSmallSigma' 0x37B 'revSmallC.serifless'
|
||||||
|
|
||||||
turned 'turnc/turnDescBase' null 'c/turnDescBase' Middle (XH / 2)
|
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
|
define [LunateSigmaShape k fRound kdr] : begin
|
||||||
local halfDotWidth : kdr * [Math.min DotRadius ((RightSB - SB - HVContrast * Stroke * 2) / 4)]
|
local halfDotWidth : kdr * [Math.min DotRadius ((RightSB - SB - HVContrast * Stroke * 2) / 4)]
|
||||||
|
|
|
@ -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-Shapes : FlatHookDepth RetroflexHook
|
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-Shared-Metrics : markExtend markStroke markStress markFine
|
||||||
glyph-block-import Mark-Above : aboveMarkTop aboveMarkBot aboveMarkMid aboveMarkStack
|
glyph-block-import Mark-Above : aboveMarkTop aboveMarkBot aboveMarkMid aboveMarkStack
|
||||||
|
|
||||||
|
@ -217,10 +217,12 @@ glyph-block Letter-Latin-Lower-E : begin
|
||||||
select-variant 'schwa' 0x259
|
select-variant 'schwa' 0x259
|
||||||
alias 'cyrl/schwa' 0x4D9 'turne'
|
alias 'cyrl/schwa' 0x4D9 'turne'
|
||||||
|
|
||||||
derive-composites 'schwaRetroflexHook' 0x1D95 'schwa' : RetroflexHook.r
|
derive-composites 'schwaRetroflexHook' 0x1D95 'schwa'
|
||||||
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
|
RetroflexHook.r
|
||||||
y -- 0
|
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
|
||||||
yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75]
|
y -- 0
|
||||||
|
yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75]
|
||||||
|
ExtendBelowBaseAnchors (-Hook)
|
||||||
|
|
||||||
select-variant 'eRev' 0x258 (follow -- 'e')
|
select-variant 'eRev' 0x258 (follow -- 'e')
|
||||||
|
|
||||||
|
|
|
@ -150,16 +150,12 @@ glyph-block Letter-Latin-Lower-G : begin
|
||||||
define dfSub : DivFrame 0.75 2
|
define dfSub : DivFrame 0.75 2
|
||||||
include : bodyShape dfSub XH
|
include : bodyShape dfSub XH
|
||||||
include : hookShape dfSub (XH - hookStart)
|
include : hookShape dfSub (XH - hookStart)
|
||||||
include : difference
|
include : PalatalHook
|
||||||
PalatalHook
|
x -- RightSB
|
||||||
x -- RightSB
|
y -- 0
|
||||||
y -- 0
|
xAttach -- dfSub.rightSB
|
||||||
xAttach -- dfSub.rightSB
|
refSw -- dfSub.mvs
|
||||||
refSw -- dfSub.mvs
|
maskOut -- [intersection [MaskBelow 0] [MaskLeft dfSub.rightSB]]
|
||||||
intersection
|
|
||||||
MaskBelow 0
|
|
||||||
MaskLeft dfSub.rightSB
|
|
||||||
|
|
||||||
|
|
||||||
select-variant 'g' 'g'
|
select-variant 'g' 'g'
|
||||||
link-reduced-variant 'g/sansSerif' 'g' MathSansSerif
|
link-reduced-variant 'g/sansSerif' 'g' MathSansSerif
|
||||||
|
|
|
@ -272,11 +272,12 @@ glyph-block Letter-Latin-Lower-I : begin
|
||||||
create-glyph "lPalatalHook.\(suffix)" : glyph-proc
|
create-glyph "lPalatalHook.\(suffix)" : glyph-proc
|
||||||
include [refer-glyph "l.\(suffix)"] AS_BASE ALSO_METRICS
|
include [refer-glyph "l.\(suffix)"] AS_BASE ALSO_METRICS
|
||||||
local { attach posX maskY } : calcPhoneticHookPos currentGlyph
|
local { attach posX maskY } : calcPhoneticHookPos currentGlyph
|
||||||
include : intersection [MaskBelow maskY] : PalatalHook
|
include : PalatalHook
|
||||||
x -- posX
|
x -- posX
|
||||||
y -- 0
|
y -- 0
|
||||||
xAttach -- attach.x
|
xAttach -- attach.x
|
||||||
yOverflow -- Stroke
|
yOverflow -- Stroke
|
||||||
|
maskOut -- [MaskAbove maskY]
|
||||||
|
|
||||||
do "i glyphs"
|
do "i glyphs"
|
||||||
select-variant 'dotlessi' 0x131
|
select-variant 'dotlessi' 0x131
|
||||||
|
|
|
@ -65,9 +65,10 @@ glyph-block Letter-Latin-Lower-P : begin
|
||||||
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
|
x -- [mix (Middle + CorrectionOMidS) RightSB 0.75]
|
||||||
y -- 0
|
y -- 0
|
||||||
yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75]
|
yAttach -- [mix O SmallArchDepthA : archv.yFromX 0.75]
|
||||||
intersection
|
maskOut -- [intersection
|
||||||
MaskBelow 0
|
[MaskBelow 0]
|
||||||
MaskLeft (SB + HVContrast * Stroke + [Math.max (Width / 16) [AdviceStroke 12]])
|
[MaskLeft (SB + HVContrast * Stroke + [Math.max (Width / 16) [AdviceStroke 12]])]
|
||||||
|
]
|
||||||
|
|
||||||
CreateAccentedComposition 'pTildeOver' 0x1D71 'p' 'tildeOverOnBar'
|
CreateAccentedComposition 'pTildeOver' 0x1D71 'p' 'tildeOverOnBar'
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,7 @@ glyph-block Letter-Shared-Metrics : begin
|
||||||
glyph-block Letter-Shared-Shapes : begin
|
glyph-block Letter-Shared-Shapes : begin
|
||||||
glyph-block-import CommonShapes
|
glyph-block-import CommonShapes
|
||||||
glyph-block-import Common-Derivatives
|
glyph-block-import Common-Derivatives
|
||||||
|
glyph-block-import Mark-Adjustment : ExtendBelowBaseAnchors
|
||||||
|
|
||||||
glyph-block-export RightwardTailedBar
|
glyph-block-export RightwardTailedBar
|
||||||
define [RightwardTailedBar] : params [x low high [sw Stroke]] : begin
|
define [RightwardTailedBar] : params [x low high [sw Stroke]] : begin
|
||||||
|
@ -530,17 +531,21 @@ glyph-block Letter-Shared-Shapes : begin
|
||||||
glyph-proc
|
glyph-proc
|
||||||
|
|
||||||
glyph-block-export PalatalHook
|
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 sw : PalatalHook.sw refSw
|
||||||
local hd : FlatHookDepth [DivFrame 1]
|
local hd : FlatHookDepth [DivFrame 1]
|
||||||
if (xAttach < x) : include : HBarBottom xAttach x yAttach
|
include : ExtendBelowBaseAnchors (y - Hook)
|
||||||
include : dispiro
|
include : difference
|
||||||
widths.rhs sw
|
union
|
||||||
flat x (yAttach + yOverflow) [heading Downward]
|
if (xAttach < x) [HBarBottom xAttach x yAttach] [no-shape]
|
||||||
curl x (y + hd.y - Hook - 0.25 * sw)
|
dispiro
|
||||||
arcvh
|
widths.rhs sw
|
||||||
flat (x - hd.x + 0.25 * sw * HVContrast) (y - Hook)
|
flat x (yAttach + yOverflow) [heading Downward]
|
||||||
curl (x - HookX - 0.5 * sw * HVContrast) (y - Hook)
|
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]
|
set PalatalHook.adviceGap : function [refSw]
|
||||||
HVContrast * [PalatalHook.sw refSw] + [Math.max (Width / 16) [AdviceStroke 12]]
|
HVContrast * [PalatalHook.sw refSw] + [Math.max (Width / 16) [AdviceStroke 12]]
|
||||||
|
|
10
font-src/glyphs/marks/adjust.ptl
Normal file
10
font-src/glyphs/marks/adjust.ptl
Normal 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
|
|
@ -12,3 +12,5 @@ export : define [apply] : begin
|
||||||
run-glyph-module "./tie.mjs"
|
run-glyph-module "./tie.mjs"
|
||||||
run-glyph-module "./composite.mjs"
|
run-glyph-module "./composite.mjs"
|
||||||
run-glyph-module "./doppelganger.mjs"
|
run-glyph-module "./doppelganger.mjs"
|
||||||
|
|
||||||
|
run-glyph-module "./adjust.mjs"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue