Refines the design of APL glyphs, and also introduces a configurable "Favor APL" configuration for APL-oriented custom builds (#1200).
This commit is contained in:
parent
274eac85eb
commit
22f9b847cf
17 changed files with 320 additions and 140 deletions
|
@ -2746,6 +2746,8 @@ Subsection `variants` is used to configure character variants in the font. Prope
|
|||
|
||||
- Default digit form:
|
||||
<table><tr><td rowspan="2" width="348"><img src="images/character-variant-lnum.png" width="320"/></td><td><code>digit-form = 'lining'</code></td></tr><tr><td>Lining (default)</td></tr><tr><td rowspan="2" width="348"><img src="images/character-variant-onum.png" width="320"/></td><td><code>digit-form = 'old-style'</code></td></tr><tr><td>Old-style</td></tr></table>
|
||||
- APL form:
|
||||
<table><tr><td rowspan="2" width="252"><img src="images/character-variant-APLF-off.png" width="224"/></td><td><code>apl-form = 'none'</code></td></tr><tr><td>Disable APL-specific forms</td></tr><tr><td rowspan="2" width="252"><img src="images/character-variant-APLF-on.png" width="224"/></td><td><code>apl-form = 'enable'</code></td></tr><tr><td>Enable APL-specific forms for Increment and Nabla to harmonize APL operators</td></tr></table>
|
||||
- Styles for `A`:
|
||||
<table><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-1.png" width="32"/></td><td><code>capital-a = 'straight-serifless'</code>, <code>cv01 = 1</code></td></tr><tr><td>Standard, straight <code>A</code>, without serifs</td></tr><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-2.png" width="32"/></td><td><code>capital-a = 'curly-serifless'</code>, <code>cv01 = 2</code></td></tr><tr><td>Slightly curly <code>A</code>, like Iosevka 2.x, without serifs</td></tr><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-3.png" width="32"/></td><td><code>capital-a = 'straight-top-serifed'</code>, <code>cv01 = 3</code></td></tr><tr><td>Straight <code>A</code> with serif at top</td></tr><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-4.png" width="32"/></td><td><code>capital-a = 'curly-top-serifed'</code>, <code>cv01 = 4</code></td></tr><tr><td>Slightly curly <code>A</code>, like Iosevka 2.x, with serif at top</td></tr><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-5.png" width="32"/></td><td><code>capital-a = 'straight-base-serifed'</code>, <code>cv01 = 5</code></td></tr><tr><td>Straight <code>A</code> with serif at both top and bottom</td></tr><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-6.png" width="32"/></td><td><code>capital-a = 'curly-base-serifed'</code>, <code>cv01 = 6</code></td></tr><tr><td>Slightly curly <code>A</code>, like Iosevka 2.x, with serif at both top and bottom</td></tr><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-7.png" width="32"/></td><td><code>capital-a = 'straight-tri-serifed'</code>, <code>cv01 = 7</code></td></tr><tr><td>Straight <code>A</code> with serif at both top and bottom</td></tr><tr><td rowspan="2" width="60"><img src="images/character-variant-cv01-8.png" width="32"/></td><td><code>capital-a = 'curly-tri-serifed'</code>, <code>cv01 = 8</code></td></tr><tr><td>Slightly curly <code>A</code>, like Iosevka 2.x, with serif at both top and bottom</td></tr></table>
|
||||
- Styles for `B`:
|
||||
|
|
1
changes/10.1.1.md
Normal file
1
changes/10.1.1.md
Normal file
|
@ -0,0 +1 @@
|
|||
* Refines the design of APL glyphs, and also introduces a configurable "Favor APL" configuration for APL-oriented custom builds (#1200).
|
|
@ -156,5 +156,6 @@ export : define [buildGlyphs para recursive recursiveCodes] : begin
|
|||
|
||||
Gr.linkSuffixPairGr glyphStore 'NWID' 'WWID' Gr.Nwid Gr.Wwid
|
||||
Gr.linkSuffixPairGr glyphStore 'lnum' 'onum' Gr.Lnum Gr.Onum
|
||||
Gr.linkSuffixGr glyphStore 'aplForm' Gr.AplForm
|
||||
|
||||
return : object glyphStore fontMetrics
|
||||
|
|
|
@ -6,6 +6,7 @@ import [mix linreg clamp fallback] from '../../support/utils'
|
|||
import [DesignParameters] from '../../meta/aesthetics'
|
||||
import [TieMark TieGlyph] from "../../support/gr"
|
||||
import [Box] from '../../support/geometry/box'
|
||||
import [Point] from '../../support/geometry/point'
|
||||
|
||||
glyph-module
|
||||
|
||||
|
@ -190,8 +191,7 @@ glyph-block Mark-Above : begin
|
|||
flat (markMiddle - markStress * HVContrast) (aboveMarkBot - markFine * 1.7 + markStress)
|
||||
curl (markMiddle + markExtend * 1.5) (aboveMarkBot - markFine * 1.7 + markStress)
|
||||
|
||||
glyph-block-export TildeShape
|
||||
define [TildeShape] : params [ttop tbot leftEnd rightEnd hs] : glyph-proc
|
||||
define [TildeKnots] : params [ttop tbot leftEnd rightEnd hs] : glyph-proc
|
||||
local fine : hs * 8 / 9
|
||||
local hsvh : hs * 2 / [Math.abs (ttop - tbot)]
|
||||
local hvc : (rightEnd - leftEnd) / [Math.abs (ttop - tbot)]
|
||||
|
@ -206,6 +206,12 @@ glyph-block Mark-Above : begin
|
|||
define z2 : currentGlyph.gizmo.apply : object [x : mix leftEnd rightEnd tildeWaveX] [y : mix tbot ttop tildeWave]
|
||||
define z3 : currentGlyph.gizmo.apply : object [x : mix leftEnd rightEnd (1 - tildeWaveX)] [y : mix tbot ttop (1 - tildeWave)]
|
||||
define z4 : currentGlyph.gizmo.apply : object [x rightEnd] [y ttop]
|
||||
|
||||
return { z1 z2 z3 z4 }
|
||||
|
||||
glyph-block-export TildeShape
|
||||
define [TildeShape] : params [ttop tbot leftEnd rightEnd hs] : glyph-proc
|
||||
define { z1 z2 z3 z4 } : include : TildeKnots ttop tbot leftEnd rightEnd hs
|
||||
define bone : new Arcs.Bez3 z1 z2 z3 z4
|
||||
|
||||
define inner : new OffsetCurve bone (+hs) HVContrast
|
||||
|
@ -249,16 +255,37 @@ glyph-block Mark-Above : begin
|
|||
rightEnd -- RightSB
|
||||
hs -- (OperatorStroke / 2)
|
||||
|
||||
create-glyph 'overlayTildeOperator' : glyph-proc
|
||||
define [OverlayTildeT sink] : begin
|
||||
local t [mix aboveMarkMid aboveMarkTop ((RightSB - SB) / (markExtend * 3))]
|
||||
local b [mix aboveMarkMid (aboveMarkBot + markFine / 2) ((RightSB - SB) / (markExtend * 3))]
|
||||
include : TildeShape
|
||||
ttop -- t
|
||||
tbot -- b
|
||||
local offset : SymbolMid - [mix t b (1 / 2)]
|
||||
return : sink
|
||||
ttop -- (t + offset)
|
||||
tbot -- (b + offset)
|
||||
leftEnd -- [mix 0 SB (1/3)]
|
||||
rightEnd -- [mix Width RightSB (1/3)]
|
||||
hs -- ([AdviceStroke 4] / 2)
|
||||
include : Realign Middle [mix t b (1/2)] Middle SymbolMid
|
||||
|
||||
create-glyph 'overlayTildeOperator' : glyph-proc
|
||||
include : OverlayTildeT TildeShape
|
||||
|
||||
create-glyph 'overlayTildeOperatorAboveMask' : glyph-proc
|
||||
define FarRight : Width * 4
|
||||
define FarLeft : -Width * 3
|
||||
define FarAbove : CAP * 4
|
||||
|
||||
define { z1 z2 z3 z4 } : include : OverlayTildeT TildeKnots
|
||||
define arcs : list : list
|
||||
new Arcs.Bez3 z1 z2 z3 z4
|
||||
new Arcs.StraightSegment z4 [Point.withX z4 FarRight]
|
||||
new Arcs.StraightSegment [Point.withX z4 FarRight] [Point.corner FarRight FarAbove]
|
||||
new Arcs.StraightSegment [Point.corner FarRight FarAbove] [Point.corner FarLeft FarAbove]
|
||||
new Arcs.StraightSegment [Point.corner FarLeft FarAbove] [Point.withX z1 FarLeft]
|
||||
new Arcs.StraightSegment [Point.withX z1 FarLeft] z1
|
||||
|
||||
define cs : new BezToContoursSink
|
||||
ShapeConv.transferGenericShapeAsBezier arcs cs GEOMETRY_PRECISION
|
||||
currentGlyph.includeContours cs.contours 0 0
|
||||
|
||||
create-glyph : glyph-proc
|
||||
set-width 0
|
||||
|
|
|
@ -3,6 +3,7 @@ $$include '../../../meta/macros.ptl'
|
|||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
import [Point] from '../../../support/geometry/point'
|
||||
import [AplForm] from '../../../support/gr'
|
||||
|
||||
glyph-module
|
||||
|
||||
|
@ -11,6 +12,14 @@ glyph-block Symbol-Math-APL : begin
|
|||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Latin-U : UShape
|
||||
|
||||
# Dimensions
|
||||
define aplBoxInnerTop BgOpTop
|
||||
define aplBoxInnerBot BgOpBot
|
||||
define aplBoxSW : AdviceStroke 4.5
|
||||
define aplBoxTop : mix SymbolMid aplBoxInnerTop 1.1
|
||||
define aplBoxBot : mix SymbolMid aplBoxInnerBot 1.1
|
||||
define aplBoxInnerScale : Math.min ((Width - aplBoxSW * 1.75) / Width) ((aplBoxInnerTop - aplBoxInnerBot) / (ParenTop - ParenBot))
|
||||
|
||||
define [Overlay fnOverlay fnBackground] : glyph-proc
|
||||
define sw : [AdviceStroke 6] / 2
|
||||
local candidates {}
|
||||
|
@ -41,14 +50,7 @@ glyph-block Symbol-Math-APL : begin
|
|||
include : difference background corners [union.apply null candidates]
|
||||
include overlay
|
||||
|
||||
define aplBoxInnerTop BgOpTop
|
||||
define aplBoxInnerBot BgOpBot
|
||||
define aplBoxSW : AdviceStroke 4.5
|
||||
define aplBoxTop : mix SymbolMid aplBoxInnerTop 1.1
|
||||
define aplBoxBot : mix SymbolMid aplBoxInnerBot 1.1
|
||||
define aplBoxInnerScale : Math.min ((Width - aplBoxSW * 1.75) / Width) ((aplBoxInnerTop - aplBoxInnerBot) / (ParenTop - ParenBot))
|
||||
|
||||
create-glyph 'aplsquare' 0x2395 : glyph-proc
|
||||
create-glyph 'apl/quad' 0x2395 : glyph-proc
|
||||
local l [mix 0 SB (1 / 3)]
|
||||
local r [mix Width RightSB (1 / 3)]
|
||||
include : HBarTop l r aplBoxTop aplBoxSW
|
||||
|
@ -56,7 +58,7 @@ glyph-block Symbol-Math-APL : begin
|
|||
include : VBarLeft l aplBoxTop aplBoxBot aplBoxSW
|
||||
include : VBarRight r aplBoxTop aplBoxBot aplBoxSW
|
||||
|
||||
create-glyph 'aplsquareShadow' : glyph-proc
|
||||
create-glyph 'apl/quadShadow' : glyph-proc
|
||||
local l [mix 0 SB (1 / 3)]
|
||||
local r [mix Width RightSB (1 / 3)]
|
||||
include : spiro-outline
|
||||
|
@ -65,14 +67,14 @@ glyph-block Symbol-Math-APL : begin
|
|||
corner r aplBoxBot
|
||||
corner l aplBoxBot
|
||||
|
||||
create-glyph 'aplibar' 0x2336 : glyph-proc
|
||||
create-glyph 'apl/iBar' 0x2336 : glyph-proc
|
||||
local l [mix 0 SB (1 / 3)]
|
||||
local r [mix Width RightSB (1 / 3)]
|
||||
include : HBarTop l r OperTop aplBoxSW
|
||||
include : HBarBottom l r OperBot aplBoxSW
|
||||
include : VBar Middle OperTop OperBot aplBoxSW
|
||||
|
||||
create-glyph 'aplsquish' 0x2337 : glyph-proc
|
||||
create-glyph 'apl/squish' 0x2337 : glyph-proc
|
||||
local l : mix SB RightSB (1 / 8)
|
||||
local r : mix RightSB SB (1 / 8)
|
||||
include : union
|
||||
|
@ -81,120 +83,166 @@ glyph-block Symbol-Math-APL : begin
|
|||
VBarLeft l aplBoxTop aplBoxBot aplBoxSW
|
||||
VBarRight r aplBoxTop aplBoxBot aplBoxSW
|
||||
|
||||
create-glyph 'aplbar' : glyph-proc
|
||||
create-glyph 'apl/lamp' 0x235D : glyph-proc
|
||||
local shift : OperTop - 2 * Smooth - OperBot
|
||||
local fine : CThin * [AdviceStroke 4]
|
||||
local [InnerCircleMask sw] : spiro-outline
|
||||
corner (SB + HVContrast * (Stroke - fine)) (OperTop + shift)
|
||||
curl (SB + HVContrast * (Stroke - fine)) (OperBot + SmoothB + shift)
|
||||
arcvh
|
||||
g4 (Middle + CorrectionOMidX * OperatorStroke) (OperBot + (OperatorStroke - sw) + shift + O)
|
||||
archv
|
||||
flat (RightSB - HVContrast * (Stroke - fine)) (OperBot + SmoothA + shift)
|
||||
corner (RightSB - HVContrast * (Stroke - fine)) (OperTop + shift)
|
||||
include : union
|
||||
composite-proc
|
||||
UShape [DivFrame 1] OperTop OperBot (stroke -- OperatorStroke)
|
||||
FlipAround Middle SymbolMid
|
||||
intersection
|
||||
UShape [DivFrame 1] (OperTop + shift) (OperBot + shift) (stroke -- OperatorStroke)
|
||||
InnerCircleMask OperatorStroke
|
||||
composite-proc [InnerCircleMask fine] [FlipAround Middle (OperTop - Smooth)]
|
||||
|
||||
create-glyph 'apl/bar' : glyph-proc
|
||||
include : VBar Middle aplBoxTop aplBoxBot aplBoxSW
|
||||
|
||||
create-glyph 'aplLongBar' : glyph-proc
|
||||
create-glyph 'apl/longBar' : glyph-proc
|
||||
include : VBar Middle aplBoxTop aplBoxBot aplBoxSW
|
||||
|
||||
create-glyph 'aplminus' : glyph-proc
|
||||
create-glyph 'apl/minus' : glyph-proc
|
||||
include : dispiro
|
||||
widths.center aplBoxSW
|
||||
flat RightSB [mix OperTop OperBot 0.5]
|
||||
curl SB [mix OperTop OperBot 0.5]
|
||||
|
||||
create-glyph 'aplslash' : glyph-proc
|
||||
include : dispiro
|
||||
widths.center aplBoxSW
|
||||
flat RightSB OperTop
|
||||
curl SB OperBot
|
||||
|
||||
create-glyph 'aplbackslash' : glyph-proc
|
||||
create-glyph 'apl/backSlash' : glyph-proc
|
||||
include : dispiro
|
||||
widths.center aplBoxSW
|
||||
flat SB OperTop
|
||||
curl RightSB OperBot
|
||||
|
||||
define [aplBoxed shape] : Overlay [refer-glyph 'aplsquare'] : glyph-proc
|
||||
include : intersection [refer-glyph 'aplsquareShadow'] shape
|
||||
define [aplBoxed shape] : Overlay [refer-glyph 'apl/quad'] : glyph-proc
|
||||
include : intersection [refer-glyph 'apl/quadShadow'] shape
|
||||
include : ScaleAround Middle SymbolMid aplBoxInnerScale
|
||||
|
||||
define [aplBoxedPhantom shape] : glyph-proc
|
||||
include : intersection [refer-glyph 'aplsquareShadow'] shape
|
||||
include : intersection [refer-glyph 'apl/quadShadow'] shape
|
||||
include : ScaleAround Middle SymbolMid aplBoxInnerScale
|
||||
|
||||
create-glyph 0x2338 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'equal']
|
||||
derive-glyphs 'boxedDivied' 0x2339 'divide' : function [src sel] : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph src]
|
||||
create-glyph 0x233A : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'whiteDiamond.NWID']
|
||||
create-glyph 0x233B : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'whiteSmallCircle.NWID']
|
||||
create-glyph 0x233C : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'whiteCircle.NWID']
|
||||
create-glyph 0x233D : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'aplbar'] [refer-glyph 'whiteCircle.NWID']]
|
||||
create-glyph 0x233E : composite-proc [refer-glyph 'whiteCircle.NWID'] [refer-glyph 'whiteSmallCircle.NWID']
|
||||
create-glyph 0x233F : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'aplminus'] [refer-glyph 'slash']]
|
||||
create-glyph 0x2340 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'aplminus'] [refer-glyph 'backslash']]
|
||||
create-glyph 0x2341 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'slash']
|
||||
create-glyph 0x2342 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'backslash']
|
||||
create-glyph 0x2343 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'less']
|
||||
create-glyph 0x2344 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'greater']
|
||||
create-glyph 0x2345 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'arrowLeft.NWID'] [refer-glyph 'aplbar']]
|
||||
create-glyph 0x2346 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'arrowRight.NWID'] [refer-glyph 'aplbar']]
|
||||
create-glyph 0x2347 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'arrowLeft.NWID']
|
||||
create-glyph 0x2348 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'arrowRight.NWID']
|
||||
create-glyph 0x2349 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'aplbackslash'] [refer-glyph 'whiteCircle.NWID']]
|
||||
create-glyph 0x234A : composite-proc [refer-glyph 'bot'] [MarkSet.tack] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x234B : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'increment'] [refer-glyph 'aplLongBar']]
|
||||
create-glyph 0x234C : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'vee']
|
||||
create-glyph 0x234D : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'increment']
|
||||
create-glyph 0x234F : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'arrowUp.NWID'] [refer-glyph 'minus']]
|
||||
create-glyph 0x2350 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'arrowUp.NWID']
|
||||
create-glyph 0x2351 : composite-proc [refer-glyph 'top'] [MarkSet.tack] [refer-glyph 'sbOverlineAbove'] [clear-anchors]
|
||||
create-glyph 0x2352 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'nabla'] [refer-glyph 'aplLongBar']]
|
||||
create-glyph 0x2353 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'wedge']
|
||||
create-glyph 0x2354 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'nabla']
|
||||
create-glyph 0x2356 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'arrowDown.NWID'] [refer-glyph 'minus']]
|
||||
create-glyph 0x2357 : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'arrowDown.NWID']
|
||||
create-glyph 0x2358 : composite-proc [refer-glyph 'asciiSingleQuote.straight'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x2359 : composite-proc [refer-glyph 'increment'] [refer-glyph 'underlineBelow']
|
||||
create-glyph 0x235A : composite-proc [refer-glyph 'whiteDiamond.NWID'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x235B : composite-proc [refer-glyph 'whiteSmallCircle.NWID'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x235C : composite-proc [refer-glyph 'whiteCircle.NWID'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x235D : composite-proc
|
||||
refer-glyph 'whiteSmallCircle.NWID'
|
||||
ScaleAround Middle SymbolMid 0.75
|
||||
Realign Middle SymbolMid Middle (OperBot + Smooth)
|
||||
UShape [DivFrame 1] OperTop OperBot (stroke -- [AdviceStroke 5])
|
||||
FlipAround Middle SymbolMid
|
||||
create-glyph 0x235E : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'asciiSingleQuote.straight']
|
||||
create-glyph 0x235F : composite-proc [refer-glyph 'enquad'] [intersection [refer-glyph 'mathOOutline'] [refer-glyph 'opAsterisk.low']] [refer-glyph 'mathO']
|
||||
derive-glyphs 'boxedColon' 0x2360 'colon' : function [src sel] : composite-proc [refer-glyph 'enquad'] [aplBoxed : composite-proc [refer-glyph src] [Realign Middle (XH/2) Middle SymbolMid]]
|
||||
create-glyph 0x2361 : composite-proc [refer-glyph 'top'] [MarkSet.tack] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2362 : composite-proc [refer-glyph 'nabla'] [refer-glyph 'dieresisAbove']
|
||||
create-glyph 0x2363 : composite-proc [refer-glyph 'asterisk.pentaSMid'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2364 : composite-proc [refer-glyph 'whiteSmallCircle.NWID'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2365 : composite-proc [refer-glyph 'whiteCircle.NWID'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2366 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'cup'] [refer-glyph 'aplbar']]
|
||||
create-glyph 0x2367 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'subst'] [refer-glyph 'aplbar']]
|
||||
create-glyph 0x2368 : composite-proc [refer-glyph 'asciiTilde.low'] [refer-glyph 'dieresisAbove']
|
||||
create-glyph 0x2369 : composite-proc [refer-glyph 'greater.narrow'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
derive-composites 'barComma' 0x236A 'comma' 'minus'
|
||||
create-glyph 0x236B : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlayTildeOperator'] [refer-glyph 'nabla']]
|
||||
derive-glyphs 'apl/zeroTilde' 0x236C 'zero.lnum/forceUnslashed' : function [src sel]
|
||||
composite-proc [refer-glyph 'enquad']
|
||||
Overlay [refer-glyph 'overlayTildeOperator'] [refer-glyph src]
|
||||
create-glyph 0x236D : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlayTildeOperator'] [refer-glyph 'bar']]
|
||||
derive-glyphs 'barSemicolon' 0x236E 'semicolon' : lambda [src sel] : composite-proc
|
||||
refer-glyph 'enquad'
|
||||
Overlay [refer-glyph src] [refer-glyph 'underscore.high']
|
||||
create-glyph 0x236F : composite-proc [refer-glyph 'enquad'] [aplBoxed : refer-glyph 'notequal']
|
||||
create-glyph 0x2371 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlayTildeOperator'] [refer-glyph 'vee']]
|
||||
create-glyph 0x2372 : composite-proc [refer-glyph 'enquad'] [Overlay [refer-glyph 'overlayTildeOperator'] [refer-glyph 'wedge']]
|
||||
# Aliases
|
||||
alias 'apl/iota' 0x2373 'grek/iota'
|
||||
alias 'apl/rho' 0x2374 'grek/rho'
|
||||
alias 'apl/omega' 0x2375 'grek/omega'
|
||||
alias 'apl/alpha' 0x237A 'grek/alpha'
|
||||
|
||||
# Boxed
|
||||
create-glyph 0x2338 : aplBoxed : refer-glyph 'equal'
|
||||
create-glyph 0x233A : aplBoxed : refer-glyph 'whiteDiamond.NWID'
|
||||
create-glyph 0x233B : aplBoxed : refer-glyph 'whiteSmallCircle.NWID'
|
||||
create-glyph 0x233C : aplBoxed : refer-glyph 'whiteCircle.NWID'
|
||||
create-glyph 0x2341 : aplBoxed : refer-glyph 'slash'
|
||||
create-glyph 0x2342 : aplBoxed : refer-glyph 'backslash'
|
||||
create-glyph 0x2343 : aplBoxed : refer-glyph 'less'
|
||||
create-glyph 0x2344 : aplBoxed : refer-glyph 'greater'
|
||||
create-glyph 0x2347 : aplBoxed : refer-glyph 'arrowLeft.NWID'
|
||||
create-glyph 0x2348 : aplBoxed : refer-glyph 'arrowRight.NWID'
|
||||
create-glyph 0x234C : aplBoxed : refer-glyph 'vee'
|
||||
create-glyph 0x234D : aplBoxed : refer-glyph 'increment.aplForm'
|
||||
create-glyph 0x2350 : aplBoxed : refer-glyph 'arrowUp.NWID'
|
||||
create-glyph 0x2353 : aplBoxed : refer-glyph 'wedge'
|
||||
create-glyph 0x2354 : aplBoxed : refer-glyph 'nabla.aplForm'
|
||||
create-glyph 0x2357 : aplBoxed : refer-glyph 'arrowDown.NWID'
|
||||
create-glyph 0x235E : aplBoxed : refer-glyph 'asciiSingleQuote.straight'
|
||||
create-glyph 0x236F : aplBoxed : refer-glyph 'notequal'
|
||||
|
||||
derive-glyphs 'apl/boxedDivide' 0x2339 'divide' : function [src sel] : aplBoxed : refer-glyph src
|
||||
derive-glyphs 'apl/boxedColon' 0x2360 'colon/mid' : function [src sel] : aplBoxed : refer-glyph src
|
||||
|
||||
derive-glyphs 'apl/quadQuestion/hookPart' null 'question/hookPart' : function [src sel] : glyph-proc
|
||||
include : aplBoxed : refer-glyph src
|
||||
set-base-anchor 'cvDecompose' 0 0
|
||||
derive-glyphs 'apl/quadQuestion/dotPart' null 'question/dotPart' : function [src sel] : glyph-proc
|
||||
include : aplBoxedPhantom : WithTransform [Translate Width 0] : refer-glyph src
|
||||
set-mark-anchor 'cvDecompose' 0 0
|
||||
create-two-part-glyph 'apl/quadQuestion' 0x2370 'apl/quadQuestion/hookPart' 'apl/quadQuestion/dotPart'
|
||||
|
||||
# Simple Composites
|
||||
create-glyph 0x233D : composite-proc [refer-glyph 'apl/bar'] [refer-glyph 'whiteCircle.NWID']
|
||||
create-glyph 0x233E : composite-proc [refer-glyph 'whiteCircle.NWID'] [refer-glyph 'whiteSmallCircle.NWID']
|
||||
create-glyph 0x233F : composite-proc [refer-glyph 'apl/minus'] [refer-glyph 'slash']
|
||||
create-glyph 0x2340 : composite-proc [refer-glyph 'apl/minus'] [refer-glyph 'backslash']
|
||||
create-glyph 0x2349 : composite-proc [refer-glyph 'apl/backSlash'] [refer-glyph 'whiteCircle.NWID']
|
||||
create-glyph 0x234B : composite-proc [refer-glyph 'increment.aplThin'] [refer-glyph 'apl/longBar']
|
||||
create-glyph 0x234F : composite-proc [refer-glyph 'arrowUp.NWID'] [refer-glyph 'minus']
|
||||
create-glyph 0x2352 : composite-proc [refer-glyph 'nabla.aplThin'] [refer-glyph 'apl/longBar']
|
||||
create-glyph 0x2356 : composite-proc [refer-glyph 'arrowDown.NWID'] [refer-glyph 'minus']
|
||||
create-glyph 0x2359 : composite-proc [refer-glyph 'increment.aplForm'] [refer-glyph 'underlineBelow']
|
||||
create-glyph 0x2366 : composite-proc [refer-glyph 'cup'] [refer-glyph 'apl/bar']
|
||||
create-glyph 0x236D : composite-proc [refer-glyph 'overlayTildeOperator'] [refer-glyph 'bar']
|
||||
|
||||
derive-composites 'apl/barComma' 0x236A 'comma' 'minus'
|
||||
derive-composites 'apl/zeroTilde' 0x236C 'zero.lnum/forceUnslashed' 'overlayTildeOperator'
|
||||
|
||||
# Dieresis
|
||||
create-glyph 0x2362 : composite-proc [refer-glyph 'nabla.aplForm'] [MarkSet.tack] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2361 : composite-proc [refer-glyph 'top'] [MarkSet.tack] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2363 : composite-proc [refer-glyph 'asterisk.pentaSMid'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2364 : composite-proc [refer-glyph 'whiteSmallCircle.NWID'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2365 : composite-proc [refer-glyph 'whiteCircle.NWID'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
create-glyph 0x2368 : composite-proc [refer-glyph 'asciiTilde.low'] [refer-glyph 'dieresisAbove']
|
||||
create-glyph 0x2369 : composite-proc [refer-glyph 'greater.narrow'] [MarkSet.plus] [refer-glyph 'dieresisAbove'] [clear-anchors]
|
||||
|
||||
# Underscore
|
||||
create-glyph 0x234A : composite-proc [refer-glyph 'bot'] [MarkSet.tack] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x2358 : composite-proc [refer-glyph 'asciiSingleQuote.straight'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x235A : composite-proc [refer-glyph 'whiteDiamond.NWID'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x235B : composite-proc [refer-glyph 'whiteSmallCircle.NWID'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x235C : composite-proc [refer-glyph 'whiteCircle.NWID'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
create-glyph 0x2377 : composite-proc [refer-glyph 'smallElement'] [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
|
||||
derive-composites 'apl/alphaBar' 0x2376 'grek/alpha' [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
derive-composites 'apl/smallElement' 0x2377 'smallElement' [MarkSet.plus] [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
derive-composites 'apl/iotaBar' 0x2378 'grek/iota' [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
derive-composites 'apl/omegaBar' 0x2379 'grek/omega' [refer-glyph 'underlineBelow'] [clear-anchors]
|
||||
|
||||
derive-glyphs 'apl/quadQuestion/hookPart' null 'question/hookPart' : function [src sel] : glyph-proc
|
||||
include [refer-glyph 'enquad'] AS_BASE ALSO_METRICS
|
||||
include : aplBoxed : refer-glyph src
|
||||
set-base-anchor 'cvDecompose' 0 0
|
||||
# Overline
|
||||
create-glyph 0x2351 : composite-proc [refer-glyph 'top'] [MarkSet.tack] [refer-glyph 'sbOverlineAbove'] [clear-anchors]
|
||||
|
||||
derive-glyphs 'apl/quadQuestion/dotPart' null 'question/dotPart' : function [src sel] : glyph-proc
|
||||
include [refer-glyph 'enquad'] AS_BASE ALSO_METRICS
|
||||
include : aplBoxedPhantom : WithTransform [Translate Width 0] : refer-glyph src
|
||||
set-mark-anchor 'cvDecompose' 0 0
|
||||
# Gapped Overlay
|
||||
create-glyph 0x2345 : composite-proc : Overlay [refer-glyph 'arrowLeft.NWID'] [refer-glyph 'apl/bar']
|
||||
create-glyph 0x2346 : composite-proc : Overlay [refer-glyph 'arrowRight.NWID'] [refer-glyph 'apl/bar']
|
||||
create-glyph 0x235F : composite-proc [intersection [refer-glyph 'mathOOutline'] [refer-glyph 'opAsterisk.low']] [refer-glyph 'mathO']
|
||||
|
||||
create-two-part-glyph 'apl/quadQuestion' 0x2370 'apl/quadQuestion/hookPart' 'apl/quadQuestion/dotPart'
|
||||
derive-glyphs 'apl/barSemicolon' 0x236E 'semicolon' : function [src sel] : Overlay [refer-glyph src] [refer-glyph 'underscore.high']
|
||||
|
||||
# Complex Composition
|
||||
create-glyph 0x2367 : composite-proc [refer-glyph 'apl/bar'] : union
|
||||
intersection [MaskLeft Middle] [refer-glyph 'subst/aplLeft']
|
||||
intersection [MaskRight Middle] [refer-glyph 'subst']
|
||||
create-glyph 0x236B : composite-proc [refer-glyph 'overlayTildeOperator'] : union
|
||||
difference [refer-glyph 'nabla.aplThin'] [refer-glyph 'overlayTildeOperatorAboveMask']
|
||||
intersection [refer-glyph 'nabla.aplForm'] [refer-glyph 'overlayTildeOperatorAboveMask']
|
||||
create-glyph 0x2371 : composite-proc [refer-glyph 'overlayTildeOperator'] : union
|
||||
difference [refer-glyph 'vee/aplThin'] [refer-glyph 'overlayTildeOperatorAboveMask']
|
||||
intersection [refer-glyph 'vee'] [refer-glyph 'overlayTildeOperatorAboveMask']
|
||||
create-glyph 0x2372 : composite-proc [refer-glyph 'overlayTildeOperator'] : union
|
||||
intersection [refer-glyph 'wedge/aplThin'] [refer-glyph 'overlayTildeOperatorAboveMask']
|
||||
difference [refer-glyph 'wedge'] [refer-glyph 'overlayTildeOperatorAboveMask']
|
||||
|
||||
# APL uses White Circle and Arrows as operators, this function links them as APL form
|
||||
# and fixes Unicode assignments
|
||||
define [LinkAplFormForNwidWwid gn] : begin
|
||||
define gWwid : query-glyph "\(gn).WWID"
|
||||
define gNwid : query-glyph "\(gn).NWID"
|
||||
if (gWwid && gNwid) : begin
|
||||
AplForm.set gWwid "\(gn).NWID"
|
||||
if (para.variantSelector.__enableAplForm === 'enable') : begin
|
||||
local us : glyphStore.queryUnicodeOf gWwid
|
||||
if us : begin
|
||||
glyphStore.deleteUnicodeAssignmentsOf gWwid
|
||||
foreach u us : glyphStore.encodeGlyph u gNwid
|
||||
|
||||
LinkAplFormForNwidWwid 'whiteCircle'
|
||||
LinkAplFormForNwidWwid 'arrowLeft'
|
||||
LinkAplFormForNwidWwid 'arrowRight'
|
||||
LinkAplFormForNwidWwid 'arrowUp'
|
||||
LinkAplFormForNwidWwid 'arrowDown'
|
||||
|
|
|
@ -30,8 +30,25 @@ glyph-block Symbol-Math-Letter-Like : begin
|
|||
flat (SB + O + fine) [mix CAP 0 1.05]
|
||||
curl (RightSB - O - fine) [mix 0 CAP 1.05]
|
||||
|
||||
create-glyph 'increment' 0x2206 : glyph-proc
|
||||
define [CodeNonApl u] : if (para.variantSelector.__enableAplForm === 'enable') null u
|
||||
define [CodeApl u] : if (para.variantSelector.__enableAplForm === 'enable') u null
|
||||
|
||||
create-glyph 'increment' [CodeNonApl 0x2206] : glyph-proc
|
||||
include : MarkSet.capital
|
||||
include : DeltaShape [DivFrame 1] CAP OperatorStroke true
|
||||
|
||||
turned 'nabla' 0x2207 'increment' Middle (CAP / 2)
|
||||
create-glyph 'increment.aplForm' [CodeApl 0x2206] : glyph-proc
|
||||
include : MarkSet.oper
|
||||
define shapeHeight : OperTop - OperBot
|
||||
include : DeltaShape [DivFrame 1] shapeHeight OperatorStroke true
|
||||
include : ApparentTranslate 0 (SymbolMid - shapeHeight / 2)
|
||||
|
||||
create-glyph 'increment.aplThin' : glyph-proc
|
||||
include : MarkSet.oper
|
||||
define shapeHeight : OperTop - OperBot
|
||||
include : DeltaShape [DivFrame 1] shapeHeight [AdviceStroke 3.75] true
|
||||
include : ApparentTranslate 0 (SymbolMid - shapeHeight / 2)
|
||||
|
||||
turned 'nabla' [CodeNonApl 0x2207] 'increment' Middle (CAP / 2)
|
||||
turned 'nabla.aplForm' [CodeApl 0x2207] 'increment.aplForm' Middle SymbolMid
|
||||
turned 'nabla.aplThin' null 'increment.aplThin' Middle SymbolMid
|
||||
|
|
|
@ -597,7 +597,7 @@ glyph-block Symbol-Math-Relation-Subset : begin
|
|||
flat RightSB (top - offset) [heading Leftward]
|
||||
curl (SB + offset + (top - bot) / 2 - offset) (top - offset)
|
||||
archv
|
||||
g4 (SB + offset) [mix top bot 0.5]
|
||||
g4 (SB + offset + O) [mix top bot 0.5]
|
||||
arcvh
|
||||
flat (SB + offset + (top - bot) / 2 - offset) (bot + offset)
|
||||
curl RightSB (bot + offset) [heading Rightward]
|
||||
|
@ -606,7 +606,10 @@ glyph-block Symbol-Math-Relation-Subset : begin
|
|||
include : SubsetShape top bot sw
|
||||
include : FlipAround Middle [mix top bot 0.5]
|
||||
|
||||
create-glyph 'subst' 0x2282 : SubsetShape (SymbolMid + dHSubstSimple) (SymbolMid - dHSubstSimple)
|
||||
create-glyph 'subst' 0x2282
|
||||
SubsetShape (SymbolMid + dHSubstSimple) (SymbolMid - dHSubstSimple)
|
||||
create-glyph 'subst/aplLeft'
|
||||
SubsetShape (SymbolMid + dHSubstSimple) (SymbolMid - dHSubstSimple) [AdviceStroke 3.5]
|
||||
create-glyph 'doubleSubst' 0x22D0 : glyph-proc
|
||||
local sw : AdviceStroke 6
|
||||
local gap : Math.max (Width / 8) (sw / 2)
|
||||
|
|
|
@ -12,23 +12,26 @@ glyph-block Symbol-Math-VAndCup : begin
|
|||
glyph-block-import Symbol-Arrow : ArrowShape
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
|
||||
define [VeeShape top bot] : union
|
||||
define [VeeShape top bot sw] : union
|
||||
dispiro
|
||||
widths.center OperatorStroke
|
||||
flat (SB + HalfStroke * HVContrast) top [heading Downward]
|
||||
curl Middle bot [heading Downward]
|
||||
widths.lhs [fallback sw OperatorStroke]
|
||||
flat SB top [heading Downward]
|
||||
curl (Middle - HalfStroke * HVContrast) bot [heading Downward]
|
||||
dispiro
|
||||
widths.center OperatorStroke
|
||||
flat (RightSB - HalfStroke * HVContrast) top [heading Downward]
|
||||
curl Middle bot [heading Downward]
|
||||
widths.rhs [fallback sw OperatorStroke]
|
||||
flat RightSB top [heading Downward]
|
||||
curl (Middle + HalfStroke * HVContrast) bot [heading Downward]
|
||||
|
||||
define [WedgeShape top bot] : new-glyph : glyph-proc
|
||||
include : VeeShape top bot
|
||||
define [WedgeShape top bot sw] : new-glyph : glyph-proc
|
||||
include : VeeShape top bot sw
|
||||
include : FlipAround Middle [mix top bot 0.5]
|
||||
|
||||
create-glyph 'wedge' 0x2227 : WedgeShape OperTop OperBot
|
||||
create-glyph 'vee' 0x2228 : VeeShape OperTop OperBot
|
||||
|
||||
create-glyph 'wedge/aplThin' : WedgeShape OperTop OperBot [AdviceStroke 4]
|
||||
create-glyph 'vee/aplThin' : VeeShape OperTop OperBot [AdviceStroke 4]
|
||||
|
||||
create-glyph 'mt/projection' 0x2305 : union
|
||||
HBarTop SB RightSB OperTop OperatorStroke
|
||||
WedgeShape (OperTop - OperatorStroke) OperBot
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import [add-common-feature add-feature add-lookup BeginLookupBlock EndLookupBlock] from "./table-util"
|
||||
|
||||
# Name-driven feature pairs
|
||||
export : define [buildGrFeature sink glyphStore tag gr] : begin
|
||||
export : define [buildGrFeature sink glyphStore gr] : begin
|
||||
local rec : BeginLookupBlock sink
|
||||
|
||||
local mapping {.}
|
||||
|
@ -13,7 +13,7 @@ export : define [buildGrFeature sink glyphStore tag gr] : begin
|
|||
|
||||
if [objectIsNotEmpty mapping] : begin
|
||||
define lookup1 : add-lookup sink {.type 'gsub_single' .substitutions mapping}
|
||||
define feature1 : add-feature sink tag
|
||||
define feature1 : add-feature sink gr.otlTag
|
||||
feature1.lookups.push lookup1
|
||||
add-common-feature sink feature1
|
||||
|
||||
|
|
|
@ -21,13 +21,16 @@ define [buildGSUB para glyphStore markGlyphs] : begin
|
|||
define gsub : CreateEmptyTable
|
||||
|
||||
# lnum / onum
|
||||
buildGrFeature gsub glyphStore 'lnum' Gr.Lnum
|
||||
buildGrFeature gsub glyphStore 'onum' Gr.Onum
|
||||
buildGrFeature gsub glyphStore Gr.Lnum
|
||||
buildGrFeature gsub glyphStore Gr.Onum
|
||||
|
||||
# NWID / WWID
|
||||
if (!para.forceMonospace || para.spacing > 0) : begin
|
||||
buildGrFeature gsub glyphStore 'NWID' Gr.Nwid
|
||||
buildGrFeature gsub glyphStore 'WWID' Gr.Wwid
|
||||
buildGrFeature gsub glyphStore Gr.Nwid
|
||||
buildGrFeature gsub glyphStore Gr.Wwid
|
||||
|
||||
# APLF
|
||||
buildGrFeature gsub glyphStore Gr.AplForm
|
||||
|
||||
# ccmp
|
||||
buildCCMP gsub glyphStore markGlyphs
|
||||
|
|
|
@ -38,6 +38,15 @@ class Point {
|
|||
static fromXY(type, x, y) {
|
||||
return new Point(type, x || 0, y || 0);
|
||||
}
|
||||
static corner(x, y) {
|
||||
return new Point(Point.Type.Corner, x || 0, y || 0);
|
||||
}
|
||||
static withX(z, x) {
|
||||
return new Point(z.type, x || 0, z.y);
|
||||
}
|
||||
static withY(z, y) {
|
||||
return new Point(z.type, z.x, y || 0);
|
||||
}
|
||||
static transformed(tfm, z) {
|
||||
return Point.transformedXY(tfm, z.type, z.x, z.y);
|
||||
}
|
||||
|
|
|
@ -35,10 +35,15 @@ const DollarShrinkKernel = SimpleProp("DollarShrinkKernel");
|
|||
const DollarShorterBar = SimpleProp("DollarShorterBar");
|
||||
const MathSansSerif = SimpleProp("MathSansSerif");
|
||||
|
||||
const Nwid = SimpleProp("Nwid");
|
||||
const Wwid = SimpleProp("Wwid");
|
||||
const Lnum = SimpleProp("Lnum");
|
||||
const Onum = SimpleProp("Onum");
|
||||
function OtlTaggedProp(key, otlTag) {
|
||||
return { ...SimpleProp(key), otlTag };
|
||||
}
|
||||
|
||||
const Nwid = OtlTaggedProp("Nwid", "NWID");
|
||||
const Wwid = OtlTaggedProp("Wwid", "WWID");
|
||||
const Lnum = OtlTaggedProp("Lnum", "lnum");
|
||||
const Onum = OtlTaggedProp("Onum", "onum");
|
||||
const AplForm = OtlTaggedProp("AplForm", "APLF");
|
||||
|
||||
const CvDecompose = {
|
||||
get(glyph) {
|
||||
|
@ -332,8 +337,9 @@ function createGrDisplaySheet(glyphStore, gid) {
|
|||
|
||||
// Query selected typographic features -- mostly NWID and WWID
|
||||
let typographicFeatures = [];
|
||||
queryPairFeatureTags(gid, "NWID", "WWID", typographicFeatures);
|
||||
queryPairFeatureTags(gid, "lnum", "onum", typographicFeatures);
|
||||
displayQueryPairFeatures(glyphStore, gid, Nwid, Wwid, typographicFeatures);
|
||||
displayQueryPairFeatures(glyphStore, gid, Lnum, Onum, typographicFeatures);
|
||||
displayQuerySingleFeature(glyphStore, gid, AplForm, typographicFeatures);
|
||||
|
||||
let charVariantFeatures = [];
|
||||
const decomposition = CvDecompose.get(glyph);
|
||||
|
@ -350,16 +356,25 @@ function createGrDisplaySheet(glyphStore, gid) {
|
|||
|
||||
return [typographicFeatures, charVariantFeatures];
|
||||
}
|
||||
function queryPairFeatureTags(gid, f1, f2, sink) {
|
||||
function displayQueryPairFeatures(gs, gid, grCis, grTrans, sink) {
|
||||
const g = gs.queryByName(gid);
|
||||
if (!g) return;
|
||||
const glyphIsHidden = /^\./.test(gid);
|
||||
if (!glyphIsHidden) {
|
||||
const re1 = new RegExp(`\\.${f1}$`),
|
||||
re2 = new RegExp(`\\.${f2}$`);
|
||||
if (re1.test(gid) || re2.test(gid)) {
|
||||
sink.push(`'${f1}' 1`, `'${f2}' 1`);
|
||||
}
|
||||
if (glyphIsHidden) return;
|
||||
if (grCis.get(g) || grTrans.get(g)) {
|
||||
sink.push(`'${grCis.otlTag}' 1`, `'${grTrans.otlTag}' 1`);
|
||||
}
|
||||
}
|
||||
function displayQuerySingleFeature(gs, gid, grCis, sink) {
|
||||
const g = gs.queryByName(gid);
|
||||
if (!g) return;
|
||||
const glyphIsHidden = /^\./.test(gid);
|
||||
if (glyphIsHidden) return;
|
||||
if (grCis.get(g)) {
|
||||
sink.push(`'${grCis.otlTag}' 0`, `'${grCis.otlTag}' 1`);
|
||||
}
|
||||
}
|
||||
|
||||
function byTagPreference(a, b) {
|
||||
const ua = a.tag.toUpperCase(),
|
||||
ub = b.tag.toUpperCase();
|
||||
|
@ -395,6 +410,17 @@ function queryCvFeatureTagsOf(sink, gid, glyph, variantAssignmentSet) {
|
|||
for (const g of m.values()) if (g.length) sink.push(g);
|
||||
}
|
||||
|
||||
function linkSuffixGr(gs, suffix, gr) {
|
||||
const reSuffix = new RegExp("\\." + suffix + "$");
|
||||
for (const [gnSuffixed, gSuffixed] of gs.namedEntries()) {
|
||||
if (reSuffix.test(gnSuffixed) && !/^\./.test(gnSuffixed)) {
|
||||
const gnOriginal = gnSuffixed.replace(reSuffix, "");
|
||||
const gOriginal = gs.queryByName(gnOriginal);
|
||||
if (!gOriginal) continue;
|
||||
gr.set(gOriginal, gnSuffixed);
|
||||
}
|
||||
}
|
||||
}
|
||||
function linkSuffixPairGr(gs, tagCis, tagTrans, grCis, grTrans) {
|
||||
const reTagCis = new RegExp("\\." + tagCis + "$");
|
||||
for (const [gnCis, gCis] of gs.namedEntries()) {
|
||||
|
@ -430,8 +456,10 @@ exports.Nwid = Nwid;
|
|||
exports.Wwid = Wwid;
|
||||
exports.Lnum = Lnum;
|
||||
exports.Onum = Onum;
|
||||
exports.AplForm = AplForm;
|
||||
|
||||
exports.createGrDisplaySheet = createGrDisplaySheet;
|
||||
exports.linkSuffixGr = linkSuffixGr;
|
||||
exports.linkSuffixPairGr = linkSuffixPairGr;
|
||||
|
||||
exports.SvInheritableRelations = [DollarShrinkKernel, DollarShorterBar, Joining];
|
||||
|
|
BIN
images/character-variant-APLF-off.png
Normal file
BIN
images/character-variant-APLF-off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
BIN
images/character-variant-APLF-on.png
Normal file
BIN
images/character-variant-APLF-on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
|
@ -6234,8 +6234,6 @@ selector.punctuationDot = "square"
|
|||
|
||||
|
||||
|
||||
########## "Untagged" variants, used for Aile, etc.
|
||||
|
||||
# This is a special variant selector that controls digit form
|
||||
[prime.digit-form.variants.lining]
|
||||
selector.__defaultDigitForm = "lining"
|
||||
|
@ -6243,6 +6241,13 @@ selector.__defaultDigitForm = "lining"
|
|||
[prime.digit-form.variants.old-style]
|
||||
selector.__defaultDigitForm = "oldStyle"
|
||||
|
||||
# This is a special variant selector that controls APL form
|
||||
[prime.apl-form.variants.none]
|
||||
selector.__enableAplForm = "none"
|
||||
|
||||
[prime.apl-form.variants.enable]
|
||||
selector.__enableAplForm = "enable"
|
||||
|
||||
###################################################################################################
|
||||
|
||||
[default.design]
|
||||
|
|
|
@ -131,6 +131,23 @@ async function processCherryPickingStyles() {
|
|||
]
|
||||
});
|
||||
|
||||
formatCv(md, {
|
||||
introMD: `APL form`,
|
||||
sampleImageCountEm: 7,
|
||||
alternatives: [
|
||||
{
|
||||
imageId: "APLF-off",
|
||||
selectors: [`apl-form = 'none'`],
|
||||
description: `Disable APL-specific forms`
|
||||
},
|
||||
{
|
||||
imageId: "APLF-on",
|
||||
selectors: [`apl-form = 'enable'`],
|
||||
description: `Enable APL-specific forms for Increment and Nabla to harmonize APL operators`
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
for (const cv of variantsData.primes) {
|
||||
if (!cv.tag) continue;
|
||||
const sampleText = cv.descSampleText
|
||||
|
|
|
@ -83,6 +83,22 @@ module.exports = async function main(argv) {
|
|||
slopeDependent: false
|
||||
}
|
||||
});
|
||||
readmeSnapshotTasks.push({
|
||||
el: "#cv-sampler",
|
||||
applyClass: "cv-sampler",
|
||||
applyFeature: "'APLF' on",
|
||||
name: "character-variant-APLF-on",
|
||||
applyCallback: `cbAmendCharacterVariantContents`,
|
||||
applyCallbackArgs: { hotChars: ["∆", "∇", "○", "←", "→", "↑", "↓"], slopeDependent: false }
|
||||
});
|
||||
readmeSnapshotTasks.push({
|
||||
el: "#cv-sampler",
|
||||
applyClass: "cv-sampler",
|
||||
applyFeature: "'APLF' off",
|
||||
name: "character-variant-APLF-off",
|
||||
applyCallback: `cbAmendCharacterVariantContents`,
|
||||
applyCallbackArgs: { hotChars: ["∆", "∇", "○", "←", "→", "↑", "↓"], slopeDependent: false }
|
||||
});
|
||||
for (const cv of variationData.primes) {
|
||||
if (!cv.tag) continue;
|
||||
for (const variant of cv.variants) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue