From fe856988f604e1be1036d4700d057dc02af9b20a Mon Sep 17 00:00:00 2001 From: be5invis Date: Sun, 4 Oct 2020 21:38:26 -0700 Subject: [PATCH] Add flat hooked but tailed variants for `f` (`VXEX` ... `VXFA`) (#697). --- changes/3.6.4.md | 1 + font-src/glyphs/letter/latin.ptl | 38 +++++++++++++++++++++++++++++--- params/variants.toml | 24 ++++++++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 changes/3.6.4.md diff --git a/changes/3.6.4.md b/changes/3.6.4.md new file mode 100644 index 000000000..fb9369ee3 --- /dev/null +++ b/changes/3.6.4.md @@ -0,0 +1 @@ + * Add flat hooked but tailed variants for `f` (`VXEX` ... `VXFA`) (#697). \ No newline at end of file diff --git a/font-src/glyphs/letter/latin.ptl b/font-src/glyphs/letter/latin.ptl index 4b71c0066..d6cc9ebee 100644 --- a/font-src/glyphs/letter/latin.ptl +++ b/font-src/glyphs/letter/latin.ptl @@ -5016,7 +5016,7 @@ glyph-block Letter-Latin-Lower-F : begin curl (RightSB - HalfStroke * TanSlope) fbar define dfNarrowF : DivFrame para.diversityF - define [NarrowFShape df m bh] : glyph-proc + define [NarrowFShape df m bh counterHook] : glyph-proc local crossLeft : mix 0 SB m local crossRight : mix df.width df.rightSB m local barLeft : [mix crossLeft crossRight 0.42] - Stroke * 0.375 * HVContrast + df.width / 32 @@ -5024,7 +5024,7 @@ glyph-block Letter-Latin-Lower-F : begin include : dispiro widths.lhs flat crossRight CAP - curl [Math.min (barLeft + tTurn) (crossRight - 1)] CAP + curl [Math.min (barLeft + tTurn) (crossRight - 0.1)] CAP archv flat barLeft [Math.max XH (CAP - tTurn)] curl barLeft 0 [heading Downward] @@ -5032,6 +5032,18 @@ glyph-block Letter-Latin-Lower-F : begin widths.rhs flat (crossLeft - HalfStroke * TanSlope) bh curl (crossRight - HalfStroke * TanSlope) bh + if (counterHook === 1) : begin + include : VerticalHook (barLeft + HalfStroke * HVContrast) 0 (-HookX) Hook + if (counterHook === 2) : begin + local barRight : barLeft + Stroke * HVContrast + local counterHookLeft : barRight - (crossRight - barLeft) + include : dispiro + widths.lhs + flat counterHookLeft Descender + curl [Math.max (barRight - tTurn) (counterHookLeft + 0.1)] Descender + archv + flat barRight [Math.min 0 (Descender + tTurn)] + curl barRight 0.1 [heading Upward] create-glyph 'f.narrow' : glyph-proc set-width dfNarrowF.width @@ -5056,6 +5068,22 @@ glyph-block Letter-Latin-Lower-F : begin include : NarrowFShape [DivFrame 1] 1 XH include : WithTransform [Translate ((RightSB - SB) * 0.035) 0] : SmallFBottomSerif + create-glyph 'f.flatHookRoundTailed' : glyph-proc + include : MarkSet.if + include : NarrowFShape [DivFrame 1] 1 fbar 1 + + create-glyph 'f.flatHookRoundTailedCrossbarAtXHeight' : glyph-proc + include : MarkSet.if + include : NarrowFShape [DivFrame 1] 1 XH 1 + + create-glyph 'f.flatHookFlatTailed' : glyph-proc + include : MarkSet.if + include : NarrowFShape [DivFrame 1] 1 fbar 2 + + create-glyph 'f.flatHookFlatTailedCrossbarAtXHeight' : glyph-proc + include : MarkSet.if + include : NarrowFShape [DivFrame 1] 1 XH 2 + create-glyph 'f.tailed' : glyph-proc include [refer-glyph 'longs.italic'] AS_BASE include : dispiro @@ -5068,11 +5096,15 @@ glyph-block Letter-Latin-Lower-F : begin turned 'turnf.straight' nothing 'f.straight' Middle (XH / 2) [MarkSet.p] turned 'turnf.serifed' nothing 'f.serifed' Middle (XH / 2) [MarkSet.p] turned 'turnf.straightTailed' nothing 'f.straightTailed' Middle (XH / 2) [MarkSet.if] - turned 'turnf.tailed' nothing 'f.tailed' Middle (XH / 2) [MarkSet.if] + turned 'turnf.tailed' nothing 'f.tailed' Middle [mix Descender CAP 0.5] [MarkSet.if] turned 'turnf.flatHook' nothing 'f.flatHook' Middle (XH / 2) [MarkSet.p] turned 'turnf.flatHookCrossbarAtXHeight' nothing 'f.flatHookCrossbarAtXHeight' Middle (XH / 2) [MarkSet.p] turned 'turnf.flatHookSerifed' nothing 'f.flatHookSerifed' Middle (XH / 2) [MarkSet.p] turned 'turnf.flatHookSerifedCrossbarAtXHeight' nothing 'f.flatHookSerifedCrossbarAtXHeight' Middle (XH / 2) [MarkSet.p] + turned 'turnf.flatHookRoundTailed' nothing 'f.flatHookRoundTailed' Middle [mix Descender CAP 0.5] [MarkSet.if] + turned 'turnf.flatHookRoundTailedCrossbarAtXHeight' nothing 'f.flatHookRoundTailedCrossbarAtXHeight' Middle [mix Descender CAP 0.5] [MarkSet.if] + turned 'turnf.flatHookFlatTailed' nothing 'f.flatHookFlatTailed' Middle [mix Descender CAP 0.5] [MarkSet.if] + turned 'turnf.flatHookFlatTailedCrossbarAtXHeight' nothing 'f.flatHookFlatTailedCrossbarAtXHeight' Middle [mix Descender CAP 0.5] [MarkSet.if] turned 'turnf.narrow' nothing 'f.narrow' dfNarrowF.middle (XH / 2) [dfNarrowF.markSet.p] select-variant 'turnf' 0x25F (follow -- 'f') diff --git a/params/variants.toml b/params/variants.toml index dc1f48cd3..69bf74897 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -279,6 +279,30 @@ sampler = "f" description = '`f` with flat hook, bottom serif, and crossbar placed right at X-height' variant.f = 'flatHookSerifedCrossbarAtXHeight' +[simple.v-f-flat-hook-round-tailed] +tag = "VXEX" +sampler = "f" +description = '`f` with flat hook' +variant.f = 'flatHookRoundTailed' + +[simple.v-f-flat-hook-round-tailed-crossbar-at-x-height] +tag = "VXEY" +sampler = "f" +description = '`f` with flat hook and crossbar placed right at X-height' +variant.f = 'flatHookRoundTailedCrossbarAtXHeight' + +[simple.v-f-flat-hook-flat-tailed] +tag = "VXEZ" +sampler = "f" +description = '`f` with flat hook and bottom serif' +variant.f = 'flatHookFlatTailed' + +[simple.v-f-flat-hook-flat-tailed-crossbar-at-x-height] +tag = "VXFA" +sampler = "f" +description = '`f` with flat hook, bottom serif, and crossbar placed right at X-height' +variant.f = 'flatHookFlatTailedCrossbarAtXHeight' + [simple.v-g-singlestorey] tag = 'cv12' sampler = 'g'