Skip to content

Commit

Permalink
Add LATIN EPIGRAPHIC LETTER ARCHAIC M (U+A7FF) (#2517). (#2520)
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis authored Sep 27, 2024
1 parent 4f5ee8e commit 006c77e
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 61 deletions.
2 changes: 2 additions & 0 deletions changes/31.8.0.md
Original file line number Diff line number Diff line change
@@ -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.
42 changes: 42 additions & 0 deletions packages/font-glyphs/src/letter/latin-ext/archaic-m.ptl
Original file line number Diff line number Diff line change
@@ -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
59 changes: 0 additions & 59 deletions packages/font-glyphs/src/letter/latin-ext/f-ligatures.ptl

This file was deleted.

2 changes: 1 addition & 1 deletion packages/font-glyphs/src/letter/latin.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ 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"
run-glyph-module "./latin-ext/eth.mjs"
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"
Expand Down
3 changes: 2 additions & 1 deletion packages/font-glyphs/src/letter/shared.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 006c77e

Please sign in to comment.