Fix broken NWID glyphs for Permille/Permyriad under Quasi-Proportional for percent=dots. (#2247)

* Fix Permille/Permyriad=dots NWID glyphs under QP.

* PercentBarCor
This commit is contained in:
John McWilliams 2024-03-20 20:09:52 -04:00 committed by GitHub
parent 1ff6c20d9a
commit 297cb22022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View file

@ -6,3 +6,4 @@
* Make the behavior of serifs of `U+027F` automatic.
* Fix side bearings of `U+29E2` under Quasi-Proportional.
* Fix width of PUNCTUATION SPACE (`U+2008`) under Quasi-Proportional.
* Fix `percent`=`dots` glyphs for PER {MILLE|TEN THOUSAND} SIGN (`U+2030`..`U+2031`) under Quasi-Proportional when `NWID` is enabled.

View file

@ -38,21 +38,22 @@ glyph-block Symbol-Punctuation-Percentages : begin
create-glyph 'permille.NWID.dots' : glyph-proc
define df : include : DivFrame para.diversityM
define slopeDf : DivFrame 1
define refSw : AdviceStroke 4 df.div
include : PercentBarShape df refSw
include : PercentBarShape slopeDf refSw
local dotwidth : refSw * 1.5
include : VBar.l SB [mix CAP 0 0.3] CAP dotwidth
local gap : (df.width - df.leftSB) * 0.9 - refSw * [PercentBarCor df refSw]
local gap : (df.width - df.leftSB) * 0.9 - refSw * [PercentBarCor slopeDf refSw]
local lowerDotWidth : 1.5 * [AdviceStroke 3 (gap / Width)]
include : VBar.r (RightSB - gap * 0.45) 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r RightSB 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r (df.rightSB - gap * 0.45) 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r df.rightSB 0 [mix 0 CAP 0.3] lowerDotWidth
create-glyph 'basepoint.NWID.dots' : glyph-proc
define df : include : DivFrame para.diversityM
define slopeDf : DivFrame (para.diversityM * 0.8)
define slopeDf : DivFrame [Math.min (para.diversityM * 0.8) 1]
define refSw : AdviceStroke 5 df.div
@ -62,9 +63,9 @@ glyph-block Symbol-Punctuation-Percentages : begin
local gap : (df.width - df.leftSB) * 0.9 - refSw * [PercentBarCor slopeDf refSw]
local lowerDotWidth : 1.5 * [AdviceStroke 4 (gap / Width)]
include : VBar.r (RightSB - gap * 0.6) 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r (RightSB - gap * 0.3) 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r RightSB 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r (df.rightSB - gap * 0.6) 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r (df.rightSB - gap * 0.3) 0 [mix 0 CAP 0.3] lowerDotWidth
include : VBar.r df.rightSB 0 [mix 0 CAP 0.3] lowerDotWidth
create-glyph 'percent.ringsContinuousSlash' : glyph-proc
set-width Width