Add graphic form of CGJ(U+034F
), ZWNJ (U+200C
), ZWJ (U+200D
), Object Replacement Character (U+FFFC
)
This commit is contained in:
parent
511b099cc5
commit
c512c572d9
6 changed files with 84 additions and 15 deletions
|
@ -5,4 +5,4 @@
|
|||
* Fix shape of capital `J` under Aile.
|
||||
* Make `v-k-cursive` visible in Upright and Oblique (#700).
|
||||
* Fix `lSlash`'s shape under Aile.
|
||||
* Add graphic form of Replacement Character (`U+FFFD`, #698).
|
||||
* Add graphic form of CGJ(`U+034F`), ZWNJ (`U+200C`), ZWJ (`U+200D`), Object Replacement Character (`U+FFFC`), and Replacement Character (`U+FFFD`, #698).
|
|
@ -243,6 +243,32 @@ glyph-block AutoBuild-Enclosure : begin
|
|||
include : EnclosureInner [if decomposable gnEnclosure null] miniatureFont prefix job dimens
|
||||
include : refer-glyph gnEnclosure
|
||||
|
||||
define [createDashedBoxedGlyphs digits demands] : EnclosureT 'dashed-boxed' DECOMPOSABLE digits demands
|
||||
lambda [ww gap] : glyph-proc
|
||||
define [object width mockInnerWidth sw top bot left right] : circleDimens digits ww
|
||||
set-width width
|
||||
include : difference
|
||||
union
|
||||
HBarTop left right top sw
|
||||
HBarBottom left right bot sw
|
||||
VBarLeft left bot top sw
|
||||
VBarRight right bot top sw
|
||||
union
|
||||
VBar [mix left right 0.25] bot top sw
|
||||
VBar [mix left right 0.5] bot top sw
|
||||
VBar [mix left right 0.75] bot top sw
|
||||
HBar left right [mix bot top 0.25] sw
|
||||
HBar left right [mix bot top 0.50] sw
|
||||
HBar left right [mix bot top 0.75] sw
|
||||
lambda [prefix ww gap job miniatureFont gnEnclosure decomposable] : begin
|
||||
define { gn unicode parts w bal baly } job
|
||||
define dimens : circleDimens digits ww
|
||||
define [object width mockInnerWidth dscale] dimens
|
||||
if [not : query-glyph gn] : create-glyph gn [if (w == ww) unicode null] : glyph-proc
|
||||
set-width width
|
||||
include : EnclosureInner [if decomposable gnEnclosure null] miniatureFont prefix job dimens
|
||||
include : refer-glyph gnEnclosure
|
||||
|
||||
define [createInsetCircledGlyphs digits demands] : EnclosureT 'inset-circle' NON-DECOMPOSABLE digits demands
|
||||
lambda [ww gap] : glyph-proc
|
||||
define [object width sw top bot left right smoothA smoothB] : circleDimens digits ww
|
||||
|
@ -530,7 +556,7 @@ glyph-block AutoBuild-Enclosure : begin
|
|||
createBoxedGlyphs 1 compositions
|
||||
|
||||
if [not recursive] : do "double-digit boxed"
|
||||
local compositions : list
|
||||
createBoxedGlyphs 2 : list
|
||||
list null {'markBaseSpace'} WideWidth1
|
||||
list 0x1F14A {'H' 'V'} WideWidth1
|
||||
list 0x1F14B {'M' 'V'} WideWidth1
|
||||
|
@ -542,23 +568,25 @@ glyph-block AutoBuild-Enclosure : begin
|
|||
list 0x1F196 {'N' 'G'} WideWidth1
|
||||
list 0x1F197 {'O' 'K'} WideWidth1
|
||||
list 0x1F19A {'V' 'S'} WideWidth1
|
||||
createBoxedGlyphs 2 compositions
|
||||
|
||||
if [not recursive] : do "triple-digit boxed"
|
||||
local compositions : list
|
||||
createBoxedGlyphs 3 : list
|
||||
list null {'markBaseSpace'} WideWidth1
|
||||
list 0x1F14E {'P' 'P' 'V'} WideWidth1
|
||||
list 0x1F195 {'N' 'E' 'W'} WideWidth1
|
||||
list 0x1F198 {'S' 'O' 'S'} WideWidth1
|
||||
list 0x1F199 {'U' 'P' 'exclam'} WideWidth1
|
||||
createBoxedGlyphs 3 compositions
|
||||
|
||||
if [not recursive] : do "quad-digit boxed"
|
||||
local compositions : list
|
||||
createBoxedGlyphs 4 : list
|
||||
list null {'markBaseSpace'} WideWidth1
|
||||
list 0x1F192 {'C' 'O' 'O' 'L'} WideWidth1
|
||||
list 0x1F193 {'F' 'R' 'E' 'E'} WideWidth1
|
||||
createBoxedGlyphs 4 compositions
|
||||
|
||||
if [not recursive] : do "triple-digit dashed-boxed"
|
||||
createDashedBoxedGlyphs 3 : list
|
||||
list 0x034F {'C' 'G' 'J'} WideWidth1
|
||||
list 0xFFFC {'O' 'B' 'J'} WideWidth1
|
||||
|
||||
if [not recursive] : do "inset boxed"
|
||||
local compositions {}
|
||||
|
@ -570,13 +598,12 @@ glyph-block AutoBuild-Enclosure : begin
|
|||
list 0xFFFD { 'question' } WideWidth2
|
||||
|
||||
if [not recursive] : do "double-digit inset boxed"
|
||||
local compositions : list
|
||||
createInsetBoxedGlyphs 2 : list
|
||||
list 0x1F18B {'I' 'C'} WideWidth1
|
||||
list 0x1F18C {'P' 'A'} WideWidth1
|
||||
list 0x1F18D {'S' 'A'} WideWidth1
|
||||
list 0x1F18E {'A' 'B'} WideWidth1
|
||||
list 0x1F18F {'W' 'C'} WideWidth1
|
||||
createInsetBoxedGlyphs 2 compositions
|
||||
|
||||
if [not recursive] : do "inset mosaic"
|
||||
local compositions {}
|
||||
|
|
|
@ -311,6 +311,7 @@ glyph-block Letter-Latin-Upper-J : begin
|
|||
set-base-anchor 'above' (RightSB - Stroke * HVContrast * 0.75 - JBalance2) CAP
|
||||
set-base-anchor 'overlay' (RightSB - Stroke * HVContrast * 0.75 - JBalance2) (CAP * OverlayPos)
|
||||
|
||||
local sw : Math.min (0.4 * (RightSB - JBalance2 - SB)) Stroke
|
||||
local slope (Stroke * 0.00092)
|
||||
local expand 0.35
|
||||
local coexpand ((1 - expand) / 2)
|
||||
|
@ -318,9 +319,9 @@ glyph-block Letter-Latin-Upper-J : begin
|
|||
local hookx (0.75 * SB)
|
||||
|
||||
include : dispiro
|
||||
widths.rhs
|
||||
widths.rhs sw
|
||||
flat (RightSB - JBalance2) CAP [heading Downward]
|
||||
curl (RightSB - JBalance2) Smooth
|
||||
curl (RightSB - JBalance2) SmoothB
|
||||
hookend O
|
||||
g4 hookx Hook
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ glyph-block Symbol-Mosaic-NotDef : begin
|
|||
set currentGlyph.autoRefPriority (-9999)
|
||||
|
||||
alias 'nonmarkingreturn' 0x000D 'zwsp'
|
||||
alias 'cgj' 0x034F 'zwsp'
|
||||
alias 'nbsp' 0xA0 'space'
|
||||
alias 'threePerEmsp' 0x2004 'space'
|
||||
alias 'fourPerEmsp' 0x2005 'space'
|
||||
|
|
|
@ -1568,6 +1568,43 @@ glyph-block Symbol-Punctuation-Ties : begin
|
|||
create-glyph "invertedUnderTie" 0x2054 : TieShape 0 1
|
||||
create-glyph "symbolMidTie" : TieShape (- Descender / 3) 2
|
||||
|
||||
glyph-block Symbol-Punctuation-Joiners : do
|
||||
glyph-block-import CommonShapes
|
||||
|
||||
define fine : adviceBlackness 6
|
||||
define size : Width * 0.25
|
||||
|
||||
create-glyph 'zwj' 0x200D : glyph-proc
|
||||
set-width 0
|
||||
include : VBar 0 Descender CAP fine
|
||||
include : dispiro
|
||||
widths.center fine
|
||||
corner (-size) (CAP)
|
||||
corner (+size) (CAP + 2 * size)
|
||||
include : dispiro
|
||||
widths.center fine
|
||||
corner (+size) (CAP)
|
||||
corner (-size) (CAP + 2 * size)
|
||||
|
||||
create-glyph 'zwnj' 0x200C : glyph-proc
|
||||
set-width 0
|
||||
include : VBar 0 Descender CAP fine
|
||||
define outerSize : size + 0.5 * fine * [Math.sqrt 2]
|
||||
define innerSize : size - 0.5 * fine * [Math.sqrt 2]
|
||||
include : difference
|
||||
spiro-outline
|
||||
widths.center fine
|
||||
corner (-outerSize) (CAP + size)
|
||||
corner 0 (CAP + size - outerSize)
|
||||
corner (+outerSize) (CAP + size)
|
||||
corner 0 (CAP + size + outerSize)
|
||||
spiro-outline
|
||||
widths.center fine
|
||||
corner (-innerSize) (CAP + size)
|
||||
corner 0 (CAP + size - innerSize)
|
||||
corner (+innerSize) (CAP + size)
|
||||
corner 0 (CAP + size + innerSize)
|
||||
|
||||
glyph-block Symbol-Punctuation-Ligation-Variants : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
|
|
|
@ -136,16 +136,21 @@ export : define [buildCCMP sink glyphStore markGlyphs] : begin
|
|||
object [from {'revCommaAbove' 'acuteAbove'}] [to 'dasiaoxia']
|
||||
object [from {'revCommaAbove' 'perispomeniAbove'}] [to 'dasiaperispomeni']
|
||||
|
||||
define gnCgjNwid 'dashed-boxed3{847}{C}{G}{J}.NWID'
|
||||
define gnCgjWwid 'dashed-boxed3{847}{C}{G}{J}.WWID'
|
||||
|
||||
define lookupCcmp-TieMarkLigature : add-lookup sink : object
|
||||
.type 'gsub_ligature'
|
||||
.subtables : list : object : substitutions : TieMarkFrom.map : lambda [gnFrom idx]
|
||||
object [from {'cgj' gnFrom}] [to TieMarkTo.(idx)]
|
||||
.subtables : list
|
||||
object : substitutions : TieMarkFrom.map : lambda [gnFrom idx]
|
||||
object [from {gnCgjNwid gnFrom}] [to TieMarkTo.(idx)]
|
||||
object : substitutions : TieMarkFrom.map : lambda [gnFrom idx]
|
||||
object [from {gnCgjWwid gnFrom}] [to TieMarkTo.(idx)]
|
||||
|
||||
define lookupCcmp-TieMarkContextual : add-lookup sink : object
|
||||
.type 'gsub_chaining'
|
||||
.subtables : list : object
|
||||
match {[TieGlyphs.concat TieMarkTo] {'cgj'} TieMarkFrom}
|
||||
match {[TieGlyphs.concat TieMarkTo] {gnCgjNwid gnCgjWwid} TieMarkFrom}
|
||||
inputBegins 1
|
||||
inputEnds 3
|
||||
apply {{.at 1 .lookup lookupCcmp-TieMarkLigature}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue