Enable connected variant for Permille and Basepoint (#887)

This commit is contained in:
be5invis 2021-02-08 20:17:56 -08:00
parent f04d5fa676
commit b4883c62ba
2 changed files with 23 additions and 9 deletions

View file

@ -1507,20 +1507,30 @@ glyph-block Symbol-Punctuation-Percentages : begin
local perMilleOffset : Width + l - halfGapRing * 1.5 - m local perMilleOffset : Width + l - halfGapRing * 1.5 - m
create-derived 'percent.ringsContinuousSlashAlsoConnected' : difference define [ConnnectedBar] : difference
HBarTop ([mix l (m - halfGapRing) 0.5] - CorrectionOMidX * swRing) (r - swBar * HVContrast) CAP fineBar HBarTop ([mix l (m - halfGapRing) 0.5] - CorrectionOMidX * swRing) (r - swBar * HVContrast) CAP fineBar
OShapeOutline.NoOvershoot CAP (CAP / 2 + halfGapRing) l (m - halfGapRing) swRing sma smb OShapeOutline.NoOvershoot CAP (CAP / 2 + halfGapRing) l (m - halfGapRing) swRing sma smb
create-derived 'permille.WWID' [WideUnicode 0x2030] : glyph-proc define [PerMilleProc] : glyph-proc
set-width WideWidth0 set-width WideWidth0
include : OShape (CAP / 2 - halfGapRing) 0 (m + halfGapRing + perMilleOffset) (r + perMilleOffset) swRing sma smb include : OShape (CAP / 2 - halfGapRing) 0 (m + halfGapRing + perMilleOffset) (r + perMilleOffset) swRing sma smb
include : Translate ((WideWidth0 - r - perMilleOffset) / 2) 0 include : Translate ((WideWidth0 - r - perMilleOffset) / 2) 0
create-derived 'basepoint.WWID' [WideUnicode 0x2031] : glyph-proc
define [BasePointProc] : glyph-proc
set-width WideWidth0 set-width WideWidth0
include : OShape (CAP / 2 - halfGapRing) 0 (m + halfGapRing + perMilleOffset) (r + perMilleOffset) swRing sma smb include : OShape (CAP / 2 - halfGapRing) 0 (m + halfGapRing + perMilleOffset) (r + perMilleOffset) swRing sma smb
include : OShape (CAP / 2 - halfGapRing) 0 (m + halfGapRing + 2 * perMilleOffset) (r + 2 * perMilleOffset) swRing sma smb include : OShape (CAP / 2 - halfGapRing) 0 (m + halfGapRing + 2 * perMilleOffset) (r + 2 * perMilleOffset) swRing sma smb
include : Translate ((WideWidth0 - r - 2 * perMilleOffset) / 2) 0 include : Translate ((WideWidth0 - r - 2 * perMilleOffset) / 2) 0
create-derived 'percent.ringsContinuousSlashAlsoConnected' : ConnnectedBar
create-derived 'permille.WWID.ringsContinuousSlash' : PerMilleProc
create-derived 'basepoint.WWID.ringsContinuousSlash' : BasePointProc
create-derived 'permille.WWID.ringsContinuousSlashAlsoConnected' : composite-proc [ConnnectedBar] [PerMilleProc]
create-derived 'basepoint.WWID.ringsContinuousSlashAlsoConnected' : composite-proc [ConnnectedBar] [BasePointProc]
select-variant 'permille.WWID' [WideUnicode 0x2030] (follow -- 'permille.WWID')
select-variant 'basepoint.WWID' [WideUnicode 0x2031] (follow -- 'permille.WWID')
create-glyph 'percent.ringsSegmentedSlash' : glyph-proc create-glyph 'percent.ringsSegmentedSlash' : glyph-proc
set-width Width set-width Width
local l : SB / 2 local l : SB / 2
@ -1600,8 +1610,8 @@ glyph-block Symbol-Punctuation-Percentages : begin
include : OShape otop 0 l3 r3 swp smap smbp include : OShape otop 0 l3 r3 swp smap smbp
select-variant 'percent' '%' select-variant 'percent' '%'
select-variant 'permille.NWID' [NarrowUnicode 0x2030] (follow -- 'permille') select-variant 'permille.NWID' [NarrowUnicode 0x2030] (follow -- 'permille.NWID')
select-variant 'basepoint.NWID' [NarrowUnicode 0x2031] (follow -- 'permille') select-variant 'basepoint.NWID' [NarrowUnicode 0x2031] (follow -- 'permille.NWID')
glyph-block Symbol-Punctuation-Ascii-Marks : begin glyph-block Symbol-Punctuation-Ascii-Marks : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes

View file

@ -3498,25 +3498,29 @@ tag = "cv83"
rank = 1 rank = 1
description = "Percent `%` with rectangular dots" description = "Percent `%` with rectangular dots"
selector.percent = "dots" selector.percent = "dots"
selector.permille = "dots" selector."permille.NWID" = "dots"
selector."permille.WWID" = "ringsContinuousSlash"
[prime.percent.variants.rings-segmented-slash] [prime.percent.variants.rings-segmented-slash]
rank = 2 rank = 2
description = "Percent `%` with rings and segmented slash" description = "Percent `%` with rings and segmented slash"
selector.percent = "ringsSegmentedSlash" selector.percent = "ringsSegmentedSlash"
selector.permille = "ringsContinuousSlash" selector."permille.NWID" = "ringsContinuousSlash"
selector."permille.WWID" = "ringsContinuousSlash"
[prime.percent.variants.rings-continuous-slash] [prime.percent.variants.rings-continuous-slash]
rank = 3 rank = 3
description = "Percent `%` with rings and continuous bar" description = "Percent `%` with rings and continuous bar"
selector.percent = "ringsContinuousSlash" selector.percent = "ringsContinuousSlash"
selector.permille = "ringsContinuousSlash" selector."permille.NWID" = "ringsContinuousSlash"
selector."permille.WWID" = "ringsContinuousSlash"
[prime.percent.variants.rings-continuous-slash-also-connected] [prime.percent.variants.rings-continuous-slash-also-connected]
rank = 4 rank = 4
description = "Percent `%` with rings and continuous bar and the slash in `%` is also connected to the top-left ring" description = "Percent `%` with rings and continuous bar and the slash in `%` is also connected to the top-left ring"
selector.percent = "ringsContinuousSlashAlsoConnected" selector.percent = "ringsContinuousSlashAlsoConnected"
selector.permille = "ringsContinuousSlash" selector."permille.NWID" = "ringsContinuousSlash"
selector."permille.WWID" = "ringsContinuousSlashAlsoConnected"