From e434f0cef344492754b44cee6f5ce46284fa2f50 Mon Sep 17 00:00:00 2001 From: Belleve Date: Thu, 11 Jul 2024 20:42:37 -1000 Subject: [PATCH] * Add Characters: (#2415) - BIG SOLIDUS (`U+29F8`) (#2414). - BIG REVERSE SOLIDUS (`U+29F9`) (#2414). --- changes/30.3.3.md | 3 ++ .../punctuation/slashes-and-number-sign.ptl | 40 +++++++++++++------ 2 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 changes/30.3.3.md diff --git a/changes/30.3.3.md b/changes/30.3.3.md new file mode 100644 index 000000000..ff095ea5b --- /dev/null +++ b/changes/30.3.3.md @@ -0,0 +1,3 @@ +* Add Characters: + - BIG SOLIDUS (`U+29F8`) (#2414). + - BIG REVERSE SOLIDUS (`U+29F9`) (#2414). diff --git a/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl b/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl index 4f2a5c257..a50217a20 100644 --- a/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl +++ b/packages/font-glyphs/src/symbol/punctuation/slashes-and-number-sign.ptl @@ -17,11 +17,14 @@ glyph-block Symbol-Punctuation-Slashes-And-Number-Sign : begin define slashDefautLeft : SB + HalfStroke define slashDefaultRight : RightSB - HalfStroke - define [SlashShape l r _t _b _w] : glyph-proc - local w : fallback _w Stroke - local t : fallback _t ParenTop - local b : fallback _b ParenBot - local cor : (1 / 2) * HVContrast / [Math.sqrt (1 - [Math.pow ((r - l - Stroke) / (t - b)) 2])] + define flex-params [SlashShape] : glyph-proc + local-parameter : l + local-parameter : r + local-parameter : t -- ParenTop + local-parameter : b -- ParenBot + local-parameter : w -- Stroke + + local cor : (1 / 2) * HVContrast / [Math.sqrt (1 - [Math.pow ((r - l - w) / (t - b)) 2])] include : spiro-outline corner (r - w * cor) t corner (r + w * cor) t @@ -56,20 +59,33 @@ glyph-block Symbol-Punctuation-Slashes-And-Number-Sign : begin include : SlashShape (slashDefautLeft + b) (slashDefaultRight + b) TackTop TackBot w local backslashWidth : (slashDefaultRight - slashDefautLeft) * (1 + TanSlope * 2) - define [BackslashShape l r] : glyph-proc - local cor : (1 / 2) * HVContrast / [Math.sqrt (1 - [Math.pow ((r - l - Stroke) / (ParenTop - ParenBot)) 2])] + define flex-params [BackslashShape] : glyph-proc + local-parameter : l + local-parameter : r + local-parameter : t -- ParenTop + local-parameter : b -- ParenBot + local-parameter : w -- Stroke + + local cor : (1 / 2) * HVContrast / [Math.sqrt (1 - [Math.pow ((r - l - w) / (t - b)) 2])] include : spiro-outline - corner (l - Stroke * cor) ParenTop - corner (l + Stroke * cor) ParenTop - corner (r + Stroke * cor) ParenBot - corner (r - Stroke * cor) ParenBot + corner (l - w * cor) t + corner (l + w * cor) t + corner (r + w * cor) b + corner (r - w * cor) b create-glyph 'backslash' "\\" : glyph-proc - include : BackslashShape (Middle - backslashWidth / 2) (Middle + backslashWidth / 2) + include : BackslashShape slashDefautLeft slashDefaultRight alias 'mathSetMinus' 0x2216 'backslash' alias 'mathBackslash' 0x29F5 'backslash' + define MosaicTop fontMetrics.os2.sTypoAscender + define MosaicBottom fontMetrics.os2.sTypoDescender + create-glyph 'bigSolidus' 0x29F8 : glyph-proc + include : SlashShape slashDefautLeft slashDefaultRight MosaicTop MosaicBottom + create-glyph 'bigBackslash' 0x29F9 : glyph-proc + include : BackslashShape slashDefautLeft slashDefaultRight MosaicTop MosaicBottom + create-glyph 'slashOverbar' 0x29F6 : glyph-proc include : refer-glyph "slash" include : HBar.m (Middle - markExtend) (Middle + markExtend) (ParenTop + AccentClearance) markStroke