diff --git a/changes/31.8.0.md b/changes/31.8.0.md index 32813fa037..ed21ac4c74 100644 --- a/changes/31.8.0.md +++ b/changes/31.8.0.md @@ -1,2 +1,4 @@ +* Add characters: + - LATIN EPIGRAPHIC LETTER ARCHAIC M (`U+A7FF`) (#2517). * Improve glyph for Cyrillic I (`И`/`и`) under slab (#2489). - Bulgarian locale (`'BGR'`) uses original style for capital. diff --git a/packages/font-glyphs/src/letter/latin-ext/archaic-m.ptl b/packages/font-glyphs/src/letter/latin-ext/archaic-m.ptl new file mode 100644 index 0000000000..10b4331c8c --- /dev/null +++ b/packages/font-glyphs/src/letter/latin-ext/archaic-m.ptl @@ -0,0 +1,42 @@ +$$include '../../meta/macros.ptl' + +import [mix linreg clamp fallback SuffixCfg] from "@iosevka/util" +import [DesignParameters] from "../../meta/aesthetics.mjs" + +glyph-module + +glyph-block Letter-Latin-Archaic-M : begin + glyph-block-import CommonShapes + glyph-block-import Letter-Shared-Shapes : SerifFrame + + define [ExtLineJct ke ks sw x1 y1 kl1 kr1 x2 y2 kl2 kr2] : dispiro + flat [mix x1 x2 (-ke)] [mix y1 y2 (-ke)] [widths (sw * kl1) (sw * kr1)] + curl [mix x1 x2 0] [mix y1 y2 0] [widths (sw * kl1) (sw * kr1)] + flat [mix x1 x2 ks] [mix y1 y2 ks] [widths.center sw] + curl [mix x1 x2 (1-ks)] [mix y1 y2 (1-ks)] [widths.center sw] + flat [mix x1 x2 1] [mix y1 y2 1] [widths (sw * kl2) (sw * kr2)] + curl [mix x1 x2 (1+ke)] [mix y1 y2 (1+ke)] [widths (sw * kl2) (sw * kr2)] + + define [ArchaicMShape df top bottom] : glyph-proc + local sw df.mvs + local cl : df.leftSB + 0.5 * HVContrast * sw + local cr : df.rightSB - 0.5 * HVContrast * sw + local kt 0.2 + local ko 0.5 + + include : intersection [Rect top bottom df.leftSB df.rightSB] : union + ExtLineJct 4 0.45 sw [mix cl cr 0.0] bottom ko ko [mix cl cr 0.2] top ko kt + ExtLineJct 4 0.45 sw [mix cl cr 0.2] top ko kt [mix cl cr 0.4] bottom kt ko + ExtLineJct 4 0.45 sw [mix cl cr 0.4] bottom kt ko [mix cl cr 0.6] top ko kt + ExtLineJct 4 0.45 sw [mix cl cr 0.6] top ko kt [mix cl cr 0.8] bottom kt ko + ExtLineJct 4 0.45 sw [mix cl cr 0.8] bottom kt ko [mix cl cr 1.0] top ko ko + + if SLAB : begin + local sf : SerifFrame.fromDf df top bottom (fForceSymmetric -- true) + include : difference sf.lb.full [MaskRight : mix cl cr 0.3] + include : difference sf.rt.full [MaskLeft : mix cl cr 0.7] + + create-glyph "ArchaicM" 0xA7FF : glyph-proc + local df : include : DivFrame para.diversityM 4.5 + include : df.markSet.capital + include : ArchaicMShape df CAP 0 diff --git a/packages/font-glyphs/src/letter/latin-ext/f-ligatures.ptl b/packages/font-glyphs/src/letter/latin-ext/f-ligatures.ptl deleted file mode 100644 index 29a5d962bb..0000000000 --- a/packages/font-glyphs/src/letter/latin-ext/f-ligatures.ptl +++ /dev/null @@ -1,59 +0,0 @@ -$$include '../../meta/macros.ptl' - -import [mix linreg clamp fallback] from "@iosevka/util" - - -glyph-module - -glyph-block Letter-Latin-F-ligatures : begin - glyph-block-import CommonShapes - glyph-block-import Common-Derivatives - glyph-block-import Letter-Latin-Long-S - - define fbar : XH * DesignParameters.fBarPosToXH + Stroke * DesignParameters.fbarStrokeAdj - define shift (-(Width * 0.055 + SB * 0.5)) - define barr RightSB - define hbarleft (SB + shift + Stroke * [if para.slopeAngle 0.5 0.25]) - - create-glyph 'f_i.upright' : glyph-proc - include : MarkSet.b - include : new-glyph : glyph-proc - include : refer-glyph "longs.bentHookSerifless" - include : Translate shift 0 - include : VBar.r barr 0 fbar - include : HBar.t hbarleft barr fbar - if SLAB : include : tagged 'serifRB' : HSerif.mb (barr - [HSwToV HalfStroke]) 0 Jut - - create-glyph 'f_i.italic' : glyph-proc - include : MarkSet.b - include : new-glyph : glyph-proc - include : refer-glyph "longs.flatHookTailed" - include : Translate shift 0 - include : VBar.r barr 0 fbar - include : HBar.t hbarleft barr fbar - if SLAB : include : tagged 'serifRB' : HSerif.rb barr 0 SideJut - - create-glyph 'f_l.upright' : glyph-proc - local m : Middle - JBalance - [HSwToV HalfStroke] + shift - include : dispiro - widths.rhs - flat m 0 [heading Upward] - curl m (Ascender - ArchDepthA) - hookend Ascender - g4 (barr + OXHook) (Ascender - Hook) - include : VBar.r barr 0 (Ascender - Hook) - include : dispiro - widths.rhs - flat ([Math.min (m - Stroke * 0.3) hbarleft] - TanSlope * HalfStroke) fbar - curl ([mix SB barr 0.6] - TanSlope * HalfStroke) fbar - if SLAB : begin - include : tagged 'serifLB' : HSerif.mb (m + [HSwToV HalfStroke] + RBalance * 0.35) 0 (Jut + RBalance * 0.65) - include : tagged 'serifRB' : HSerif.mb (barr - [HSwToV HalfStroke]) 0 Jut - - create-glyph 'f_l.italic' : glyph-proc - include : new-glyph : glyph-proc - include [refer-glyph 'longs.flatHookTailed'] AS_BASE - include : Translate shift 0 - include : VBar.r barr 0 Ascender - include : HBar.t hbarleft [mix SB barr 0.65] fbar - if SLAB : include : tagged 'serifRB' : HSerif.rb barr 0 SideJut diff --git a/packages/font-glyphs/src/letter/latin.ptl b/packages/font-glyphs/src/letter/latin.ptl index 910d8a84fe..8ddb5f85c7 100644 --- a/packages/font-glyphs/src/letter/latin.ptl +++ b/packages/font-glyphs/src/letter/latin.ptl @@ -48,6 +48,7 @@ export : define [apply] : begin run-glyph-module "./latin/orthography.mjs" + run-glyph-module "./latin-ext/archaic-m.mjs" run-glyph-module "./latin-ext/bidental-percussive.mjs" run-glyph-module "./latin-ext/egyptological.mjs" run-glyph-module "./latin-ext/eszet.mjs" @@ -55,7 +56,6 @@ export : define [apply] : begin run-glyph-module "./latin-ext/ezh.mjs" run-glyph-module "./latin-ext/flattened-open-a.mjs" run-glyph-module "./latin-ext/gha.mjs" - # run-glyph-module "./latin-ext/f-ligatures.mjs" run-glyph-module "./latin-ext/glottal-stop.mjs" run-glyph-module "./latin-ext/hwair.mjs" run-glyph-module "./latin-ext/insular-g.mjs" diff --git a/packages/font-glyphs/src/letter/shared.ptl b/packages/font-glyphs/src/letter/shared.ptl index 30fb093728..38b1f6171c 100644 --- a/packages/font-glyphs/src/letter/shared.ptl +++ b/packages/font-glyphs/src/letter/shared.ptl @@ -732,12 +732,13 @@ glyph-block Letter-Shared-Shapes : begin local-parameter : fForceSymmetric -- false return : new CSerifFrame top bot left right swRef swSerif div hSplit fForceSymmetric - define SerifFrame.fromDf : function [] : with-params [df top bot [swSerif df.mvs]] : begin + define SerifFrame.fromDf : function [] : with-params [df top bot [swSerif df.mvs] [fForceSymmetric false]] : begin return : SerifFrame top bot df.leftSB df.rightSB swRef -- df.mvs div -- df.div hSplit -- [Math.max 2 df.hPack] swSerif -- swSerif + fForceSymmetric -- fForceSymmetric glyph-block-export WithSerifOverflowMask