diff --git a/font-src/glyphs/letter/latin/c.ptl b/font-src/glyphs/letter/latin/c.ptl index 4f8b8a501..8660ed18c 100644 --- a/font-src/glyphs/letter/latin/c.ptl +++ b/font-src/glyphs/letter/latin/c.ptl @@ -232,18 +232,28 @@ glyph-block Letter-Latin-C : begin include : HOverlayBar [mix SB 0 0.7] [mix SB RightSB 0.7] (CAP * 0.4) include : HOverlayBar [mix SB 0 0.7] [mix SB RightSB 0.7] (CAP * 0.6) - with-related-glyphs 'currency/centSign' 0xA2 'c' : lambda [src sel] : glyph-proc + create-glyph 'currency/centSignBar.open' : glyph-proc + set-width 0 + include : dispiro + widths.center + flat (Middle - Width) (XH - HalfStroke) + curl (Middle - Width) (XH - Descender / 2) [heading Upward] + include : dispiro + widths.center + flat (Middle - Width) (Descender / 2) [heading Upward] + curl (Middle - Width) HalfStroke + + create-glyph 'currency/centSignBar.through' : glyph-proc define fine : AdviceStroke 4 - include [refer-glyph src] AS_BASE ALSO_METRICS - include : dispiro - widths.center - flat Middle (XH - HalfStroke) - curl Middle (XH - Descender / 2) [heading Upward] - include : dispiro - widths.center - flat Middle (Descender / 2) [heading Upward] - curl Middle HalfStroke - include : VBar Middle (XH - HalfStroke) (0 + HalfStroke) fine + include [refer-glyph 'currency/centSignBar.open'] AS_BASE ALSO_METRICS + include : VBar (Middle - Width) (XH - HalfStroke) (0 + HalfStroke) fine + + select-variant 'currency/centSignBar' (follow -- 'cent') + + create-glyph 'currency/centSign' 0xA2 : glyph-proc + include [refer-glyph 'c'] AS_BASE ALSO_METRICS + include : WithTransform [Translate Width 0] [refer-glyph 'currency/centSignBar'] + CvDecompose.set currentGlyph { 'c' 'currency/centSignBar' } turned 'turnC' 0x186 'C' Middle (CAP / 2) turned 'turnc' 0x254 'c' Middle (XH / 2) diff --git a/font-src/support/glyph.js b/font-src/support/glyph.js index 99c7c9bb8..4ce057ba8 100644 --- a/font-src/support/glyph.js +++ b/font-src/support/glyph.js @@ -122,6 +122,9 @@ module.exports = class Glyph { includeGlyphImpl(g, shiftX, shiftY) { if (g._m_identifier) { this.includeGlyphComponentImpl(g, shiftX, shiftY); + } else if (!g._m_identifier && g.isPureComposite()) { + for (const sr of g.semanticInclusions) + this.includeGlyphComponentImpl(sr.glyph, sr.x + shiftX, sr.y + shiftY); } else { this.includeGeometry(g, shiftX, shiftY); } diff --git a/params/variants.toml b/params/variants.toml index 674f89077..34c7474ac 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -3200,6 +3200,22 @@ selector.dollar = "throughcap" +[prime.cent] +sampler = "ยข" +tag = "cv85" + +[prime.cent.variants.open] +rank = 1 +description = "Cent sign with open contour" +selector.cent = "open" + +[prime.cent.variants.through] +rank = 2 +description = "Cent sign with open contour" +selector.cent = "through" + + + [prime.percent] sampler = "%" tag = "cv79" @@ -3403,6 +3419,7 @@ at = "threefold" paren = "normal" brace = "curly" dollar = "through" +cent = "through" number-sign = "upright" percent = "rings-continuous-slash" lig-ltgteq = "flat"