Break down geometric script
This commit is contained in:
parent
a713896313
commit
795caee8c7
11 changed files with 1113 additions and 1030 deletions
File diff suppressed because it is too large
Load diff
44
font-src/glyphs/symbol/geometric/dotted.ptl
Normal file
44
font-src/glyphs/symbol/geometric/dotted.ptl
Normal file
|
@ -0,0 +1,44 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Dice : for-width-kinds WideWidth1
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
|
||||
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
|
||||
define diceCombinations : list
|
||||
list 0x2680 { { 1 1 } }
|
||||
list 0x2681 { { 0 0 } { 2 2 } }
|
||||
list 0x2682 { { 0 0 } { 1 1 } { 2 2 } }
|
||||
list 0x2683 { { 0 0 } { 2 0 } { 0 2 } { 2 2 } }
|
||||
list 0x2684 { { 0 0 } { 2 0 } { 1 1 } { 0 2 } { 2 2 } }
|
||||
list 0x2685 { { 0 0 } { 0 1 } { 0 2 } { 2 0 } { 2 1 } { 2 2 } }
|
||||
|
||||
foreach { unicode dots } [items-of diceCombinations] : begin
|
||||
create-glyph [MangleName "dice_\(unicode)"] [MangleUnicode unicode] : glyph-proc
|
||||
include [refer-glyph : MangleName 'whiteSquare'] AS_BASE ALSO_METRICS
|
||||
define dr : DotRadius / Stroke * [AdviceStroke 7 Geom.Scalar]
|
||||
define xLeftEx : Geom.MidX - Geom.Size + GeometryStroke
|
||||
define xRightEx : Geom.MidX + Geom.Size - GeometryStroke
|
||||
define yBottomEx : Geom.MidY + Geom.Size - GeometryStroke
|
||||
define yTopEx : Geom.MidY - Geom.Size + GeometryStroke
|
||||
define xLeft : mix xLeftEx xRightEx (1 / 5)
|
||||
define xRight : mix xLeftEx xRightEx (4 / 5)
|
||||
define yBottom : mix yBottomEx yTopEx (1 / 5)
|
||||
define yTop : mix yBottomEx yTopEx (4 / 5)
|
||||
foreach { px py } [items-of dots] : begin
|
||||
include : CircleDotAt
|
||||
mix xLeft xRight (px / 2)
|
||||
mix yBottom yTop (py / 2)
|
||||
begin dr
|
||||
|
||||
create-glyph [MangleName 'dottedWhiteTriangle'] [MangleUnicode 0x25EC] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : refer-glyph : MangleName 'whiteTriangleUp'
|
||||
include : CircleDotAt Geom.MidX (Geom.MidY - Geom.Size / 3) [Math.min (Geom.Width / 8 ) PeriodRadius]
|
210
font-src/glyphs/symbol/geometric/masked.ptl
Normal file
210
font-src/glyphs/symbol/geometric/masked.ptl
Normal file
|
@ -0,0 +1,210 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
|
||||
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
define Size : GeometricSizes Geom
|
||||
|
||||
define [UpperHalfMask] : Rect (Geom.MidY + Geom.Size * 2) Geom.MidY 0 Geom.Width
|
||||
define [LowerHalfMask] : Rect Geom.MidY (Geom.MidY - Geom.Size * 2) 0 Geom.Width
|
||||
define [LeftHalfMask] : Rect (Geom.MidY + Geom.Size * 2) (Geom.MidY - Geom.Size * 2) 0 Geom.MidX
|
||||
define [RightHalfMask] : Rect (Geom.MidY + Geom.Size * 2) (Geom.MidY - Geom.Size * 2) Geom.MidX Geom.Width
|
||||
define [UpperLeftQuarterMark] : intersection [UpperHalfMask] [LeftHalfMask]
|
||||
define [UpperRightQuarterMark] : intersection [UpperHalfMask] [RightHalfMask]
|
||||
define [LowerLeftQuarterMark] : intersection [LowerHalfMask] [LeftHalfMask]
|
||||
define [LowerRightQuarterMark] : intersection [LowerHalfMask] [RightHalfMask]
|
||||
define [UpperLeftHalfMark] : spiro-outline
|
||||
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY + Geom.Size * 2)
|
||||
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY + Geom.Size * 2)
|
||||
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY - Geom.Size * 2)
|
||||
define [LowerRightHalfMark] : spiro-outline
|
||||
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY + Geom.Size * 2)
|
||||
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY - Geom.Size * 2)
|
||||
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY - Geom.Size * 2)
|
||||
define [UpperRightHalfMark] : spiro-outline
|
||||
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY + Geom.Size * 2)
|
||||
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY + Geom.Size * 2)
|
||||
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY - Geom.Size * 2)
|
||||
define [LowerLeftHalfMark] : spiro-outline
|
||||
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY - Geom.Size * 2)
|
||||
corner (Geom.MidX - Geom.Size * 2) (Geom.MidY + Geom.Size * 2)
|
||||
corner (Geom.MidX + Geom.Size * 2) (Geom.MidY - Geom.Size * 2)
|
||||
|
||||
do "Partial circles"
|
||||
define partialCircleQuarters : list
|
||||
list 0x25D0 1 1 1 0 0
|
||||
list 0x25D1 1 0 0 1 1
|
||||
list 0x25D2 1 0 1 0 1
|
||||
list 0x25D3 1 1 0 1 0
|
||||
list 0x25D4 1 0 0 1 0
|
||||
list 0x25D5 1 0 1 1 1
|
||||
list 0x2BCA 0 1 0 1 0
|
||||
list 0x2BCB 0 0 1 0 1
|
||||
list 0x25D6 0 1 1 0 0
|
||||
list 0x25D7 0 0 0 1 1
|
||||
foreach [{u WC LT LB RT RB} : items-of partialCircleQuarters] : begin
|
||||
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
new-glyph : glyph-proc
|
||||
if WC : include : refer-glyph : MangleName 'whiteCircle'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackCircleO'
|
||||
new-glyph : glyph-proc
|
||||
if LT : include : UpperLeftQuarterMark
|
||||
if LB : include : LowerLeftQuarterMark
|
||||
if RT : include : UpperRightQuarterMark
|
||||
if RB : include : LowerRightQuarterMark
|
||||
|
||||
define arcQuarters : list
|
||||
list 0x25DC 1 0 0 0
|
||||
list 0x25DD 0 0 1 0
|
||||
list 0x25DE 0 0 0 1
|
||||
list 0x25DF 0 1 0 0
|
||||
list 0x25E0 1 0 1 0
|
||||
list 0x25E1 0 1 0 1
|
||||
foreach [{u LT LB RT RB} : items-of arcQuarters] : begin
|
||||
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : intersection
|
||||
refer-glyph : MangleName 'whiteCircle'
|
||||
new-glyph : glyph-proc
|
||||
if LT : include : UpperLeftQuarterMark
|
||||
if LB : include : LowerLeftQuarterMark
|
||||
if RT : include : UpperRightQuarterMark
|
||||
if RB : include : LowerRightQuarterMark
|
||||
|
||||
do "Partial square"
|
||||
define squareParts : list
|
||||
list 0x25E7 1 1 0 0 0 0 0 0
|
||||
list 0x25E8 0 0 1 1 0 0 0 0
|
||||
list 0x25E9 0 0 0 0 1 0 0 0
|
||||
list 0x2B14 0 0 0 0 0 0 1 0
|
||||
list 0x2B15 0 0 0 0 0 1 0 0
|
||||
list 0x25EA 0 0 0 0 0 0 0 1
|
||||
foreach [{u LT LB RT RB LTh LBh RTh RBh} : items-of squareParts] : begin
|
||||
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteSquare'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackSquare'
|
||||
new-glyph : glyph-proc
|
||||
if LT : include : UpperLeftQuarterMark
|
||||
if LB : include : LowerLeftQuarterMark
|
||||
if RT : include : UpperRightQuarterMark
|
||||
if RB : include : LowerRightQuarterMark
|
||||
if LTh : include : UpperLeftHalfMark
|
||||
if LBh : include : LowerLeftHalfMark
|
||||
if RTh : include : UpperRightHalfMark
|
||||
if RBh : include : LowerRightHalfMark
|
||||
|
||||
do "Partial diamond"
|
||||
define diamondParts : list
|
||||
list 0x2B16 1 1 0 0
|
||||
list 0x2B17 0 0 1 1
|
||||
list 0x2B18 1 0 1 0
|
||||
list 0x2B19 0 1 0 1
|
||||
foreach [{u LT LB RT RB LTh LBh RTh RBh} : items-of diamondParts] : begin
|
||||
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteDiamond'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackDiamond'
|
||||
new-glyph : glyph-proc
|
||||
if LT : include : UpperLeftQuarterMark
|
||||
if LB : include : LowerLeftQuarterMark
|
||||
if RT : include : UpperRightQuarterMark
|
||||
if RB : include : LowerRightQuarterMark
|
||||
|
||||
do "Partial triangle"
|
||||
define triangleParts : list
|
||||
list 0x25ED 1 0 1 0
|
||||
list 0x25EE 1 0 0 1
|
||||
list 0x29E8 0 1 1 0
|
||||
list 0x29E9 0 1 0 1
|
||||
foreach [{u UP DN LH RH} : items-of triangleParts] : begin
|
||||
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
glyph-proc
|
||||
if UP : include : refer-glyph : MangleName 'whiteTriangleUp'
|
||||
if DN : include : refer-glyph : MangleName 'whiteTriangleDown'
|
||||
intersection
|
||||
glyph-proc
|
||||
if UP : include : refer-glyph : MangleName 'blackTriangleUp'
|
||||
if DN : include : refer-glyph : MangleName 'blackTriangleDown'
|
||||
glyph-proc
|
||||
if LH : include : LeftHalfMask
|
||||
if RH : include : RightHalfMask
|
||||
|
||||
do "Partial Stars"
|
||||
define starParts : list
|
||||
list 0x2BE8 1 0 0
|
||||
list 0x2BE9 0 1 0
|
||||
list 0x2BEA 1 0 1
|
||||
list 0x2BEB 0 1 1
|
||||
|
||||
foreach { u lh rh bord } [items-of starParts] : begin
|
||||
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
|
||||
set-width Geom.Width
|
||||
if bord : include [refer-glyph : MangleName 'whiteStar']
|
||||
if lh : include : intersection [LeftHalfMask] [refer-glyph : MangleName 'blackStar']
|
||||
if rh : include : intersection [RightHalfMask] [refer-glyph : MangleName 'blackStar']
|
||||
|
||||
do "Quarter-line square and circle"
|
||||
define quarterLineParts : list
|
||||
list 0x25F0 'whiteSquare' 1 1 0 0
|
||||
list 0x25F1 'whiteSquare' 0 1 1 0
|
||||
list 0x25F2 'whiteSquare' 0 0 1 1
|
||||
list 0x25F3 'whiteSquare' 1 0 0 1
|
||||
list 0x25F4 'whiteCircle' 1 1 0 0
|
||||
list 0x25F5 'whiteCircle' 0 1 1 0
|
||||
list 0x25F6 'whiteCircle' 0 0 1 1
|
||||
list 0x25F7 'whiteCircle' 1 0 0 1
|
||||
foreach { u frame T L B R } [items-of quarterLineParts] : begin
|
||||
create-glyph [MangleName ('uni' + u)] [MangleUnicode u] : glyph-proc
|
||||
local hh : GeometryStroke / 2 * HVContrast
|
||||
local hv : GeometryStroke / 2
|
||||
local s GeometryStroke
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph [MangleName frame]
|
||||
if L [HBar (Geom.MidX - Geom.Size + hh) (Geom.MidX + hh) Geom.MidY s] [glyph-proc]
|
||||
if R [HBar (Geom.MidX + Geom.Size - hh) (Geom.MidX - hh) Geom.MidY s] [glyph-proc]
|
||||
if T [VBar Geom.MidX (Geom.MidY + Geom.Size - hv) (Geom.MidY - hv) s] [glyph-proc]
|
||||
if B [VBar Geom.MidX (Geom.MidY - Geom.Size + hv) (Geom.MidY + hv) s] [glyph-proc]
|
||||
|
||||
do "Miscellaneous"
|
||||
create-glyph [MangleName 'uni25D8'] [MangleUnicode 0x25D8] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : difference
|
||||
refer-glyph : MangleName 'blackLongRectangle'
|
||||
refer-glyph : MangleName 'blackCircle'
|
||||
|
||||
create-glyph [MangleName 'uni25D9'] [MangleUnicode 0x25D9] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : difference
|
||||
refer-glyph : MangleName 'blackLongRectangle'
|
||||
refer-glyph : MangleName 'whiteCircle'
|
||||
|
||||
create-glyph [MangleName 'uni25DA'] [MangleUnicode 0x25DA] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : intersection
|
||||
refer-glyph : MangleName 'uni25D9'
|
||||
UpperHalfMask
|
||||
|
||||
create-glyph [MangleName 'uni25DB'] [MangleUnicode 0x25DB] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : intersection
|
||||
refer-glyph : MangleName 'uni25D9'
|
||||
LowerHalfMask
|
452
font-src/glyphs/symbol/geometric/plain.ptl
Normal file
452
font-src/glyphs/symbol/geometric/plain.ptl
Normal file
|
@ -0,0 +1,452 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
|
||||
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
define Size : GeometricSizes Geom
|
||||
|
||||
define [StdBlackShape fn name unicode props] : begin
|
||||
local pp : fallback props {.}
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
Geom.Size * [fallback pp.size 1]
|
||||
begin 0
|
||||
|
||||
define [StdWhiteShapeImpl fn s out in props] : begin
|
||||
local pp : fallback props {.}
|
||||
local sw : fallback pp.sw GeometryStroke
|
||||
return : difference
|
||||
fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
s * Geom.Size * [fallback pp.size 1] + out * sw
|
||||
(-out) * sw
|
||||
fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
s * Geom.Size * [fallback pp.size 1] - in * sw
|
||||
in * sw
|
||||
|
||||
define [ConvexWhitePolygonImpl fn props] : begin
|
||||
local pp : fallback props {.}
|
||||
local sh : new-glyph : fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
Geom.Size * [fallback pp.size 1]
|
||||
begin 0
|
||||
local outlines : glyph-proc : begin
|
||||
set this.gizmo : Translate 0 0
|
||||
foreach c [items-of sh.contours] : foreach j [range 0 c.length] : begin
|
||||
local a c.[if j (j - 1) (c.length - 1)]
|
||||
local b c.(j)
|
||||
include : dispiro
|
||||
disable-contrast
|
||||
widths.center ([fallback pp.sw GeometryStroke] * 2)
|
||||
corner [mix a.x b.x (-2)] [mix a.y b.y (-2)]
|
||||
corner [mix a.x b.x (+3)] [mix a.y b.y (+3)]
|
||||
|
||||
return : intersection sh outlines
|
||||
|
||||
define [StdWhiteShape fn name unicode props] : begin
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : StdWhiteShapeImpl fn 1 0 1 props
|
||||
|
||||
define [StdWhiteContainingBlackShape fn name unicode props] : begin
|
||||
local pp : fallback props {.}
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
local sw : fallback pp.sw GeometryStroke
|
||||
include : fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
[fallback pp.innerSize 0.5] * (Geom.Size * [fallback pp.size 1] - sw)
|
||||
begin 0
|
||||
include : StdWhiteShapeImpl fn 1 0 1 props
|
||||
|
||||
define [ConvexPolygonWhiteContainingBlackShape fn name unicode props] : begin
|
||||
local pp : fallback props {.}
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
local sw : fallback pp.sw GeometryStroke
|
||||
include : fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
[fallback pp.innerSize 0.5] * (Geom.Size * [fallback pp.size 1] - sw)
|
||||
begin 0
|
||||
include : ConvexWhitePolygonImpl fn props
|
||||
|
||||
define [StdGeomTargetShape fn name unicode props] : begin
|
||||
local pp : fallback props {.}
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
local sw : fallback pp.sw GeometryStroke
|
||||
include : fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
[fallback pp.innerSize 0.25] * (Geom.Size * [fallback pp.size 1] - sw * 2)
|
||||
begin 0
|
||||
include : StdWhiteShapeImpl fn 1 0 1 props
|
||||
include : StdWhiteShapeImpl fn [mix 1 [fallback pp.innerSize 0.25] 0.5] 0 1 props
|
||||
|
||||
define [StdDoubleWhite fn name unicode props] : begin
|
||||
local pp : fallback props {.}
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
local sw : fallback pp.sw GeometryStroke
|
||||
include : difference
|
||||
fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
0.5 * (Geom.Size * [fallback pp.size 1] - sw)
|
||||
begin 0
|
||||
fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
0.5 * (Geom.Size * [fallback pp.size 1] - sw) - sw
|
||||
begin sw
|
||||
include : difference
|
||||
fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
Geom.Size * [fallback pp.size 1]
|
||||
begin 0
|
||||
fn
|
||||
fallback pp.cx Geom.MidX
|
||||
fallback pp.cy Geom.MidY
|
||||
Geom.Size * [fallback pp.size 1] - sw
|
||||
begin sw
|
||||
|
||||
define [ConvexWhitePolygon fn name unicode props] : begin
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : ConvexWhitePolygonImpl fn props
|
||||
|
||||
|
||||
do "Square and Half-square triangle"
|
||||
define [SquareShape cx cy size] : spiro-outline
|
||||
corner (cx - size) (cy + size)
|
||||
corner (cx + size) (cy + size)
|
||||
corner (cx + size) (cy - size)
|
||||
corner (cx - size) (cy - size)
|
||||
|
||||
StdBlackShape SquareShape 'blackSquare' 0x25A0
|
||||
StdWhiteShape SquareShape 'whiteSquare' 0x25A1
|
||||
|
||||
StdWhiteShape SquareShape 'lightWhiteSquare' 0x1F78E {.sw [UnicodeWeightGrade 3 Geom.Scalar]}
|
||||
StdWhiteShape SquareShape 'mediumWhiteSquare' 0x1F78F {.sw [UnicodeWeightGrade 5 Geom.Scalar]}
|
||||
StdWhiteShape SquareShape 'boldWhiteSquare' 0x1F790 {.sw [UnicodeWeightGrade 7 Geom.Scalar]}
|
||||
StdWhiteShape SquareShape 'heavyWhiteSquare' 0x1F791 {.sw [UnicodeWeightGrade 9 Geom.Scalar]}
|
||||
StdWhiteShape SquareShape 'veryHeavyWhiteSquare' 0x1F792 {.sw [UnicodeWeightGrade 10 Geom.Scalar]}
|
||||
StdWhiteShape SquareShape 'exHeavyWhiteSquare' 0x1F793 {.sw [UnicodeWeightGrade 11 Geom.Scalar]}
|
||||
|
||||
StdBlackShape SquareShape 'blackLargeSquare' 0x2B1B Size.Large
|
||||
StdBlackShape SquareShape 'blackMediumSquare' 0x25FC Size.Medium
|
||||
StdBlackShape SquareShape 'blackMediumSmallSquare' 0x25FE Size.MediumSmall
|
||||
StdBlackShape SquareShape 'blackSmallSquare' 0x25AA Size.Small
|
||||
StdBlackShape SquareShape 'blackVerySmallSquare' 0x2B1D Size.VerySmall
|
||||
StdBlackShape SquareShape 'blackSlightlySmallSquare' 0x1F78D Size.SlightlySmall
|
||||
StdBlackShape SquareShape 'blackTinySmallSquare' 0x1F78C Size.Tiny
|
||||
StdBlackShape SquareShape 'blackCenteredSquare' 0x2BC0
|
||||
|
||||
StdWhiteShape SquareShape 'whiteLargeSquare' 0x2B1C Size.Large
|
||||
StdWhiteShape SquareShape 'whiteMediumSquare' 0x25FB Size.Medium
|
||||
StdWhiteShape SquareShape 'whiteMediumSmallSquare' 0x25FD Size.MediumSmall
|
||||
StdWhiteShape SquareShape 'whiteSmallSquare' 0x25AB Size.Small
|
||||
StdWhiteShape SquareShape 'whiteVerySmallSquare' 0x2B1E Size.VerySmall
|
||||
|
||||
StdWhiteContainingBlackShape SquareShape 'whiteSquareWithCenter' 0x25A3
|
||||
StdWhiteContainingBlackShape SquareShape 'whiteSquareContainingBlackVerySmallSquare' 0x1F794 Size.TinyInner
|
||||
StdWhiteContainingBlackShape SquareShape 'whiteSquareContainingBlackMediumSquare' 0x1F795 Size.MediumInner
|
||||
|
||||
StdGeomTargetShape SquareShape 'squareTarget' 0x1F796
|
||||
|
||||
define [TriangleRBFill cx cy size] : spiro-outline
|
||||
corner (cx + size) (cy + size)
|
||||
corner (cx + size) (cy - size)
|
||||
corner (cx - size) (cy - size)
|
||||
|
||||
define [TriangleLBFill cx cy size] : spiro-outline
|
||||
corner (cx - size) (cy + size)
|
||||
corner (cx + size) (cy - size)
|
||||
corner (cx - size) (cy - size)
|
||||
|
||||
define [TriangleLTFill cx cy size] : spiro-outline
|
||||
corner (cx - size) (cy + size)
|
||||
corner (cx + size) (cy + size)
|
||||
corner (cx - size) (cy - size)
|
||||
|
||||
define [TriangleRTFill cx cy size] : spiro-outline
|
||||
corner (cx - size) (cy + size)
|
||||
corner (cx + size) (cy + size)
|
||||
corner (cx + size) (cy - size)
|
||||
|
||||
StdBlackShape TriangleRBFill 'blackTriangleRB' 0x25E2
|
||||
ConvexWhitePolygon TriangleRBFill 'whiteTriangleRB' 0x25FF
|
||||
StdBlackShape TriangleLBFill 'blackTriangleLB' 0x25E3
|
||||
ConvexWhitePolygon TriangleLBFill 'whiteTriangleLB' 0x25FA
|
||||
StdBlackShape TriangleLTFill 'blackTriangleLT' 0x25E4
|
||||
ConvexWhitePolygon TriangleLTFill 'whiteTriangleLT' 0x25F8
|
||||
StdBlackShape TriangleRTFill 'blackTriangleRT' 0x25E5
|
||||
ConvexWhitePolygon TriangleRTFill 'whiteTriangleRT' 0x25F9
|
||||
|
||||
do "Rectangle"
|
||||
define [RectangleFill cx cy r] : spiro-outline
|
||||
corner (cx - r) (cy + r / 1.5)
|
||||
corner (cx + r) (cy + r / 1.5)
|
||||
corner (cx + r) (cy - r / 1.5)
|
||||
corner (cx - r) (cy - r / 1.5)
|
||||
|
||||
StdBlackShape RectangleFill 'blackRectangle' 0x25AC
|
||||
ConvexWhitePolygon RectangleFill 'whiteRectangle' 0x25AD
|
||||
|
||||
define [LongRectangleFill cx cy r] : spiro-outline
|
||||
corner (cx - r) (cy + r * 1.5)
|
||||
corner (cx + r) (cy + r * 1.5)
|
||||
corner (cx + r) (cy - r * 1.5)
|
||||
corner (cx - r) (cy - r * 1.5)
|
||||
|
||||
StdBlackShape LongRectangleFill 'blackLongRectangle' 0x25AE
|
||||
ConvexWhitePolygon LongRectangleFill 'whiteLongRectangle' 0x25AF
|
||||
|
||||
define [ParallelogramFill cx cy r] : begin
|
||||
define skew : r * 1 / 4
|
||||
return : spiro-outline
|
||||
corner (cx - r + skew) (cy + r / 1.5)
|
||||
corner (cx + r + skew) (cy + r / 1.5)
|
||||
corner (cx + r - skew) (cy - r / 1.5)
|
||||
corner (cx - r - skew) (cy - r / 1.5)
|
||||
|
||||
StdBlackShape ParallelogramFill 'blackParallelogram' 0x25B0
|
||||
ConvexWhitePolygon ParallelogramFill 'whiteParallelogram' 0x25B1
|
||||
|
||||
do "Triangles"
|
||||
define triangleOvershoot : 2.1 / [Math.sqrt 3]
|
||||
define [TriangleUpFill cx cy size] : spiro-outline
|
||||
corner cx (cy + size)
|
||||
corner (cx + size * triangleOvershoot) (cy - size)
|
||||
corner (cx - size * triangleOvershoot) (cy - size)
|
||||
|
||||
define [TriangleDownFill cx cy size] : spiro-outline
|
||||
corner cx (cy - size)
|
||||
corner (cx + size * triangleOvershoot) (cy + size)
|
||||
corner (cx - size * triangleOvershoot) (cy + size)
|
||||
|
||||
define [TriangleLeftFill cx cy size] : spiro-outline
|
||||
corner (cx - size) cy
|
||||
corner (cx + size) (cy - size * triangleOvershoot)
|
||||
corner (cx + size) (cy + size * triangleOvershoot)
|
||||
|
||||
define [TriangleLeftThinFill cx cy size] : spiro-outline
|
||||
corner (cx - size) cy
|
||||
corner (cx + size) (cy - size * triangleOvershoot * (2 / 3))
|
||||
corner (cx + size) (cy + size * triangleOvershoot * (2 / 3))
|
||||
|
||||
define [TriangleRightFill cx cy size] : spiro-outline
|
||||
corner (cx + size) cy
|
||||
corner (cx - size) (cy - size * triangleOvershoot)
|
||||
corner (cx - size) (cy + size * triangleOvershoot)
|
||||
|
||||
define [TriangleRightThinFill cx cy size] : spiro-outline
|
||||
corner (cx + size) cy
|
||||
corner (cx - size) (cy - size * triangleOvershoot * (2 / 3))
|
||||
corner (cx - size) (cy + size * triangleOvershoot * (2 / 3))
|
||||
|
||||
|
||||
StdBlackShape TriangleUpFill 'blackTriangleUp' 0x25B2 Size.Oblique
|
||||
ConvexWhitePolygon TriangleUpFill 'whiteTriangleUp' 0x25B3 Size.Oblique
|
||||
StdBlackShape TriangleUpFill 'blackSmallTriangleUp' 0x25B4 Size.SmallOblique
|
||||
ConvexWhitePolygon TriangleUpFill 'whiteSmallTriangleUp' 0x25B5 Size.SmallOblique
|
||||
StdBlackShape TriangleRightFill 'blackTriangleRight' 0x25B6 Size.Oblique
|
||||
ConvexWhitePolygon TriangleRightFill 'whiteTriangleRight' 0x25B7 Size.Oblique
|
||||
StdBlackShape TriangleRightFill 'blackSmallTriangleRight' 0x25B8 Size.SmallOblique
|
||||
ConvexWhitePolygon TriangleRightFill 'whiteSmallTriangleRight' 0x25B9 Size.SmallOblique
|
||||
StdBlackShape TriangleRightThinFill 'blackThinTriangleRight' 0x25BA Size.Oblique
|
||||
ConvexWhitePolygon TriangleRightThinFill 'whiteThinTriangleRight' 0x25BB Size.Oblique
|
||||
StdBlackShape TriangleDownFill 'blackTriangleDown' 0x25BC Size.Oblique
|
||||
ConvexWhitePolygon TriangleDownFill 'whiteTriangleDown' 0x25BD Size.Oblique
|
||||
StdBlackShape TriangleDownFill 'blackSmallTriangleDown' 0x25BE Size.SmallOblique
|
||||
ConvexWhitePolygon TriangleDownFill 'whiteSmallTriangleDown' 0x25BF Size.SmallOblique
|
||||
StdBlackShape TriangleLeftFill 'blackTriangleLeft' 0x25C0 Size.Oblique
|
||||
ConvexWhitePolygon TriangleLeftFill 'whiteTriangleLeft' 0x25C1 Size.Oblique
|
||||
StdBlackShape TriangleLeftFill 'blackSmallTriangleLeft' 0x25C2 Size.SmallOblique
|
||||
ConvexWhitePolygon TriangleLeftFill 'whiteSmallTriangleLeft' 0x25C3 Size.SmallOblique
|
||||
StdBlackShape TriangleLeftThinFill 'blackThinTriangleLeft' 0x25C4 Size.Oblique
|
||||
ConvexWhitePolygon TriangleLeftThinFill 'whiteThinTriangleLeft' 0x25C5 Size.Oblique
|
||||
|
||||
StdBlackShape TriangleUpFill 'blackCenterMediumTriangleUp' 0x2BC5 Size.MediumOblique
|
||||
StdBlackShape TriangleDownFill 'blackCenterMediumTriangleDown' 0x2BC6 Size.MediumOblique
|
||||
StdBlackShape TriangleLeftFill 'blackCenterMediumTriangleLeft' 0x2BC7 Size.MediumOblique
|
||||
StdBlackShape TriangleRightFill 'blackCenterMediumTriangleRight' 0x2BC8 Size.MediumOblique
|
||||
|
||||
define [TriangularWedgeFill cx cy size] : intersection
|
||||
TriangleUpFill cx cy size
|
||||
union
|
||||
dispiro
|
||||
widths.rhs GeometryStroke
|
||||
corner cx (cy + size)
|
||||
corner (cx + size * triangleOvershoot) (cy - size)
|
||||
dispiro
|
||||
widths.lhs GeometryStroke
|
||||
corner cx (cy + size)
|
||||
corner (cx - size * triangleOvershoot) (cy - size)
|
||||
|
||||
define [TriangularVeeFill cx cy size] : intersection
|
||||
TriangleDownFill cx cy size
|
||||
union
|
||||
dispiro
|
||||
widths.lhs GeometryStroke
|
||||
corner cx (cy - size)
|
||||
corner (cx + size * triangleOvershoot) (cy + size)
|
||||
dispiro
|
||||
widths.rhs GeometryStroke
|
||||
corner cx (cy - size)
|
||||
corner (cx - size * triangleOvershoot) (cy + size)
|
||||
|
||||
StdBlackShape TriangularWedgeFill 'triangularWedge' null
|
||||
StdBlackShape TriangularVeeFill 'triangularVee' null
|
||||
|
||||
do "Diamond"
|
||||
define [DiamondFill cx cy size] : spiro-outline
|
||||
corner cx (cy + size)
|
||||
corner (cx + size) cy
|
||||
corner cx (cy - size)
|
||||
corner (cx - size) cy
|
||||
|
||||
StdBlackShape DiamondFill 'blackDiamond' 0x25C6 Size.Oblique
|
||||
StdBlackShape DiamondFill 'blackCenteredDiamond' 0x2BC1 Size.Oblique
|
||||
|
||||
StdWhiteShape DiamondFill 'whiteDiamond' 0x25C7 Size.Oblique
|
||||
|
||||
StdBlackShape DiamondFill 'blackMediumDiamond' 0x2B25 Size.MediumOblique
|
||||
StdBlackShape DiamondFill 'blackSmallDiamond' 0x2B29 Size.SmallOblique
|
||||
StdBlackShape DiamondFill 'blackTinyDiamond' 0x1F797 Size.TinyOblique
|
||||
StdBlackShape DiamondFill 'blackVerySmallDiamond' 0x1F798 Size.VerySmallOblique
|
||||
StdBlackShape DiamondFill 'blackMediumSmallDiamond' 0x1F799 Size.MediumSmallOblique
|
||||
|
||||
StdWhiteShape DiamondFill 'whiteMediumDiamond' 0x2B26 Size.MediumOblique
|
||||
|
||||
StdWhiteContainingBlackShape DiamondFill 'whiteDiamondWithCenter' 0x25C8 Size.Oblique
|
||||
StdWhiteContainingBlackShape DiamondFill 'whiteDiamondContainingBlackVerySmallDiamond' 0x1F79A [Object.assign {.} Size.TinyInner Size.Oblique]
|
||||
StdWhiteContainingBlackShape DiamondFill 'whiteDiamondContainingBlackMediumDiamond' 0x1F79B [Object.assign {.} Size.MediumInner Size.Oblique]
|
||||
|
||||
StdGeomTargetShape DiamondFill 'diamondTarget' 0x1F79C Size.Oblique
|
||||
|
||||
do "Lonzenge"
|
||||
define [LonzengeFill cx cy size] : spiro-outline
|
||||
corner cx (cy + size)
|
||||
corner (cx + size * 2 / 3) cy
|
||||
corner cx (cy - size)
|
||||
corner (cx - size * 2 / 3) cy
|
||||
|
||||
StdBlackShape LonzengeFill 'blackLonzenge' 0x29EB Size.Oblique
|
||||
ConvexWhitePolygon LonzengeFill 'whiteLonzenge' 0x25CA Size.Oblique
|
||||
|
||||
StdBlackShape LonzengeFill 'blackMediumLonzenge' 0x2B27 Size.MediumOblique
|
||||
StdBlackShape LonzengeFill 'blackSmallLonzenge' 0x2B2A Size.SmallOblique
|
||||
|
||||
ConvexWhitePolygon LonzengeFill 'whiteMediumLonzenge' 0x2B28 Size.MediumOblique
|
||||
ConvexWhitePolygon LonzengeFill 'whiteSmallLonzenge' 0x2B2B Size.SmallOblique
|
||||
|
||||
StdBlackShape LonzengeFill 'blackTinyLonzenge' 0x1F79D Size.TinyOblique
|
||||
StdBlackShape LonzengeFill 'blackVerySmallLonzenge' 0x1F79E Size.VerySmallOblique
|
||||
StdBlackShape LonzengeFill 'blackMediumSmallLonzenge' 0x1F79F Size.MediumSmallOblique
|
||||
|
||||
ConvexPolygonWhiteContainingBlackShape LonzengeFill 'whiteLozengeContainingBlackSmallLozenge' 0x1F7A0 [Object.assign {.} Size.SmallInner Size.Oblique]
|
||||
|
||||
do "Circle"
|
||||
define [CircleShape cx cy size] : spiro-outline
|
||||
g4 cx (cy + size)
|
||||
g4 (cx - size) cy
|
||||
g4 cx (cy - size)
|
||||
g4 (cx + size) cy
|
||||
close
|
||||
|
||||
StdBlackShape CircleShape 'blackCircleO' null
|
||||
StdBlackShape CircleShape 'blackCircle' 0x25CF
|
||||
|
||||
StdWhiteShape CircleShape 'whiteCircle' 0x25CB
|
||||
StdWhiteShape CircleShape 'mediumWhiteCircle' 0x1F785 {.sw [UnicodeWeightGrade 6 Geom.Scalar]}
|
||||
StdWhiteShape CircleShape 'boldWhiteCircle' 0x1F786 {.sw [UnicodeWeightGrade 7 Geom.Scalar]}
|
||||
StdWhiteShape CircleShape 'heavyWhiteCircle' 0x1F787 {.sw [UnicodeWeightGrade 9 Geom.Scalar]}
|
||||
StdWhiteShape CircleShape 'veryHeavyWhiteCircle' 0x1F788 {.sw [UnicodeWeightGrade 10 Geom.Scalar]}
|
||||
StdWhiteShape CircleShape 'exHeavyWhiteCircle' 0x1F789 {.sw [UnicodeWeightGrade 11 Geom.Scalar]}
|
||||
|
||||
StdBlackShape CircleShape 'blackSmallCircle' null Size.Small
|
||||
StdBlackShape CircleShape 'blackMediumCircle' 0x26AB Size.Medium
|
||||
StdBlackShape CircleShape 'blackLargeCircle' 0x2B24 Size.Large
|
||||
StdBlackShape CircleShape 'blackSlightlySmallCircle' 0x1F784 Size.SlightlySmall
|
||||
|
||||
StdWhiteShape CircleShape 'whiteSmallCircle' null Size.Small
|
||||
StdWhiteShape CircleShape 'whiteMediumCircle' 0x26AA Size.Medium
|
||||
StdWhiteShape CircleShape 'whiteLargeCircle' 0x25EF Size.Large
|
||||
|
||||
StdDoubleWhite CircleShape 'doubleWhiteCircle' 0x25CE {.sw [Math.min GeometryStroke : AdviceStroke 4 Geom.Scalar]}
|
||||
|
||||
StdWhiteContainingBlackShape CircleShape 'whiteCircleWithCenter' 0x25C9
|
||||
StdWhiteContainingBlackShape CircleShape 'whiteCircleContainingBlackSmallCircle' 0x1F78A Size.SmallInner
|
||||
|
||||
StdGeomTargetShape CircleShape 'circleTarget' 0x1F78B
|
||||
|
||||
create-glyph [MangleName 'dottedCircle'] [MangleUnicode 0x25CC] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : [DivFrame Geom.Scalar].markSet.plus
|
||||
local n : 12 * [Math.ceil Geom.Scalar]
|
||||
local fine : AdviceStroke 10
|
||||
foreach j [range 0 n] : begin
|
||||
local angle : Math.PI * 2 * j / n
|
||||
local cx : Geom.MidX + (Geom.Right - Geom.MidX) * [Math.cos angle]
|
||||
local cy : Geom.MidY + (Geom.Right - Geom.MidX) * [Math.sin angle]
|
||||
include : CircleRingAt cx cy fine
|
||||
|
||||
create-glyph [MangleName 'dottedSquare'] [MangleUnicode 0x2B1A] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : [DivFrame Geom.Scalar].markSet.plus
|
||||
local n : 4 * [Math.ceil Geom.Scalar]
|
||||
local fine : AdviceStroke 10
|
||||
local box : object
|
||||
Left : Geom.Left + fine
|
||||
Right : Geom.Right - fine
|
||||
Top : Geom.Top - fine
|
||||
Bot : Geom.Bot + fine
|
||||
foreach j [range 0 n] : begin
|
||||
local t : j / n
|
||||
include : CircleRingAt box.Left [mix box.Bot box.Top t] fine
|
||||
include : CircleRingAt [mix box.Left box.Right t] box.Top fine
|
||||
include : CircleRingAt box.Right [mix box.Top box.Bot t] fine
|
||||
include : CircleRingAt [mix box.Right box.Left t] box.Bot fine
|
||||
|
||||
do "Regular Polygon"
|
||||
define [RegularPolygonFill sides skip overflow phase] : lambda [cx cy size] : begin
|
||||
local corners {}
|
||||
foreach [j : range 0 sides] : begin
|
||||
local angle : 2 * Math.PI * j * skip / sides + Math.PI * phase
|
||||
corners.push : corner
|
||||
cx + size * overflow * [Math.sin angle]
|
||||
cy + size * overflow * [Math.cos angle]
|
||||
return : spiro-outline corners
|
||||
|
||||
StdBlackShape [RegularPolygonFill 5 1 1.05 0] 'blackPentagon' 0x2B1F
|
||||
StdBlackShape [RegularPolygonFill 5 1 1.05 1] 'turnBlackPentagon' 0x2BC2
|
||||
ConvexWhitePolygon [RegularPolygonFill 5 1 1.05 0] 'whitePentagon' 0x2B20
|
||||
StdBlackShape [RegularPolygonFill 5 1 1.05 0.5] 'rhBlackPentagon' 0x2B53
|
||||
ConvexWhitePolygon [RegularPolygonFill 5 1 1.05 0.5] 'rhWhitePentagon' 0x2B54
|
||||
StdBlackShape [RegularPolygonFill 6 1 1.05 0] 'blackHexagon' 0x2B22
|
||||
ConvexWhitePolygon [RegularPolygonFill 6 1 1.05 0] 'whiteHexagon' 0x2B21
|
||||
StdBlackShape [RegularPolygonFill 6 1 1.05 0.5] 'hBlackHexagon' 0x2B23
|
||||
StdBlackShape [RegularPolygonFill 8 1 1.05 0] 'blackHorizontalOctagon' 0x2BC3
|
||||
StdBlackShape [RegularPolygonFill 8 1 1.05 0.128] 'blackOctagon' 0x2BC4
|
||||
StdBlackShape [RegularPolygonFill 5 2 1.1 0] 'blackStar' 0x2605
|
||||
StdWhiteShape [RegularPolygonFill 5 2 1.1 0] 'whiteStar' 0x2606
|
||||
begin {.sw ([AdviceStroke 5.5 : Math.sqrt Geom.Scalar] * [Math.sqrt 5])}
|
64
font-src/glyphs/symbol/geometric/rounded.ptl
Normal file
64
font-src/glyphs/symbol/geometric/rounded.ptl
Normal file
|
@ -0,0 +1,64 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Rounded : for-width-kinds WideWidth1
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
|
||||
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
define Size : GeometricSizes Geom
|
||||
|
||||
create-glyph [MangleName 'roundwhitesquare'] [MangleUnicode 0x25A2] : glyph-proc
|
||||
set-width Geom.Width
|
||||
define cr : Geom.Size - GeometryStroke * 2
|
||||
include : dispiro
|
||||
widths.lhs GeometryStroke
|
||||
flat (Geom.MidX + 1) (Geom.MidY + Geom.Size) [heading Leftward]
|
||||
curl (Geom.MidX - cr) (Geom.MidY + Geom.Size) [heading Leftward]
|
||||
archv
|
||||
flat (Geom.MidX - Geom.Size) (Geom.MidY + cr) [heading Downward]
|
||||
curl (Geom.MidX - Geom.Size) (Geom.MidY - cr) [heading Downward]
|
||||
arcvh
|
||||
flat (Geom.MidX - cr) (Geom.MidY - Geom.Size) [heading Rightward]
|
||||
curl (Geom.MidX + cr) (Geom.MidY - Geom.Size) [heading Rightward]
|
||||
archv
|
||||
flat (Geom.MidX + Geom.Size) (Geom.MidY - cr) [heading Upward]
|
||||
curl (Geom.MidX + Geom.Size) (Geom.MidY + cr) [heading Upward]
|
||||
arcvh
|
||||
flat (Geom.MidX + cr) (Geom.MidY + Geom.Size) [heading Leftward]
|
||||
curl (Geom.MidX - 1) (Geom.MidY + Geom.Size) [heading Leftward]
|
||||
|
||||
define [ThickRoundedArrowBar x1 y1 x2 y2 r w] : glyph-proc
|
||||
include : PointingTo x1 y1 x2 y2 : lambda [mag] : spiro-outline
|
||||
g4 (-r) 0
|
||||
arcvh
|
||||
flat 0 r
|
||||
curl mag r
|
||||
archv
|
||||
g4 (mag + r) 0
|
||||
arcvh
|
||||
flat mag (-r)
|
||||
curl 0 (-r)
|
||||
archv
|
||||
close
|
||||
|
||||
create-glyph [MangleName "whiteHeavySaltireWithRoundedCorners"] [MangleUnicode 0x1FBC0 WideWidth2] : glyph-proc
|
||||
set-width Geom.Width
|
||||
local inner : [Math.max [AdviceStroke 3] (Width / 8)] / 2
|
||||
local thick : AdviceStroke 4
|
||||
local left : Geom.Left + (inner + thick)
|
||||
local right : Geom.Right - (inner + thick)
|
||||
local bot : Geom.Bot + (inner + thick)
|
||||
local top : Geom.Top - (inner + thick)
|
||||
include : difference
|
||||
union
|
||||
ThickRoundedArrowBar left top right bot (inner + thick) 0
|
||||
ThickRoundedArrowBar right top left bot (inner + thick) 0
|
||||
union
|
||||
ThickRoundedArrowBar left top right bot inner 0
|
||||
ThickRoundedArrowBar right top left bot inner 0
|
139
font-src/glyphs/symbol/geometric/shaded.ptl
Normal file
139
font-src/glyphs/symbol/geometric/shaded.ptl
Normal file
|
@ -0,0 +1,139 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Shaded : for-width-kinds WideWidth1
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
|
||||
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
define Size : GeometricSizes Geom
|
||||
|
||||
define [HShadeShape] : begin
|
||||
define lineWidth : Math.min GeometryStroke ((Geom.Size * 2 - GeometryStroke * 2) * 1 / 11)
|
||||
define top : Geom.MidY + Geom.Size - GeometryStroke + lineWidth / 2
|
||||
define bot : Geom.MidY - (top - Geom.MidY)
|
||||
return : union
|
||||
dispiro
|
||||
widths.center lineWidth
|
||||
flat Geom.Left [mix top bot 0.25] [heading Rightward]
|
||||
curl Geom.Right [mix top bot 0.25] [heading Rightward]
|
||||
dispiro
|
||||
widths.center lineWidth
|
||||
flat Geom.Left [mix top bot 0.5] [heading Rightward]
|
||||
curl Geom.Right [mix top bot 0.5] [heading Rightward]
|
||||
dispiro
|
||||
widths.center lineWidth
|
||||
flat Geom.Left [mix top bot 0.75] [heading Rightward]
|
||||
curl Geom.Right [mix top bot 0.75] [heading Rightward]
|
||||
|
||||
create-glyph [MangleName 'hShadeSquare'] [MangleUnicode 0x25A4] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteSquare'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackSquare'
|
||||
HShadeShape
|
||||
|
||||
define [VShadeShape] : begin
|
||||
define lineWidth : Math.min GeometryStroke ((Geom.Size * 2 - GeometryStroke * 2) * 1 / 11)
|
||||
define r : Geom.Width / 2 + Geom.Size - GeometryStroke + lineWidth / 2
|
||||
define l : Geom.Width / 2 - (r - Geom.Width / 2)
|
||||
return : union
|
||||
dispiro
|
||||
widths.center lineWidth
|
||||
flat [mix l r 0.25] Geom.Top [heading Downward]
|
||||
curl [mix l r 0.25] Geom.Bot [heading Downward]
|
||||
dispiro
|
||||
widths.center lineWidth
|
||||
flat [mix l r 0.5] Geom.Top [heading Downward]
|
||||
curl [mix l r 0.5] Geom.Bot [heading Downward]
|
||||
dispiro
|
||||
widths.center lineWidth
|
||||
flat [mix l r 0.75] Geom.Top [heading Downward]
|
||||
curl [mix l r 0.75] Geom.Bot [heading Downward]
|
||||
|
||||
define [VBarShadeShape] : begin
|
||||
define lineWidth : Math.min GeometryStroke [AdviceStroke 5 Geom.Scalar]
|
||||
define r : Geom.Width / 2 + Geom.Size - GeometryStroke + lineWidth / 2
|
||||
define l : Geom.Width / 2 - (r - Geom.Width / 2)
|
||||
return : union
|
||||
dispiro
|
||||
widths.center lineWidth
|
||||
flat [mix l r 0.5] Geom.Top [heading Downward]
|
||||
curl [mix l r 0.5] Geom.Bot [heading Downward]
|
||||
|
||||
create-glyph [MangleName 'vShadeSquare'] [MangleUnicode 0x25A5] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteSquare'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackSquare'
|
||||
VShadeShape
|
||||
|
||||
create-glyph [MangleName 'vBarSquare'] [MangleUnicode 0x25EB] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteSquare'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackSquare'
|
||||
VBarShadeShape
|
||||
|
||||
create-glyph [MangleName 'hvShadeSquare'] [MangleUnicode 0x25A6] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'hShadeSquare'
|
||||
refer-glyph : MangleName 'vShadeSquare'
|
||||
|
||||
define [DDiagShadeShape] : begin
|
||||
define lineWidth : Math.min GeometryStroke ((Geom.Size * 2 - GeometryStroke * 2) * 1 / 11)
|
||||
define top : Geom.MidY + Geom.Size
|
||||
define bot : Geom.MidY - (top - Geom.MidY)
|
||||
return : glyph-proc
|
||||
foreach [j : range (-10) till 10] : include : dispiro
|
||||
widths.center lineWidth
|
||||
flat Geom.Left [mix top bot (j / 4)] [heading Rightward]
|
||||
curl Geom.Right [mix top bot (j / 4 + 1)] [heading Rightward]
|
||||
|
||||
define [UDiagShadeShape] : begin
|
||||
define lineWidth : Math.min GeometryStroke ((Geom.Size * 2 - GeometryStroke * 2) * 1 / 11)
|
||||
define top : Geom.MidY + Geom.Size
|
||||
define bot : Geom.MidY - (top - Geom.MidY)
|
||||
return : glyph-proc
|
||||
foreach [j : range (-10) till 10] : include : dispiro
|
||||
widths.center lineWidth
|
||||
flat Geom.Left [mix top bot (j / 4)] [heading Rightward]
|
||||
curl Geom.Right [mix top bot (j / 4 - 1)] [heading Rightward]
|
||||
|
||||
create-glyph [MangleName 'dDiagShadeSquare'] [MangleUnicode 0x25A7] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteSquare'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackSquare'
|
||||
DDiagShadeShape
|
||||
|
||||
create-glyph [MangleName 'uDiagShadeSquare'] [MangleUnicode 0x25A8] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteSquare'
|
||||
intersection
|
||||
refer-glyph : MangleName 'blackSquare'
|
||||
UDiagShadeShape
|
||||
|
||||
create-glyph [MangleName 'udDiagShadeSquare'] [MangleUnicode 0x25A9] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'dDiagShadeSquare'
|
||||
refer-glyph : MangleName 'uDiagShadeSquare'
|
||||
|
||||
create-glyph [MangleName 'vShadeCircle'] [MangleUnicode 0x25CD] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : union
|
||||
refer-glyph : MangleName 'whiteCircle'
|
||||
intersection [refer-glyph : MangleName 'blackCircleO'] [VShadeShape]
|
||||
|
54
font-src/glyphs/symbol/geometric/shared.ptl
Normal file
54
font-src/glyphs/symbol/geometric/shared.ptl
Normal file
|
@ -0,0 +1,54 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Shared : begin
|
||||
glyph-block-export GeometricDim
|
||||
define [GeometricDim UnitWidth fullWidth] : begin
|
||||
define s : fullWidth / UnitWidth
|
||||
define size : 0.5 * fullWidth - 0.625 * SB * s * s
|
||||
return : object
|
||||
UnitWidth UnitWidth
|
||||
Scalar s
|
||||
Size size
|
||||
Width fullWidth
|
||||
Left : 0.5 * fullWidth - size
|
||||
MidX : 0.5 * fullWidth
|
||||
Right : 0.5 * fullWidth + size
|
||||
Top : SymbolMid + size
|
||||
MidY SymbolMid
|
||||
Bot : SymbolMid - size
|
||||
|
||||
glyph-block-export UnicodeWeightGrade
|
||||
define [UnicodeWeightGrade n s] : begin
|
||||
define kwPow 1
|
||||
define kkw : 2 / [Math.pow 4 kwPow]
|
||||
define kw : 10 - s - kkw * [Math.pow n kwPow]
|
||||
define [mulPow ss pm] : (1 / 4 + ss / 8) * [StrokeWidthBlend 2 1]
|
||||
define kMul : [Math.pow n : mulPow s] / [Math.pow 4 : mulPow 2]
|
||||
define kAdj : GeometryStroke / [AdviceStroke 6]
|
||||
return : kMul * kAdj * [AdviceStroke kw]
|
||||
|
||||
glyph-block-export GeometricSizes
|
||||
define [GeometricSizes Geom] : object
|
||||
Large {.size [DesignParameters.GeometricLargeX Geom.Width Geom.UnitWidth]}
|
||||
Medium {.size DesignParameters.geometric_medium_x}
|
||||
MediumSmall {.size DesignParameters.geometric_medium_small_x .sw [Math.min GeometryStroke : AdviceStroke 5 Geom.Scalar]}
|
||||
Small {.size DesignParameters.geometric_small_x .sw [Math.min GeometryStroke : AdviceStroke 6 Geom.Scalar]}
|
||||
SlightlySmall {.size DesignParameters.geometric_slightly_small_x .sw [Math.min GeometryStroke : AdviceStroke 6.5 Geom.Scalar]}
|
||||
VerySmall {.size DesignParameters.geometric_very_small_x .sw [Math.min GeometryStroke : AdviceStroke 7 Geom.Scalar]}
|
||||
Tiny {.size DesignParameters.geometric_tiny_x .sw [Math.min GeometryStroke : AdviceStroke 8 Geom.Scalar]}
|
||||
|
||||
Oblique { .sw [Math.min GeometryStroke : AdviceStroke 4.75 Geom.Scalar] }
|
||||
MediumOblique { .size DesignParameters.geometric_medium_x .sw [Math.min GeometryStroke : AdviceStroke 4.75 Geom.Scalar] }
|
||||
MediumSmallOblique { .size DesignParameters.geometric_medium_small_x .sw [Math.min GeometryStroke : AdviceStroke 5.25 Geom.Scalar] }
|
||||
SmallOblique { .size DesignParameters.geometric_small_x .sw [Math.min GeometryStroke : AdviceStroke 6.25 Geom.Scalar] }
|
||||
VerySmallOblique { .size DesignParameters.geometric_very_small_x .sw [Math.min GeometryStroke : AdviceStroke 7.25 Geom.Scalar] }
|
||||
TinyOblique { .size DesignParameters.geometric_tiny_x .sw [Math.min GeometryStroke : AdviceStroke 8.25 Geom.Scalar] }
|
||||
|
||||
TinyInner { .innerSize (1 / 4) }
|
||||
SmallInner { .innerSize (1 / 3) }
|
||||
MediumInner { .innerSize (2 / 3) }
|
94
font-src/glyphs/symbol/geometric/stars.ptl
Normal file
94
font-src/glyphs/symbol/geometric/stars.ptl
Normal file
|
@ -0,0 +1,94 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Stars : for-width-kinds WideWidth1
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
|
||||
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
|
||||
define StarCfg : list
|
||||
* {.sides 6 .skip 1 .name 'sixPointedBlackStar' .unicode 0x2736 .pMag 1.05 .phase 0 .pShrink 0.4}
|
||||
* {.sides 8 .skip 1 .name 'eightPointedBlackStar' .unicode 0x2734 .pMag 1.15 .phase 0 .pShrink 0.25}
|
||||
* {.sides 8 .skip 1 .name 'eightPointedRectilinearBlackStar' .unicode 0x2737 .pMag 1.05 .phase (Math.PI / 8) .pShrink 0.4}
|
||||
* {.sides 8 .skip 1 .name 'heavyEightPointedRectilinearBlackStar' .unicode 0x2738 .pMag 1.05 .phase (Math.PI / 8) .pShrink 0.5}
|
||||
* {.sides 12 .skip 1 .name 'twelvePointedBlackStar' .unicode 0x2739 .pMag 1.05 .phase 0 .pShrink 0.5}
|
||||
foreach [[object sides skip name unicode pMag phase pShrink] : items-of StarCfg] : do
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
local corners {}
|
||||
foreach [j : range 0 (2 * sides)] : begin
|
||||
local angle : Math.PI * j * skip / sides + phase
|
||||
local mag : [if (j % 2) pShrink 1] * pMag
|
||||
corners.push : corner
|
||||
Geom.MidX + Geom.Size * mag * [Math.sin angle]
|
||||
Geom.MidY + Geom.Size * mag * [Math.cos angle]
|
||||
include : spiro-outline corners
|
||||
|
||||
define extThinSw : UnicodeWeightGrade 1 Geom.Scalar
|
||||
define extLightSw : UnicodeWeightGrade 2 Geom.Scalar
|
||||
define lightSw : UnicodeWeightGrade 3 Geom.Scalar
|
||||
define semiLightSw : UnicodeWeightGrade 3.5 Geom.Scalar
|
||||
define normalSw : UnicodeWeightGrade 4 Geom.Scalar
|
||||
define mediumSw : UnicodeWeightGrade 5 Geom.Scalar
|
||||
define semiBoldSw : UnicodeWeightGrade 6 Geom.Scalar
|
||||
define boldSw : UnicodeWeightGrade 7 Geom.Scalar
|
||||
define exBoldSw : UnicodeWeightGrade 8 Geom.Scalar
|
||||
define heavySw : UnicodeWeightGrade 9 Geom.Scalar
|
||||
define veryHeavySw : UnicodeWeightGrade 10 Geom.Scalar
|
||||
define exHeavySw : UnicodeWeightGrade 11 Geom.Scalar
|
||||
|
||||
define AsteriskCfg : list
|
||||
* {.sides 4 .name 'thinGreekCross' .unicode 0x1F7A1 .phase 0 .sw extLightSw }
|
||||
* {.sides 4 .name 'lightGreekCross' .unicode 0x1F7A2 .phase 0 .sw lightSw }
|
||||
* {.sides 4 .name 'mediumGreekCross' .unicode 0x1F7A3 .phase 0 .sw mediumSw }
|
||||
* {.sides 4 .name 'boldGreekCross' .unicode 0x1F7A4 .phase 0 .sw boldSw }
|
||||
* {.sides 4 .name 'exBoldGreekCross' .unicode 0x1F7A5 .phase 0 .sw exBoldSw }
|
||||
* {.sides 4 .name 'veryHeavyGreekCross' .unicode 0x1F7A6 .phase 0 .sw veryHeavySw}
|
||||
* {.sides 4 .name 'exHeavyGreekCross' .unicode 0x1F7A7 .phase 0 .sw exHeavySw }
|
||||
* {.sides 4 .name 'thinSaltire' .unicode 0x1F7A8 .phase (1/8) .sw extLightSw }
|
||||
* {.sides 4 .name 'lightSaltire' .unicode 0x1F7A9 .phase (1/8) .sw lightSw }
|
||||
* {.sides 4 .name 'mediumSaltire' .unicode 0x1F7AA .phase (1/8) .sw mediumSw }
|
||||
* {.sides 4 .name 'boldSaltire' .unicode 0x1F7AB .phase (1/8) .sw boldSw }
|
||||
* {.sides 4 .name 'heavySaltire' .unicode 0x1F7AC .phase (1/8) .sw heavySw }
|
||||
* {.sides 4 .name 'veryHeavySaltire' .unicode 0x1F7AD .phase (1/8) .sw veryHeavySw}
|
||||
* {.sides 4 .name 'exHeavySaltire' .unicode 0x1F7AE .phase (1/8) .sw exHeavySw }
|
||||
* {.sides 5 .name 'lightAsterisk5' .unicode 0x1F7AF .phase 0 .sw lightSw }
|
||||
* {.sides 5 .name 'mediumAsterisk5' .unicode 0x1F7B0 .phase 0 .sw mediumSw }
|
||||
* {.sides 5 .name 'boldAsterisk5' .unicode 0x1F7B1 .phase 0 .sw boldSw }
|
||||
* {.sides 5 .name 'heavyAsterisk5' .unicode 0x1F7B2 .phase 0 .sw heavySw }
|
||||
* {.sides 5 .name 'veryHeavyAsterisk5' .unicode 0x1F7B3 .phase 0 .sw veryHeavySw}
|
||||
* {.sides 5 .name 'exHeavyAsterisk5' .unicode 0x1F7B4 .phase 0 .sw exHeavySw }
|
||||
* {.sides 6 .name 'lightAsterisk6' .cThin 0.9 .unicode 0x1F7B5 .phase 0 .sw lightSw }
|
||||
* {.sides 6 .name 'mediumAsterisk6' .cThin 0.9 .unicode 0x1F7B6 .phase 0 .sw mediumSw }
|
||||
* {.sides 6 .name 'boldAsterisk6' .cThin 0.9 .unicode 0x1F7B7 .phase 0 .sw boldSw }
|
||||
* {.sides 6 .name 'heavyAsterisk6' .cThin 0.9 .unicode 0x1F7B8 .phase 0 .sw heavySw }
|
||||
* {.sides 6 .name 'veryHeavyAsterisk6' .cThin 0.9 .unicode 0x1F7B9 .phase 0 .sw veryHeavySw}
|
||||
* {.sides 6 .name 'exHeavyAsterisk6' .cThin 0.9 .unicode 0x1F7BA .phase 0 .sw exHeavySw }
|
||||
* {.sides 8 .name 'lightAsterisk8' .cThin 0.75 .unicode 0x1F7BB .phase 0 .sw lightSw }
|
||||
* {.sides 8 .name 'mediumAsterisk8' .cThin 0.75 .unicode 0x1F7BC .phase 0 .sw mediumSw }
|
||||
* {.sides 8 .name 'boldAsterisk8' .cThin 0.75 .unicode 0x1F7BD .phase 0 .sw boldSw }
|
||||
* {.sides 8 .name 'heavyAsterisk8' .cThin 0.75 .unicode 0x1F7BE .phase 0 .sw heavySw }
|
||||
* {.sides 8 .name 'veryHeavyAsterisk8' .cThin 0.75 .unicode 0x1F7BF .phase 0 .sw veryHeavySw}
|
||||
|
||||
* {.sides 4 .name 'heavyGreekCross' .unicode 0x271A .phase 0 .sw heavySw }
|
||||
* {.sides 6 .name 'heavyAsterisk' .cThin 0.9 .unicode 0x2731 .phase 0 .sw heavySw}
|
||||
* {.sides 8 .name 'eightSpokedAsterisk' .cThin 0.75 .unicode 0x2733 .phase 0 .sw normalSw}
|
||||
* {.sides 16 .name 'sixteenSpokedAsterisk' .cThin 0.75 .unicode 0x273A .phase 0 .sw semiLightSw}
|
||||
* {.sides 4 .name 'crossMark' .unicode 0x274C .phase (1/8) .sw normalSw}
|
||||
foreach [[object sides name unicode phase sw cThin pMag] : items-of AsteriskCfg] : do
|
||||
create-glyph [MangleName name] [MangleUnicode unicode] : glyph-proc
|
||||
set-width Geom.Width
|
||||
foreach [j : range 0 sides] : begin
|
||||
local angle : 2 * Math.PI * (j / sides + phase)
|
||||
include : dispiro
|
||||
corner Geom.MidX Geom.MidY [widths.center (sw * [fallback cThin 1])]
|
||||
corner
|
||||
Geom.MidX + Geom.Size * [Math.sin (-angle)]
|
||||
Geom.MidY + Geom.Size * [Math.cos (-angle)]
|
||||
widths.center sw
|
43
font-src/glyphs/symbol/geometric/sun-and-gear.ptl
Normal file
43
font-src/glyphs/symbol/geometric/sun-and-gear.ptl
Normal file
|
@ -0,0 +1,43 @@
|
|||
$$include '../../../meta/macros.ptl'
|
||||
|
||||
import [mix linreg clamp fallback] from '../../../support/utils'
|
||||
import [DesignParameters] from '../../../meta/aesthetics'
|
||||
|
||||
glyph-module
|
||||
|
||||
glyph-block Symbol-Geometric-Sun-And-Gear : for-width-kinds WideWidth1
|
||||
glyph-block-import CommonShapes
|
||||
glyph-block-import Common-Derivatives
|
||||
glyph-block-import Symbol-Geometric-Shared : GeometricDim UnicodeWeightGrade GeometricSizes
|
||||
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
define Size : GeometricSizes Geom
|
||||
|
||||
define [EightPointingRaysShape r] : glyph-proc
|
||||
foreach [n : range 0 8] : begin
|
||||
local theta : n / 8 * Math.PI * 2
|
||||
local c : Math.cos theta
|
||||
local s : Math.sin theta
|
||||
include : dispiro
|
||||
widths.center rayWidth
|
||||
corner (Geom.MidX + c * r) (Geom.MidY + s * r)
|
||||
corner (Geom.MidX + c * Geom.Size) (Geom.MidY + s * Geom.Size)
|
||||
|
||||
define rayWidth : AdviceStroke 8 Geom.Scalar
|
||||
define rayInnerRadius : Geom.Size * 0.56
|
||||
define dotRadius : Geom.Size * 0.44
|
||||
|
||||
create-glyph [MangleName 'blackSunWithRays'] [MangleUnicode 0x2600] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : EightPointingRaysShape rayInnerRadius
|
||||
include : RingAt Geom.MidX Geom.MidY dotRadius
|
||||
create-glyph [MangleName 'whiteSunWithRays'] [MangleUnicode 0x263C] : glyph-proc
|
||||
set-width Geom.Width
|
||||
include : EightPointingRaysShape rayInnerRadius
|
||||
include : RingStrokeAt Geom.MidX Geom.MidY dotRadius rayWidth
|
||||
create-glyph [MangleName 'gear'] [MangleUnicode 0x2699] : glyph-proc
|
||||
set-width Geom.Width
|
||||
local gearRingRad : mix rayInnerRadius Geom.Size 0.4
|
||||
include : EightPointingRaysShape (gearRingRad - rayWidth / 2)
|
||||
include : RingStrokeAt Geom.MidX Geom.MidY gearRingRad rayWidth
|
||||
include : RingAt Geom.MidX Geom.MidY (0.4 * (gearRingRad - rayWidth))
|
|
@ -1152,7 +1152,7 @@ glyph-block Symbol-Pictograph-Atom : begin
|
|||
glyph-block-import Symbol-Geometric-Shared : GeometricDim
|
||||
|
||||
for-width-kinds WideWidth1 : do
|
||||
define Geom : GeometricDim MosaicWidthScalar
|
||||
define Geom : GeometricDim MosaicUnitWidth MosaicWidth
|
||||
define pEllipse : 3 / 7
|
||||
define N 3
|
||||
define NN : 4 * N
|
||||
|
|
|
@ -164,8 +164,8 @@ define-macro glyph-block-export : syntax-rules
|
|||
define-macro for-width-kinds : syntax-rules
|
||||
`[for-width-kinds @_desired @::_body] : dirty `[ do \\
|
||||
define WidthKinds {
|
||||
{0 '.NWID' $Capture$.metrics.Width 1}
|
||||
{1 '.WWID' $Capture$.metrics.WideWidth0 2}
|
||||
{ 0 '.NWID' $Capture$.metrics.Width 1 }
|
||||
{ 1 '.WWID' $Capture$.metrics.WideWidth0 2 }
|
||||
}
|
||||
foreach {FMosaicWide MosaicNameSuffix MosaicWidth MosaicWidthScalar} [items-of WidthKinds] : do
|
||||
define MosaicDesiredWidth @[formOf _desired]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue