Fix missing blocks in unicode-data
This commit is contained in:
parent
f3b0a7a62f
commit
955d06f745
17 changed files with 101 additions and 32 deletions
|
@ -8,7 +8,6 @@ extern Map
|
|||
glyph-module
|
||||
|
||||
glyph-block Common-Derivatives : begin
|
||||
glyph-block-import CommonShapes : FlipAround
|
||||
define [ApplyCv g shapeFrom follow para] : begin
|
||||
foreach { kPrime prime } para.variants.primes : foreach h [prime.variants.values] : begin
|
||||
local suffix : h.resolveFor para follow
|
||||
|
@ -103,7 +102,14 @@ glyph-block Common-Derivatives : begin
|
|||
if mark : include mark
|
||||
define x : if (_x <@ Function) [_x.call currentGlyph] _x
|
||||
define y : if (_y <@ Function) [_y.call currentGlyph] _y
|
||||
include : FlipAround x y
|
||||
|
||||
# This is [FlipAround], but we cannot use it because common-shapes depends on this
|
||||
# glyph block
|
||||
include : Upright
|
||||
include : Translate (-x) (-y)
|
||||
include : Scale (-1) (-1)
|
||||
include : Translate x y
|
||||
include : Italify
|
||||
|
||||
define [link-reduced-variant] : params [dstGid srcGid gr follow] : begin
|
||||
if [not : query-glyph dstGid] : select-variant dstGid (shapeFrom -- srcGid) (follow -- [fallback follow dstGid])
|
||||
|
|
|
@ -8,6 +8,9 @@ import [Radical] from '../../support/gr'
|
|||
glyph-module
|
||||
|
||||
glyph-block CommonShapes : begin
|
||||
glyph-block-import Common-Derivatives
|
||||
|
||||
glyph-block-export Rect
|
||||
define [Rect u d l r transformShiftOnly] : glyph-proc
|
||||
local giz currentGlyph.gizmo
|
||||
include : new-glyph : glyph-proc
|
||||
|
@ -23,40 +26,51 @@ glyph-block CommonShapes : begin
|
|||
local {.x mx1 .y my1} : giz.apply {.x mx .y my}
|
||||
include : Translate (mx1 - mx) (my1 - my)
|
||||
|
||||
glyph-block-export SquareAt
|
||||
define [SquareAt x y r] : Rect (y + r) (y - r) (x - r) (x + r)
|
||||
|
||||
define VERY-FAR : UPM * 16
|
||||
glyph-block-export MaskAbove
|
||||
define [MaskAbove y] : Rect (VERY-FAR) y (-VERY-FAR) (VERY-FAR)
|
||||
glyph-block-export MaskBelow
|
||||
define [MaskBelow y] : Rect y (-VERY-FAR) (-VERY-FAR) (VERY-FAR)
|
||||
glyph-block-export MaskLeft
|
||||
define [MaskLeft x] : Rect VERY-FAR (-VERY-FAR) (-VERY-FAR) x
|
||||
glyph-block-export MaskRight
|
||||
define [MaskRight x] : Rect VERY-FAR (-VERY-FAR) x VERY-FAR
|
||||
glyph-block-export MaskAboveLine
|
||||
define [MaskAboveLine x1 y1 x2 y2] : spiro-outline
|
||||
corner x1 (+VERY-FAR)
|
||||
corner x1 y1
|
||||
corner x2 y2
|
||||
corner x2 (+VERY-FAR)
|
||||
glyph-block-export MaskBelowLine
|
||||
define [MaskBelowLine x1 y1 x2 y2] : spiro-outline
|
||||
corner x1 (-VERY-FAR)
|
||||
corner x1 y1
|
||||
corner x2 y2
|
||||
corner x2 (-VERY-FAR)
|
||||
glyph-block-export MaskLeftLine
|
||||
define [MaskLeftLine x1 y1 x2 y2] : spiro-outline
|
||||
corner (-VERY-FAR) y1
|
||||
corner x1 y1
|
||||
corner x2 y2
|
||||
corner (-VERY-FAR) y2
|
||||
glyph-block-export MaskRightLine
|
||||
define [MaskRightLine x1 y1 x2 y2] : spiro-outline
|
||||
corner (+VERY-FAR) y1
|
||||
corner x1 y1
|
||||
corner x2 y2
|
||||
corner (+VERY-FAR) y2
|
||||
|
||||
glyph-block-export HalfRectTriangle
|
||||
define [HalfRectTriangle x1 y1 x2 y2] : spiro-outline
|
||||
corner x1 y1
|
||||
corner x2 y2
|
||||
corner x2 y1
|
||||
|
||||
|
||||
glyph-block-export Ring
|
||||
define [Ring u d l r transformShiftOnly] : glyph-proc
|
||||
local giz currentGlyph.gizmo
|
||||
include : new-glyph : glyph-proc
|
||||
|
@ -76,9 +90,12 @@ glyph-block CommonShapes : begin
|
|||
if transformShiftOnly : begin
|
||||
local {.x mx1 .y my1} : giz.apply {.x mx .y my}
|
||||
include : Translate (mx1 - mx) (my1 - my)
|
||||
glyph-block-export RingAt
|
||||
define [RingAt x y r] : Ring (y + r) (y - r) (x - r) (x + r)
|
||||
glyph-block-export DotAt
|
||||
define [DotAt x y r] : Ring (y + r) (y - r) (x - r) (x + r) true
|
||||
|
||||
glyph-block-export RingStroke
|
||||
define [RingStroke u d l r s transformShiftOnly] : glyph-proc
|
||||
local giz currentGlyph.gizmo
|
||||
include : new-glyph : glyph-proc
|
||||
|
@ -100,9 +117,12 @@ glyph-block CommonShapes : begin
|
|||
if transformShiftOnly : begin
|
||||
local {.x mx1 .y my1} : giz.apply {.x mx .y my}
|
||||
include : Translate (mx1 - mx) (my1 - my)
|
||||
glyph-block-export RingStrokeAt
|
||||
define [RingStrokeAt x y r s] : RingStroke (y + r) (y - r) (x - r) (x + r) s
|
||||
glyph-block-export DotStrokeAt
|
||||
define [DotStrokeAt x y r s] : RingStroke (y + r) (y - r) (x - r) (x + r) s true
|
||||
|
||||
glyph-block-export CircleRing
|
||||
define [CircleRing u d l r transformShiftOnly] : glyph-proc
|
||||
local giz currentGlyph.gizmo
|
||||
include : new-glyph : glyph-proc
|
||||
|
@ -119,9 +139,12 @@ glyph-block CommonShapes : begin
|
|||
if transformShiftOnly : begin
|
||||
local {.x mx1 .y my1} : giz.apply {.x mx .y my}
|
||||
include : Translate (mx1 - mx) (my1 - my)
|
||||
glyph-block-export CircleRingAt
|
||||
define [CircleRingAt x y r] : CircleRing (y + r) (y - r) (x - r) (x + r)
|
||||
glyph-block-export CircleDotAt
|
||||
define [CircleDotAt x y r] : CircleRing (y + r) (y - r) (x - r) (x + r) true
|
||||
|
||||
glyph-block-export OShapeT
|
||||
define [OShapeT sink u d l r _width _sma _smb] : glyph-proc
|
||||
local middle : (l + r) / 2
|
||||
local width : fallback _width Stroke
|
||||
|
@ -157,12 +180,15 @@ glyph-block CommonShapes : begin
|
|||
arcvh
|
||||
close
|
||||
|
||||
glyph-block-export OShape
|
||||
define [OShape u d l r _width _sma _smb] : OShapeT dispiro u d l r _width _sma _smb
|
||||
glyph-block-export OShapeOutline
|
||||
define [OShapeOutline u d l r _width _sma _smb] : OShapeT spiro-outline u d l r _width _sma _smb
|
||||
|
||||
set OShape.NoOvershoot : lambda [u d l r _width _sma _smb] : OShape (u + O) (d - O) (l - OX) (r + OX) _width _sma _smb
|
||||
set OShapeOutline.NoOvershoot : lambda [u d l r _width _sma _smb] : OShapeOutline (u + O) (d - O) (l - OX) (r + OX) _width _sma _smb
|
||||
|
||||
glyph-block-export OShapeFlatTB
|
||||
define [OShapeFlatTB u d l r _width _sma _smb gap] : glyph-proc
|
||||
local middle : (l + r) / 2
|
||||
local width : fallback _width Stroke
|
||||
|
@ -202,6 +228,7 @@ glyph-block CommonShapes : begin
|
|||
flat (middle - mc + gap / 2) (u - O)
|
||||
curl (middle - mc) (u - O)
|
||||
|
||||
glyph-block-export OBarLeftShape
|
||||
define [OBarLeftShape] : params [[top XH] [left SB] [stroke Stroke] [fine ShoulderFine]] : begin
|
||||
local st : shoulderMidSlope fine nothing 1
|
||||
local sb : shoulderMidSlope fine nothing (-1)
|
||||
|
@ -221,6 +248,7 @@ glyph-block CommonShapes : begin
|
|||
flat (left + (stroke - fine) * HVContrast) (top - SmallSmoothA) [widths fine 0]
|
||||
curl (left + (stroke - fine) * HVContrast) (top - SmallSmoothA - 0.01) [widths fine 0]
|
||||
|
||||
glyph-block-export OBarLeftToothlessShape
|
||||
define [OBarLeftToothlessShape _top _left _rise _mBlend] : glyph-proc
|
||||
local top : fallback _top XH
|
||||
local left : fallback _left SB
|
||||
|
@ -244,6 +272,7 @@ glyph-block CommonShapes : begin
|
|||
flat (left + (Stroke - fine) * HVContrast) (top - SmallSmoothA) [widths fine 0]
|
||||
curl (left + (Stroke - fine) * HVContrast) (top - SmallSmoothA - 0.01) [widths fine 0]
|
||||
|
||||
glyph-block-export OBarLeftRoundedShape
|
||||
define [OBarLeftRoundedShape _top _left _yTerminal] : glyph-proc
|
||||
local top : fallback _top XH
|
||||
local left : fallback _left SB
|
||||
|
@ -267,6 +296,7 @@ glyph-block CommonShapes : begin
|
|||
flat (left + (Stroke - fine) * HVContrast) (top - SmallSmoothA) [widths fine 0]
|
||||
curl (left + (Stroke - fine) * HVContrast) (top - SmallSmoothA - 0.01) [widths fine 0]
|
||||
|
||||
glyph-block-export OBarLeftToothlessTopShape
|
||||
define [OBarLeftToothlessTopShape _top _left _rise _mBlend] : glyph-proc
|
||||
local top : fallback _top XH
|
||||
local left : fallback _left SB
|
||||
|
@ -290,6 +320,7 @@ glyph-block CommonShapes : begin
|
|||
alsoThru.g2 0.5 (1 - mBlend) important
|
||||
g4 left (top - rise) [widths.lhs Stroke]
|
||||
|
||||
glyph-block-export OBarLeftRoundedTopShape
|
||||
define [OBarLeftRoundedTopShape _top _left _yTerminal] : glyph-proc
|
||||
local top : fallback _top XH
|
||||
local left : fallback _left SB
|
||||
|
@ -313,6 +344,7 @@ glyph-block CommonShapes : begin
|
|||
flat left (top - SmallSmoothA)
|
||||
curl left yTerminal [widths.lhs.heading Stroke Downward]
|
||||
|
||||
glyph-block-export OBarRightShape
|
||||
define [OBarRightShape] : params [[top XH] [right RightSB] [stroke Stroke] [fine ShoulderFine]] : new-glyph : glyph-proc
|
||||
include : OBarLeftShape
|
||||
top -- [fallback top XH]
|
||||
|
@ -321,10 +353,12 @@ glyph-block CommonShapes : begin
|
|||
fine -- fine
|
||||
include : FlipAround Middle (top / 2)
|
||||
|
||||
glyph-block-export OBarRightToothlessShape
|
||||
define [OBarRightToothlessShape _top _right _rise _mBlend] : new-glyph : glyph-proc
|
||||
include : OBarLeftToothlessTopShape _top (Width - [fallback _right RightSB]) _rise _mBlend
|
||||
include : FlipAround Middle ([fallback _top XH] / 2)
|
||||
|
||||
glyph-block-export OBarRightRoundedShape
|
||||
define [OBarRightRoundedShape _top _right _yTerminal] : new-glyph : glyph-proc
|
||||
local top : fallback _top XH
|
||||
local right : fallback right RightSB
|
||||
|
@ -332,40 +366,48 @@ glyph-block CommonShapes : begin
|
|||
include : OBarLeftRoundedTopShape top (Width - right) (top - yTerminal)
|
||||
include : FlipAround Middle (top / 2)
|
||||
|
||||
glyph-block-export LeftwardTopSerif
|
||||
define [LeftwardTopSerif x y length _sw] : glyph-proc
|
||||
local sw : fallback _sw Stroke
|
||||
include : dispiro
|
||||
flat (x + sw / 2 * HVContrast) y [widths.heading sw 0 Leftward]
|
||||
curl (x - length - TanSlope * (sw * DesignParameters.serifShiftX)) y
|
||||
|
||||
glyph-block-export LeftwardBottomSerif
|
||||
define [LeftwardBottomSerif x y length _sw] : glyph-proc
|
||||
local sw : fallback _sw Stroke
|
||||
include : dispiro
|
||||
flat (x + sw / 2 * HVContrast) y [widths.heading 0 sw Leftward]
|
||||
curl (x - length + TanSlope * (sw * DesignParameters.serifShiftX)) y
|
||||
|
||||
glyph-block-export RightwardTopSerif
|
||||
define [RightwardTopSerif x y length _sw] : glyph-proc
|
||||
local sw : fallback _sw Stroke
|
||||
include : dispiro
|
||||
flat (x - sw / 2 * HVContrast) y [widths.heading 0 sw Rightward]
|
||||
curl (x + length - TanSlope * (sw * DesignParameters.serifShiftX)) y
|
||||
|
||||
glyph-block-export RightwardBottomSerif
|
||||
define [RightwardBottomSerif x y length _sw] : glyph-proc
|
||||
local sw : fallback _sw Stroke
|
||||
include : dispiro
|
||||
flat (x - sw / 2 * HVContrast) y [widths.heading sw 0 Rightward]
|
||||
curl (x + length + TanSlope * (sw * DesignParameters.serifShiftX)) y
|
||||
|
||||
glyph-block-export CenterTopSerif
|
||||
define [CenterTopSerif x y length _sw] : CenterTopSerifAsymmetric x y length length _sw
|
||||
|
||||
glyph-block-export CenterBottomSerif
|
||||
define [CenterBottomSerif x y length _sw] : CenterBottomSerifAsymmetric x y length length _sw
|
||||
|
||||
glyph-block-export CenterTopSerifAsymmetric
|
||||
define [CenterTopSerifAsymmetric x y l r _sw] : begin
|
||||
local sw : fallback _sw Stroke
|
||||
return : dispiro
|
||||
flat (x + r - TanSlope * (sw * DesignParameters.serifShiftX)) y [widths sw 0]
|
||||
curl (x - l - TanSlope * (sw * DesignParameters.serifShiftX)) y
|
||||
|
||||
glyph-block-export CenterBottomSerifAsymmetric
|
||||
define [CenterBottomSerifAsymmetric x y l r _sw] : begin
|
||||
local sw : fallback _sw Stroke
|
||||
return : dispiro
|
||||
|
@ -373,53 +415,66 @@ glyph-block CommonShapes : begin
|
|||
curl (x - l + TanSlope * (sw * DesignParameters.serifShiftX)) y
|
||||
|
||||
define VJutSw : AdviceStroke 3.5
|
||||
glyph-block-export DownwardRightSerif
|
||||
define [DownwardRightSerif x y length sw] : glyph-proc
|
||||
include : dispiro
|
||||
widths.rhs [fallback sw VJutSw]
|
||||
flat x y [heading Downward]
|
||||
curl x (y - length) [heading Downward]
|
||||
glyph-block-export UpwardRightSerif
|
||||
define [UpwardRightSerif x y length sw] : glyph-proc
|
||||
include : dispiro
|
||||
widths.lhs [fallback sw VJutSw]
|
||||
flat x y [heading Upward]
|
||||
curl x (y + length) [heading Upward]
|
||||
glyph-block-export DownwardLeftSerif
|
||||
define [DownwardLeftSerif x y length sw] : glyph-proc
|
||||
include : dispiro
|
||||
widths.lhs [fallback sw VJutSw]
|
||||
flat x y [heading Downward]
|
||||
curl x (y - length) [heading Downward]
|
||||
glyph-block-export UpwardLeftSerif
|
||||
define [UpwardLeftSerif x y length sw] : glyph-proc
|
||||
include : dispiro
|
||||
widths.rhs [fallback sw VJutSw]
|
||||
flat x y [heading Upward]
|
||||
curl x (y + length) [heading Upward]
|
||||
|
||||
glyph-block-export NeedSlab
|
||||
define [NeedSlab level p] : if level p [glyph-proc]
|
||||
glyph-block-export NeedNotItalic
|
||||
define [NeedNotItalic p] : if para.isItalic [glyph-proc] p
|
||||
|
||||
glyph-block-export DiagCor
|
||||
define [DiagCor dy dx dyt dxt] : begin
|
||||
local ay : Math.max 0 : [Math.abs dy] - [fallback dyt 0]
|
||||
local ax : Math.max 0 : [Math.abs dx] - [fallback dxt 0]
|
||||
return : [Math.hypot ay ax] / ay
|
||||
|
||||
glyph-block-export DiagCorDs
|
||||
define [DiagCorDs dy dx ds] : begin
|
||||
local kDiag : DiagCor dy dx
|
||||
for [local n 0] (n < 4) [inc n] : begin
|
||||
set kDiag : DiagCor dy (dx - ds * kDiag)
|
||||
return kDiag
|
||||
|
||||
glyph-block-export HBar
|
||||
define [HBar xleft xright y _fine] : glyph-proc
|
||||
include : dispiro
|
||||
widths.center [fallback _fine Stroke]
|
||||
flat xleft y [heading : RightwardT.call this]
|
||||
curl xright y [heading : RightwardT.call this]
|
||||
|
||||
glyph-block-export HBarTop
|
||||
define [HBarTop xl xr y _fine] : HBar xl xr (y - [fallback _fine Stroke] * 0.5) _fine
|
||||
glyph-block-export HBarBottom
|
||||
define [HBarBottom xl xr y _fine] : HBar xl xr (y + [fallback _fine Stroke] * 0.5) _fine
|
||||
glyph-block-export HOverlayBar
|
||||
define [HOverlayBar xleft xright y s] : dispiro
|
||||
widths.center [fallback s OverlayStroke]
|
||||
flat xleft y
|
||||
curl xright y
|
||||
glyph-block-export HCrossBar
|
||||
define [HCrossBar xl xr y s] : dispiro
|
||||
widths.center [fallback s OverlayStroke]
|
||||
flat xl y
|
||||
|
@ -430,6 +485,9 @@ glyph-block CommonShapes : begin
|
|||
set HCrossBar.bottom : lambda [xl xr y _s] : begin
|
||||
local s : fallback _s Stroke
|
||||
return : HCrossBar (xl + 0 * s * TanSlope) (xr + 0 * s * TanSlope) (y + 0.5 * s) s
|
||||
|
||||
|
||||
glyph-block-export VBar
|
||||
define [VBar x ydown yup _fine] : glyph-proc
|
||||
local fine : fallback _fine Stroke
|
||||
include : dispiro
|
||||
|
@ -437,9 +495,12 @@ glyph-block CommonShapes : begin
|
|||
flat x ydown [heading : [if (ydown < yup) UpwardT DownwardT].call this]
|
||||
curl x yup [heading : [if (ydown < yup) UpwardT DownwardT].call this]
|
||||
|
||||
glyph-block-export VBarLeft
|
||||
define [VBarLeft x yd yu _fine] : VBar (x + [fallback _fine Stroke] * 0.5 * HVContrast) yd yu _fine
|
||||
glyph-block-export VBarRight
|
||||
define [VBarRight x yd yu _fine] : VBar (x - [fallback _fine Stroke] * 0.5 * HVContrast) yd yu _fine
|
||||
|
||||
glyph-block-export VerticalHook
|
||||
define [VerticalHook] : params [x y xDepth yDepth [sw Stroke] [xExtension 0] [yExtension 0]]
|
||||
dispiro [widths.center sw]
|
||||
flat x (y + yExtension) [heading [if (yDepth > 0) Downward Upward]]
|
||||
|
@ -448,6 +509,7 @@ glyph-block CommonShapes : begin
|
|||
flat (x + xDepth - [if (xDepth > 0) 0.01 (-0.01)]) (y - yDepth)
|
||||
curl (x + xDepth + xExtension) (y - yDepth)
|
||||
|
||||
glyph-block-export LeftHook
|
||||
define [LeftHook x y xextend] : glyph-proc
|
||||
local fine : AdviceStroke 4.25
|
||||
include : dispiro
|
||||
|
@ -458,6 +520,7 @@ glyph-block CommonShapes : begin
|
|||
g4.down.end (x - LeftHook.extension) (y - HookX) [heading Downward]
|
||||
set LeftHook.extension [Math.max (Width * 0.15) ([AdviceStroke 4.25] * 1.5)]
|
||||
|
||||
glyph-block-export FlatSlashShape
|
||||
define [FlatSlashShape middlex middle fine kx ky] : glyph-proc
|
||||
include : dispiro
|
||||
flat (middlex - LongJut * [fallback kx 0.8]) (middle - LongJut * [fallback ky 0.4]) [widths fine fine]
|
||||
|
@ -566,6 +629,7 @@ glyph-block CommonShapes : begin
|
|||
define [hookEndBlender before after args] : begin
|
||||
return : HookShape before after false args.y args.tight args.sw args.swItalicAdj args.noAdjTerminalY
|
||||
|
||||
glyph-block-export hookstart
|
||||
define [hookstart] : params [y tight sw swItalicAdj noAdjTerminalY] : return {
|
||||
.type 'interpolate'
|
||||
.blender hookStartBlender
|
||||
|
@ -575,6 +639,7 @@ glyph-block CommonShapes : begin
|
|||
.swItalicAdj swItalicAdj
|
||||
.noAdjTerminalY noAdjTerminalY
|
||||
}
|
||||
glyph-block-export hookend
|
||||
define [hookend] : params [y tight sw swItalicAdj noAdjTerminalY] : return {
|
||||
.type 'interpolate'
|
||||
.blender hookEndBlender
|
||||
|
@ -586,23 +651,30 @@ glyph-block CommonShapes : begin
|
|||
}
|
||||
|
||||
# Composite transformations
|
||||
glyph-block-export FlipAround
|
||||
define [FlipAround x y sx sy] : glyph-proc
|
||||
include : Upright
|
||||
include : Translate (-x) (-y)
|
||||
include : Scale [fallback sx (-1)] [fallback sy sx (-1)]
|
||||
include : Translate x y
|
||||
include : Italify
|
||||
|
||||
glyph-block-export ScaleAround
|
||||
define ScaleAround FlipAround
|
||||
|
||||
glyph-block-export Realign
|
||||
define [Realign x y sx sy] : ApparentTranslate (sx - x) (sy - y)
|
||||
|
||||
glyph-block-export ForceUpright
|
||||
define [ForceUpright] : glyph-proc [set this.gizmo : Transform.Id]
|
||||
|
||||
glyph-block-export NameUni
|
||||
define [NameUni unicode] : begin
|
||||
local hex : [unicode.toString 16].toUpperCase
|
||||
while (hex.length < 4) : set hex : '0' + hex
|
||||
return : 'uni' + hex
|
||||
|
||||
glyph-block-export PointingTo
|
||||
define [PointingTo x1 y1 x2 y2 G] : glyph-proc
|
||||
local giz this.gizmo
|
||||
local g : new-glyph : glyph-proc
|
||||
|
@ -616,24 +688,39 @@ glyph-block CommonShapes : begin
|
|||
include giz
|
||||
include g
|
||||
|
||||
glyph-block-export WithTransform
|
||||
define [WithTransform tfm gr] : glyph-proc : include : new-glyph : composite-proc gr tfm
|
||||
|
||||
glyph-block-export clear-anchors
|
||||
define [clear-anchors] : glyph-proc
|
||||
set currentGlyph.markAnchors {.}
|
||||
set currentGlyph.markBnchors {.}
|
||||
|
||||
glyph-block-export AsRadical
|
||||
define [AsRadical gr] : glyph-proc
|
||||
Radical.set currentGlyph
|
||||
include gr true true
|
||||
|
||||
glyph-block-export ExtLineCenter
|
||||
define [ExtLineCenter k sw x1 y1 x2 y2] : dispiro
|
||||
widths.center sw
|
||||
corner [mix x1 x2 (-k)] [mix y1 y2 (-k)]
|
||||
corner [mix x1 x2 (1+k)] [mix y1 y2 (1+k)]
|
||||
|
||||
glyph-block-export ExtLineLhs
|
||||
define [ExtLineLhs k sw x1 y1 x2 y2] : dispiro
|
||||
widths.lhs sw
|
||||
corner [mix x1 x2 (-k)] [mix y1 y2 (-k)]
|
||||
corner [mix x1 x2 (1+k)] [mix y1 y2 (1+k)]
|
||||
|
||||
glyph-block-export Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt DotStrokeAt CircleRing CircleRingAt CircleDotAt OShapeT OShape OShapeOutline OShapeFlatTB OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterTopSerifAsymmetric CenterBottomSerif CenterBottomSerifAsymmetric DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif NeedSlab NeedNotItalic HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LeftHook FlatSlashShape hookstart hookend FlipAround ScaleAround Realign ForceUpright DiagCor NameUni PointingTo WithTransform clear-anchors OBarLeftToothlessShape OBarLeftRoundedShape OBarRightToothlessShape OBarRightRoundedShape AsRadical ExtLineCenter ExtLineLhs DiagCorDs HCrossBar VERY-FAR MaskAbove MaskBelow MaskLeft MaskRight HalfRectTriangle MaskAboveLine MaskBelowLine MaskLeftLine MaskRightLine
|
||||
# Dot variant constructor
|
||||
glyph-block-export DotVariants
|
||||
define DotVariants : object
|
||||
round { DotAt 1 O }
|
||||
square { SquareAt DesignParameters.squareDotScalar 0 }
|
||||
|
||||
glyph-block-export WithDotVariants
|
||||
define [WithDotVariants name unicode F] : begin
|
||||
foreach { suffix { DrawAt kDotRadius overshoot } } [Object.entries DotVariants] : do
|
||||
create-glyph "\(name).\(suffix)" : F DrawAt kDotRadius overshoot
|
||||
select-variant name unicode (follow -- 'punctuationDot')
|
||||
|
|
|
@ -244,7 +244,6 @@ glyph-block Symbol-Cyrl-Thousands : begin
|
|||
glyph-block Symbol-Letter-Punctuation-Composite : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
|
||||
WithDotVariants 'LDotDot' null : function [DrawAt kdr overshoot] : glyph-proc
|
||||
set-width 0
|
||||
|
|
|
@ -9,7 +9,6 @@ glyph-block Symbol-Math-Arith : begin
|
|||
glyph-block-import Common-Derivatives
|
||||
glyph-block-export PlusShape
|
||||
glyph-block-import Symbol-Math-Frame : MathEnclosureSw
|
||||
glyph-block-import Shared-Symbol-Shapes : DotVariants
|
||||
|
||||
define [PlusShape left right s sw] : union
|
||||
HBar left right SymbolMid [fallback sw OperatorStroke]
|
||||
|
|
|
@ -7,7 +7,6 @@ glyph-module
|
|||
glyph-block Symbol-Math-Dots-And-Colons : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : DotVariants
|
||||
|
||||
foreach { suffix { DrawAt kDotRadius overshoot } } [Object.entries DotVariants] : do
|
||||
local radius1 : PeriodRadius * kDotRadius * OperatorStroke / Stroke
|
||||
|
|
|
@ -8,7 +8,6 @@ glyph-block Symbol-Math-Integrals : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Letter-Latin-Long-S : LongSShape
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
|
||||
define MosaicTop fontMetrics.os2.sTypoAscender
|
||||
define MosaicBottom fontMetrics.os2.sTypoDescender
|
||||
|
|
|
@ -31,7 +31,6 @@ glyph-block Symbol-Math-Relation-Common : begin
|
|||
glyph-block Symbol-Math-Relation-Equal : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
glyph-block-import Symbol-Math-Relation-Common : EqualHalfSpace dH
|
||||
glyph-block-export EqualShape EqualHole IdentShape IdentHole
|
||||
|
||||
|
@ -175,7 +174,6 @@ glyph-block Symbol-Math-Relation-Addons : begin
|
|||
glyph-block Symbol-Math-Relation-Colons : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
glyph-block-import Symbol-Arrow : ArrowShape
|
||||
glyph-block-import Symbol-Math-Relation-Equal : EqualShape
|
||||
|
||||
|
@ -208,7 +206,6 @@ glyph-block Symbol-Math-Relation-Sym : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Mark-Above : TildeShape
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
glyph-block-import Symbol-Math-Relation-Common : EqualHalfSpace
|
||||
glyph-block-import Symbol-Math-Relation-Addons : EqEqBarNegationImpl
|
||||
|
||||
|
@ -280,7 +277,6 @@ glyph-block Symbol-Math-Relation-Sym : begin
|
|||
glyph-block Symbol-Math-Relation-Inequality : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
glyph-block-import Symbol-Math-Relation-Common : dH lessEqDist
|
||||
glyph-block-import Symbol-Math-Relation-Sym : symWave
|
||||
glyph-block-import Symbol-Math-Relation-Addons : lesslessSW EqEqBarNegation llggHeight
|
||||
|
|
|
@ -10,7 +10,6 @@ glyph-block Symbol-Math-VAndCup : begin
|
|||
glyph-block-import Letter-Latin-U : UShape
|
||||
glyph-block-import Letter-Greek-Pi : PiShape
|
||||
glyph-block-import Symbol-Arrow : ArrowShape
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
|
||||
define [VeeShape top bot sw] : union
|
||||
dispiro
|
||||
|
|
|
@ -7,7 +7,6 @@ glyph-module
|
|||
glyph-block Symbol-Pictograph-Kome : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
|
||||
for-width-kinds WideWidth1 "Kome"
|
||||
WithDotVariants [MangleName 'kome'] [MangleUnicode 0x203B] : function [DrawAt kdr ov]
|
||||
|
|
|
@ -8,7 +8,6 @@ glyph-module
|
|||
glyph-block Symbol-Punctuation-Ellipsis : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : DotVariants
|
||||
|
||||
define [EllipsisDotRadius darkness space] : begin
|
||||
return : 0.5 * [AdviceStroke darkness (space / Width)] * PeriodSize / Stroke
|
||||
|
|
|
@ -8,7 +8,6 @@ glyph-module
|
|||
glyph-block Symbol-Punctuation-Emotion : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : DotVariants
|
||||
|
||||
local emotionBottom : Math.max (CAP * 0.3) (DotSize * 1.5)
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ glyph-block Symbol-Punctuation-Interpuncts : begin
|
|||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Punctuation-Small
|
||||
glyph-block-import Shared-Symbol-Shapes : DotVariants
|
||||
|
||||
foreach { suffix { DrawAt kDotRadius overshoot } } [Object.entries DotVariants] : do
|
||||
create-glyph "interpunct.\(suffix)" : glyph-proc
|
||||
|
|
|
@ -8,7 +8,6 @@ glyph-module
|
|||
glyph-block Symbol-Punctuation-Percentages : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : WithDotVariants
|
||||
|
||||
define [NarrowUnicode u] : if (para.spacing < 1) u null
|
||||
define [WideUnicode u] : if (para.spacing >= 1) u null
|
||||
|
|
|
@ -9,7 +9,6 @@ glyph-module
|
|||
glyph-block Symbol-Punctuation-Small : begin
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Shared-Symbol-Shapes : DotVariants
|
||||
|
||||
foreach { suffix { DrawAt kDotRadius overshoot } } [Object.entries DotVariants] : do
|
||||
create-glyph "period.\(suffix)" : glyph-proc
|
||||
|
|
|
@ -35,15 +35,3 @@ glyph-block Shared-Symbol-Shapes : begin
|
|||
|
||||
define [WaveShape] : params [left right xsJoin xfJoin diagJoinS diagJoinF [waveCount 1] [unitWidth Width]] : WaveShapeImpl (unitWidth * -left) (unitWidth * (1 + right)) (-left * waveCount) ((1 + right) * waveCount) xsJoin xfJoin diagJoinS diagJoinF
|
||||
return WaveShape
|
||||
|
||||
# Dot variant constructor
|
||||
glyph-block-export DotVariants
|
||||
define DotVariants : object
|
||||
round { DotAt 1 O }
|
||||
square { SquareAt DesignParameters.squareDotScalar 0 }
|
||||
|
||||
glyph-block-export WithDotVariants
|
||||
define [WithDotVariants name unicode F] : begin
|
||||
foreach { suffix { DrawAt kDotRadius overshoot } } [Object.entries DotVariants] : do
|
||||
create-glyph "\(name).\(suffix)" : F DrawAt kDotRadius overshoot
|
||||
select-variant name unicode (follow -- 'punctuationDot')
|
||||
|
|
|
@ -144,7 +144,7 @@ define-macro glyph-block-import : syntax-rules
|
|||
OBarLeftToothlessShape OBarLeftRoundedShape OBarRightToothlessShape
|
||||
OBarRightRoundedShape AsRadical ExtLineCenter ExtLineLhs DiagCorDs HCrossBar VERY-FAR
|
||||
MaskAbove MaskBelow MaskLeft MaskRight HalfRectTriangle MaskAboveLine MaskBelowLine
|
||||
MaskLeftLine MaskRightLine]
|
||||
MaskLeftLine MaskRightLine DotVariants WithDotVariants]
|
||||
|
||||
define vartiableFilter : if externEnv.$glyphBlockVariableUsage$
|
||||
lambda [x] externEnv.$glyphBlockVariableUsage$.(x)
|
||||
|
|
|
@ -2,7 +2,10 @@ const UnicodeDataIndex = require("@unicode/unicode-14.0.0");
|
|||
|
||||
const BlockData = [
|
||||
[[0xe0a0, 0xe0df], "Private Use Area — Powerline"],
|
||||
[[0xee00, 0xee3f], "Private Use Area — Progress Bar"]
|
||||
[[0xee00, 0xee3f], "Private Use Area — Progress Bar"],
|
||||
// Missing ranges in UnicodeDataIndex
|
||||
[[0x1fa70, 0x1faff], "Symbols and Pictographs Extended-A "],
|
||||
[[0x1fb00, 0x1fbff], "Symbols for Legacy Computing"]
|
||||
];
|
||||
|
||||
for (const id of UnicodeDataIndex.Block) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue