Add LATIN EPIGRAPHIC LETTER ARCHAIC M (U+A7FF) (#2517). (#2520)

This commit is contained in:
Belleve 2024-09-27 00:53:17 -10:00 committed by GitHub
parent 4f5ee8e991
commit 006c77edae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 61 deletions

View file

@ -1,2 +1,4 @@
* Add characters:
- LATIN EPIGRAPHIC LETTER ARCHAIC M (`U+A7FF`) (#2517).
* Improve glyph for Cyrillic I (`И`/`и`) under slab (#2489). * Improve glyph for Cyrillic I (`И`/`и`) under slab (#2489).
- Bulgarian locale (`'BGR'`) uses original style for capital. - Bulgarian locale (`'BGR'`) uses original style for capital.

View file

@ -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

View file

@ -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

View file

@ -48,6 +48,7 @@ export : define [apply] : begin
run-glyph-module "./latin/orthography.mjs" 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/bidental-percussive.mjs"
run-glyph-module "./latin-ext/egyptological.mjs" run-glyph-module "./latin-ext/egyptological.mjs"
run-glyph-module "./latin-ext/eszet.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/ezh.mjs"
run-glyph-module "./latin-ext/flattened-open-a.mjs" run-glyph-module "./latin-ext/flattened-open-a.mjs"
run-glyph-module "./latin-ext/gha.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/glottal-stop.mjs"
run-glyph-module "./latin-ext/hwair.mjs" run-glyph-module "./latin-ext/hwair.mjs"
run-glyph-module "./latin-ext/insular-g.mjs" run-glyph-module "./latin-ext/insular-g.mjs"

View file

@ -732,12 +732,13 @@ glyph-block Letter-Shared-Shapes : begin
local-parameter : fForceSymmetric -- false local-parameter : fForceSymmetric -- false
return : new CSerifFrame top bot left right swRef swSerif div hSplit fForceSymmetric 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 return : SerifFrame top bot df.leftSB df.rightSB
swRef -- df.mvs swRef -- df.mvs
div -- df.div div -- df.div
hSplit -- [Math.max 2 df.hPack] hSplit -- [Math.max 2 df.hPack]
swSerif -- swSerif swSerif -- swSerif
fForceSymmetric -- fForceSymmetric
glyph-block-export WithSerifOverflowMask glyph-block-export WithSerifOverflowMask