Add APL symbols
This commit is contained in:
parent
e8ceedfe55
commit
3dd458378d
|
@ -41,7 +41,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
|||
return nothing
|
||||
|
||||
define metrics : calculateMetrics para
|
||||
define [object globalTransform MIDDLE CAP XH SB RIGHTSB CONTRAST STROKE SUPERNESS WIDTH TANSLANT OVERLAYPOS DESCENDER] metrics
|
||||
define [object globalTransform MIDDLE CAP XH SB RIGHTSB CONTRAST STROKE SUPERNESS WIDTH TANSLANT OVERLAYPOS DESCENDER parenMid parenTop parenBot operTop operBot plusTop plusBot operMid] metrics
|
||||
|
||||
# Anchor parameters
|
||||
define [object MARK BASE] Anchor
|
||||
|
@ -54,8 +54,12 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
|||
* anchor.type
|
||||
|
||||
define markAboveLower {.anchors {.above [ta : new Anchor MIDDLE XH BASE]}}
|
||||
define markAboveOper {.anchors {.above [ta : new Anchor MIDDLE operTop BASE]}}
|
||||
define markAbovePlus {.anchors {.above [ta : new Anchor MIDDLE plusTop BASE]}}
|
||||
define markAboveCap {.anchors {.above [ta : new Anchor MIDDLE CAP BASE]}}
|
||||
define markBelowLower {.anchors {.below [ta : new Anchor MIDDLE DESCENDER BASE]}}
|
||||
define markBelowOper {.anchors {.below [ta : new Anchor MIDDLE operBot BASE]}}
|
||||
define markBelowPlus {.anchors {.below [ta : new Anchor MIDDLE plusBot BASE]}}
|
||||
define markBelowZero {.anchors {.below [ta : new Anchor MIDDLE 0 BASE]}}
|
||||
define markToprightLower {.anchors {.topright [ta : new Anchor RIGHTSB XH BASE]}}
|
||||
define markToprightCap {.anchors {.topright [ta : new Anchor RIGHTSB CAP BASE]}}
|
||||
|
@ -78,6 +82,8 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
|||
capital : buildStandardMarkSet markAboveCap markBelowZero markToprightCap markBottomrightZero
|
||||
b : buildStandardMarkSet markAboveCap markBelowZero markToprightCap markBottomrightZero
|
||||
e : buildStandardMarkSet markAboveLower markBelowZero markToprightLower markBottomrightZero
|
||||
oper : buildStandardMarkSet markAboveOper markBelowOper markToprightLower markBottomrightZero
|
||||
plus : buildStandardMarkSet markAbovePlus markBelowPlus markToprightLower markBottomrightZero
|
||||
p : buildStandardMarkSet markAboveLower markBelowLower markToprightLower markBottomrightLower
|
||||
if : buildStandardMarkSet markAboveCap markBelowLower markToprightCap markBottomrightLower
|
||||
|
||||
|
@ -192,9 +198,9 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
|||
|
||||
# Symbols
|
||||
[import './glyphs/symbol-punctuation.js'].apply.call capture
|
||||
set capture.geometricSymbols : [import './glyphs/symbol-geometric.js'].apply.call capture
|
||||
[import './glyphs/symbol-math.js'].apply.call capture
|
||||
[import './glyphs/symbol-letter.js'].apply.call capture
|
||||
set capture.geometricSymbols : [import './glyphs/symbol-geometric.js'].apply.call capture
|
||||
[import './glyphs/symbol-braille.js'].apply.call capture
|
||||
[import './glyphs/symbol-other.js'].apply.call capture
|
||||
|
||||
|
|
|
@ -33,8 +33,17 @@ export : define [apply] : begin
|
|||
set this.featureSelector glyphs.(oldid).featureSelector
|
||||
set this.cmpPriority glyphs.(oldid).cmpPriority
|
||||
|
||||
define [composite newid] : let [parts : {}.slice.call arguments 1] : begin
|
||||
create-glyph [fallback newid ('glyph' + [newtemp])] : glyph-construction
|
||||
define [composite _newid] : begin
|
||||
local parts null
|
||||
local newid null
|
||||
if ([typeof _newid] == 'string') : begin
|
||||
set parts : {}.slice.call arguments 1
|
||||
set newid _newid
|
||||
: else
|
||||
set parts : {}.slice.call arguments 0
|
||||
set newid ('glyph' + [newtemp])
|
||||
|
||||
return : create-glyph newid : glyph-construction
|
||||
local first true
|
||||
foreach [part : items-of parts] : begin
|
||||
include part first
|
||||
|
@ -625,5 +634,12 @@ export : define [apply] : begin
|
|||
apply-transform : Scale [fallback sx (-1)] [fallback sy sx (-1)]
|
||||
apply-transform : Translate x y
|
||||
apply-transform : Italify
|
||||
define ScaleAround FlipAround
|
||||
|
||||
define [Realign x y sx sy] : glyph-construction
|
||||
apply-transform : Upright
|
||||
apply-transform : Translate (-x) (-y)
|
||||
apply-transform : Translate sx sy
|
||||
apply-transform : Italify
|
||||
|
||||
return [object select-variant italic-variant alias composite into-unicode turned dual vdual fwl fwr dwl dwr dwc Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif AIVSerifs AIHSerifs AINSerifs AICyrISerifs AIMSerifs halfXStrand xStrand nShoulderKnots nShoulder mShoulderSpiro HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar CurlyTail HCurlyTail FlatSlashShape determineMixR HookShape hookstart hookend WaveShape CyrDescender refair Fork Miniature Thinner Widen FlipAround]
|
||||
return [object select-variant italic-variant alias composite into-unicode turned dual vdual fwl fwr dwl dwr dwc Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif AIVSerifs AIHSerifs AINSerifs AICyrISerifs AIMSerifs halfXStrand xStrand nShoulderKnots nShoulder mShoulderSpiro HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar CurlyTail HCurlyTail FlatSlashShape determineMixR HookShape hookstart hookend WaveShape CyrDescender refair Fork Miniature Thinner Widen FlipAround ScaleAround Realign]
|
|
@ -1012,7 +1012,7 @@ export : define [apply] : begin
|
|||
save 'Kappa' 0x39A
|
||||
save 'cyrKa' 0x41A
|
||||
|
||||
composite nothing glyphs.cyrKa [CyrDescender (RIGHTSB - O)] [into-unicode 0x49A]
|
||||
composite glyphs.cyrKa [CyrDescender (RIGHTSB - O)] [into-unicode 0x49A]
|
||||
|
||||
sketch # k
|
||||
set-width WIDTH
|
||||
|
@ -1047,7 +1047,7 @@ export : define [apply] : begin
|
|||
include : CenterTopSerif (SB + HALFSTROKE * HVCONTRAST) XH JUT
|
||||
save 'cyrka' 0x43A
|
||||
save 'latinkappa' 0x138
|
||||
composite nothing glyphs.cyrka [CyrDescender (RIGHTSB - O)] [into-unicode 0x49B]
|
||||
composite glyphs.cyrka [CyrDescender (RIGHTSB - O)] [into-unicode 0x49B]
|
||||
|
||||
|
||||
sketch # Khooktop
|
||||
|
@ -2248,7 +2248,7 @@ export : define [apply] : begin
|
|||
### U
|
||||
define [UShape top bottom stroke oper] : glyph-construction
|
||||
include : dispiro
|
||||
widths.lhs
|
||||
widths.lhs stroke
|
||||
flat SB top [heading DOWNWARD]
|
||||
curl SB (bottom + SMOOTHB)
|
||||
arcvh
|
||||
|
@ -2439,14 +2439,14 @@ export : define [apply] : begin
|
|||
save 'H' 'H'
|
||||
save 'Eta' 0x397
|
||||
save 'cyrEn' 0x41D
|
||||
composite nothing glyphs.cyrEn [CyrDescender RIGHTSB] [into-unicode 0x4A2]
|
||||
composite glyphs.cyrEn [CyrDescender RIGHTSB] [into-unicode 0x4A2]
|
||||
|
||||
sketch # cyren
|
||||
include markset.e
|
||||
include : HShape XH
|
||||
save 'cyren' 0x43D
|
||||
save 'smcpH' 0x29C
|
||||
composite nothing glyphs.cyren [CyrDescender RIGHTSB] [into-unicode 0x4A3]
|
||||
composite glyphs.cyren [CyrDescender RIGHTSB] [into-unicode 0x4A3]
|
||||
|
||||
sketch # Hbar
|
||||
|
||||
|
|
|
@ -1027,13 +1027,13 @@ export : define [apply] : begin
|
|||
include markset.capital
|
||||
include : CyrZheShape CAP CAP
|
||||
save 'cyrZhe' 0x416
|
||||
composite nothing glyphs.cyrZhe [CyrDescender (RIGHTSB - O * 4) nothing true] [into-unicode 0x496]
|
||||
composite glyphs.cyrZhe [CyrDescender (RIGHTSB - O * 4) nothing true] [into-unicode 0x496]
|
||||
|
||||
sketch # cyrzhe
|
||||
include markset.e
|
||||
include : CyrZheShape XH XH
|
||||
save 'cyrzhe' 0x436
|
||||
composite nothing glyphs.cyrzhe [CyrDescender (RIGHTSB - O * 4) nothing true] [into-unicode 0x497]
|
||||
composite glyphs.cyrzhe [CyrDescender (RIGHTSB - O * 4) nothing true] [into-unicode 0x497]
|
||||
|
||||
sketch # cyrzhe.BGR
|
||||
include markset.e
|
||||
|
@ -1183,13 +1183,13 @@ export : define [apply] : begin
|
|||
include markset.capital
|
||||
include : CyrCheShape CAP [if SLAB 0.45 0.35]
|
||||
save 'cyrChe' 0x427
|
||||
composite nothing glyphs.cyrChe [CyrDescender RIGHTSB] [into-unicode 0x4B6]
|
||||
composite glyphs.cyrChe [CyrDescender RIGHTSB] [into-unicode 0x4B6]
|
||||
|
||||
sketch # cyrche
|
||||
include markset.e
|
||||
include : CyrCheShape XH [if SLAB 0.45 0.4]
|
||||
save 'cyrche' 0x447
|
||||
composite nothing glyphs.cyrche [CyrDescender RIGHTSB] [into-unicode 0x4B7]
|
||||
composite glyphs.cyrche [CyrDescender RIGHTSB] [into-unicode 0x4B7]
|
||||
|
||||
turned 'cyrShha' 0x4BA 'cyrChe' MIDDLE (CAP / 2)
|
||||
|
||||
|
|
|
@ -11,10 +11,13 @@ export : define [apply] : begin
|
|||
define arrowWidth FULLWIDTH2
|
||||
define arrowMidX : arrowWidth / 2
|
||||
define arrowRSB : arrowWidth - SB
|
||||
define hwArrowRSB : WIDTH - SB
|
||||
define hwArrowMidX : WIDTH / 2
|
||||
|
||||
local arrowSize : (RIGHTSB - SB) / 3 * [Math.pow (arrowWidth / WIDTH) 0.4]
|
||||
local arrowSize : (RIGHTSB - SB) * designParameters.arrow_size * [Math.pow (arrowWidth / WIDTH) 0.4]
|
||||
local halfstroke : OPERATORSTROKE / 2
|
||||
local fine : adviceBlackness 4
|
||||
local terminal : adviceBlackness 6
|
||||
local arrowTop : mix parenMid parenTop 0.85
|
||||
local arrowBot : mix parenMid parenBot 0.85
|
||||
|
||||
|
@ -26,13 +29,13 @@ export : define [apply] : begin
|
|||
function [set this.gizmo [Transform.Id]]
|
||||
widths.rhs fine
|
||||
flat 0 0 [heading UPWARD]
|
||||
curl (size * 1) size
|
||||
curl (size * 1) size [widths.rhs terminal]
|
||||
end [[] => (this.contrast = 1)]
|
||||
include : dispiro
|
||||
function [set this.gizmo [Transform.Id]]
|
||||
widths.lhs fine
|
||||
flat 0 0 [heading DOWNWARD]
|
||||
curl (size * 1) (-size)
|
||||
curl (size * 1) (-size) [widths.lhs terminal]
|
||||
end [[] => (this.contrast = 1)]
|
||||
apply-transform : Translate O 0
|
||||
local {.x xo .y yo} : tp g {.x x1 .y y1}
|
||||
|
@ -82,6 +85,10 @@ export : define [apply] : begin
|
|||
arrow ArrowShape 'arrowright.dflt' null SB parenMid arrowRSB parenMid
|
||||
arrow ArrowShape 'arrowup' 0x2191 arrowMidX arrowBot arrowMidX arrowTop
|
||||
arrow ArrowShape 'arrowdown' 0x2193 arrowMidX arrowTop arrowMidX arrowBot
|
||||
arrow ArrowShape 'hwarrowleft' null hwArrowRSB parenMid SB parenMid
|
||||
arrow ArrowShape 'hwarrowright' null SB parenMid hwArrowRSB parenMid
|
||||
arrow ArrowShape 'hwarrowup' null hwArrowMidX arrowBot hwArrowMidX arrowTop
|
||||
arrow ArrowShape 'hwarrowdown' null hwArrowMidX arrowTop hwArrowMidX arrowBot
|
||||
arrow ArrowShape 'arrowupleft' 0x2196 arrowRSB arrowBot SB arrowTop
|
||||
arrow ArrowShape 'arrowupright' 0x2197 SB arrowBot arrowRSB arrowTop
|
||||
arrow ArrowShape 'arrowdownright' 0x2198 SB arrowTop arrowRSB arrowBot
|
||||
|
@ -240,19 +247,47 @@ export : define [apply] : begin
|
|||
line-to right parenMid
|
||||
line-to MIDDLE (parenMid - squareRadius)
|
||||
line-to left parenMid
|
||||
save 'hwblackdiamond'
|
||||
include FullWidthify
|
||||
save 'blackdiamond' 0x25C6
|
||||
|
||||
sketch # blackcircle
|
||||
include markset.plus
|
||||
include : spiro-outline
|
||||
g4 MIDDLE (parenMid + squareRadius)
|
||||
g4 left parenMid
|
||||
g4 MIDDLE (parenMid - squareRadius)
|
||||
g4 right parenMid
|
||||
close
|
||||
reverse-last
|
||||
save 'hwblackcircle'
|
||||
include FullWidthify
|
||||
save 'blackcircle' 0x25CF
|
||||
|
||||
sketch # smallblackcircle
|
||||
include : spiro-outline
|
||||
g4 MIDDLE (parenMid + squareRadius * designParameters.geometric_small_x)
|
||||
g4 (MIDDLE - squareRadius * designParameters.geometric_small_x) parenMid
|
||||
g4 MIDDLE (parenMid - squareRadius * designParameters.geometric_small_x)
|
||||
g4 (MIDDLE + squareRadius * designParameters.geometric_small_x) parenMid
|
||||
close
|
||||
reverse-last
|
||||
save 'hwsmallblackcircle'
|
||||
include FullWidthify
|
||||
save 'smallblackcircle'
|
||||
|
||||
sketch # bigblackcircle
|
||||
include : spiro-outline
|
||||
g4 MIDDLE (parenMid + squareRadius * designParameters.geometric_large_x)
|
||||
g4 (MIDDLE - squareRadius * designParameters.geometric_large_x) parenMid
|
||||
g4 MIDDLE (parenMid - squareRadius * designParameters.geometric_large_x)
|
||||
g4 (MIDDLE + squareRadius * designParameters.geometric_large_x) parenMid
|
||||
close
|
||||
reverse-last
|
||||
save 'hwbigblackcircle'
|
||||
include FullWidthify
|
||||
save 'bigblackcircle'
|
||||
|
||||
let
|
||||
: configurations : list
|
||||
* {.sides 5 .skip 2 .name 'blackstar' .unicode 0x2605 .overflow 1.1 .phase 0}
|
||||
|
@ -261,6 +296,7 @@ export : define [apply] : begin
|
|||
* {.sides 5 .skip 1 .name 'rhblackpentagon' .unicode 0x2B53 .overflow 1.05 .phase (-Math.PI / 2)}
|
||||
* {.sides 6 .skip 1 .name 'hblackhexagon' .unicode 0x2B23 .overflow 1.05 .phase (Math.PI / 2)}
|
||||
: foreach [{.sides sides .skip skip .name name .unicode unicode .overflow overflow .phase phase} : items-of configurations] : sketch
|
||||
include markset.plus
|
||||
foreach [j : range 0 sides] : begin
|
||||
local angle : 2 * Math.PI * j * skip / sides + phase
|
||||
currentGlyph.([if j 'line-to' 'start-from'])
|
||||
|
@ -299,10 +335,14 @@ export : define [apply] : begin
|
|||
hollow 'whiterectangle' 0x25AD 'blackrectangle' [hollowScale squareRadius] [hollowScale (squareRadius / 1.5)]
|
||||
hollow 'whitelongrectangle' 0x25AF 'blacklongrectangle' [hollowScale squareRadius] [hollowScale (squareRadius * 1.5)]
|
||||
hollow 'whitecircle' 0x25CB 'blackcircle'
|
||||
hollow 'bigwhitecircle' 0x25EF 'bigblackcircle' [hollowScale : squareRadius * designParameters.geometric_large_x]
|
||||
hollow 'hwbigwhitecircle' null 'hwbigblackcircle' [hollowScale : squareRadius * designParameters.geometric_large_x]
|
||||
hollow 'smallwhitecircle' null 'smallblackcircle' [hollowScale : squareRadius * designParameters.geometric_small_x]
|
||||
hollow 'hwsmallwhitecircle' null 'hwsmallblackcircle' [hollowScale : squareRadius * designParameters.geometric_small_x]
|
||||
hollow 'hwwhitecircle' null 'hwblackcircle'
|
||||
hollow 'hwwhitediamond' null 'hwblackdiamond'
|
||||
hollow 'whitediamond' 0x25C7 'blackdiamond' [hollowScale squareRadius nothing (hollowSW * [Math.sqrt 2])]
|
||||
|
||||
composite 'circlestar' glyphs.hwblackstar [FlipAround MIDDLE parenMid 0.75] glyphs.mathO [into-unicode 0x235F]
|
||||
|
||||
let [sts 0.75]
|
||||
: begin
|
||||
resized 'smallblacktriangleup' 0x25B4 'blacktriangleup' MIDDLE parenMid 0.75
|
||||
|
|
|
@ -44,6 +44,7 @@ export : define [apply] : begin
|
|||
save 'emptyset' 0x2205
|
||||
|
||||
sketch # increment
|
||||
include markset.capital
|
||||
include : LambdaShape OPERATORSTROKE
|
||||
eject-contour 'serif'
|
||||
include : HBarBottom (SB + (OPERATORSTROKE / 2)) (RIGHTSB - (OPERATORSTROKE / 2)) 0 OPERATORSTROKE
|
||||
|
@ -91,14 +92,17 @@ export : define [apply] : begin
|
|||
include : OShape (parenMid + (RIGHTSB - SB) * 0.5 + sw * k) (parenMid - (RIGHTSB - SB) * 0.5 - sw * k) (SB - sw * k) (RIGHTSB + sw * k) sw (SMALLSMOOTHA * 3) (SMALLSMOOTHB * 3)
|
||||
save 'mathO'
|
||||
sketch # plus
|
||||
include markset.plus
|
||||
include : HBar SB RIGHTSB parenMid OPERATORSTROKE
|
||||
include : VBar MIDDLE (parenMid - (RIGHTSB - SB) * 0.55) (parenMid + (RIGHTSB - SB) * 0.55) OPERATORSTROKE
|
||||
include : VBar MIDDLE plusTop plusBot OPERATORSTROKE
|
||||
save 'plus' '+'
|
||||
sketch # minus
|
||||
include markset.plus
|
||||
include : HBar SB RIGHTSB parenMid OPERATORSTROKE
|
||||
save 'minus' 0x2212
|
||||
|
||||
sketch # plusminus
|
||||
include markset.plus
|
||||
include : HBarBottom SB RIGHTSB 0 OPERATORSTROKE
|
||||
include glyphs.plus
|
||||
save 'plusminus' 0xB1
|
||||
|
@ -106,11 +110,13 @@ export : define [apply] : begin
|
|||
|
||||
local equalHalfSpace : (parenTop - parenBot) * designParameters.equal_wideness
|
||||
sketch # equal
|
||||
include markset.plus
|
||||
include : HBar SB RIGHTSB (parenMid + equalHalfSpace) OPERATORSTROKE
|
||||
include : HBar SB RIGHTSB (parenMid - equalHalfSpace) OPERATORSTROKE
|
||||
save 'equal' '='
|
||||
|
||||
sketch # less
|
||||
include markset.plus
|
||||
local top : mix parenMid parenTop 0.5
|
||||
local bot : mix parenMid parenBot 0.5
|
||||
local exp : Math.sqrt : 1 + (top - bot) / (2 * (RIGHTSB - SB)) * (top - bot) / (2 * (RIGHTSB - SB))
|
||||
|
@ -127,6 +133,7 @@ export : define [apply] : begin
|
|||
save 'less' '<'
|
||||
|
||||
sketch # greater
|
||||
include markset.plus
|
||||
local top : mix 0 CAP 0.75
|
||||
local bot : mix 0 CAP 0.1
|
||||
|
||||
|
@ -135,6 +142,7 @@ export : define [apply] : begin
|
|||
save 'greater' '>'
|
||||
|
||||
sketch # multiply
|
||||
include markset.plus
|
||||
local radius : (RIGHTSB - SB) / 2
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
|
@ -149,6 +157,7 @@ export : define [apply] : begin
|
|||
save 'multiply' 0xD7
|
||||
|
||||
sketch # divide
|
||||
include markset.plus
|
||||
include glyphs.minus
|
||||
local radius : (RIGHTSB - SB) / 2
|
||||
include : Ring (parenMid + radius + DOTRADIUS) (parenMid + radius - DOTRADIUS) (MIDDLE - DOTRADIUS + O) (MIDDLE + DOTRADIUS - O) true
|
||||
|
@ -169,7 +178,6 @@ export : define [apply] : begin
|
|||
save 'negate' 0xAC
|
||||
|
||||
sketch # vee
|
||||
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
flat SB operTop
|
||||
|
@ -186,8 +194,50 @@ export : define [apply] : begin
|
|||
include : UShape operTop operBot OPERATORSTROKE true
|
||||
save 'cup' 0x222A
|
||||
turned 'cap' 0x2229 'cup' MIDDLE parenMid
|
||||
|
||||
|
||||
### Logicals
|
||||
sketch # vdash
|
||||
include markset.plus
|
||||
include : HBar SB RIGHTSB parenMid OPERATORSTROKE
|
||||
include : VBarLeft SB plusTop plusBot OPERATORSTROKE
|
||||
save 'vdash' 0x22A2
|
||||
turned 'dashv' 0x22A3 'vdash' MIDDLE parenMid
|
||||
|
||||
sketch # assert
|
||||
include markset.plus
|
||||
local l : mix MIDDLE SB designParameters.logic_narrow_shrink
|
||||
local r : mix MIDDLE RIGHTSB designParameters.logic_narrow_shrink
|
||||
include : HBar l r parenMid OPERATORSTROKE
|
||||
include : VBarLeft l plusTop plusBot OPERATORSTROKE
|
||||
save 'assert' 0x22A6
|
||||
|
||||
sketch # models
|
||||
include markset.plus
|
||||
local l : mix MIDDLE SB designParameters.logic_narrow_shrink
|
||||
local r : mix MIDDLE RIGHTSB designParameters.logic_narrow_shrink
|
||||
include : HBar l r [mix parenMid plusTop (1 / 3)] OPERATORSTROKE
|
||||
include : HBar l r [mix parenMid plusBot (1 / 3)] OPERATORSTROKE
|
||||
include : VBarLeft l plusTop plusBot OPERATORSTROKE
|
||||
save 'models' 0x22A7
|
||||
|
||||
sketch # tautalogy
|
||||
include markset.plus
|
||||
local l : mix MIDDLE SB 1
|
||||
local r : mix MIDDLE RIGHTSB 1
|
||||
include : HBar l r [mix parenMid plusTop (1 / 3)] OPERATORSTROKE
|
||||
include : HBar l r [mix parenMid plusBot (1 / 3)] OPERATORSTROKE
|
||||
include : VBarLeft l plusTop plusBot OPERATORSTROKE
|
||||
save 'tautalogy' 0x22A8
|
||||
|
||||
sketch # top
|
||||
include markset.plus
|
||||
include : HBarTop SB RIGHTSB plusTop OPERATORSTROKE
|
||||
include : VBar MIDDLE plusTop plusBot OPERATORSTROKE
|
||||
save 'top' 0x22A4
|
||||
turned 'bot' 0x22A5 'top' MIDDLE parenMid
|
||||
|
||||
sketch # lesseq
|
||||
include markset.plus
|
||||
local fine : Math.max [adviceBlackness 4] (XH * 0.1)
|
||||
local top : [mix parenMid parenTop 0.5] - fine
|
||||
local bot : [mix parenMid parenBot 0.5] + fine
|
||||
|
@ -198,20 +248,26 @@ export : define [apply] : begin
|
|||
curl SB ([mix top bot 0.5] + fine) [heading LEFTWARD]
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
flat SB ([mix top bot 0.5] + fine) [heading RIGHTWARD]
|
||||
flat SB ([mix top bot 0.5] + fine) [heading RIGHTWARD]
|
||||
curl RIGHTSB (bot + fine)
|
||||
|
||||
branch
|
||||
include : Upright
|
||||
include : Translate 0 (-fine)
|
||||
include : Italify
|
||||
save 'less.narrow'
|
||||
branch
|
||||
include : HBar SB RIGHTSB (bot - fine) OPERATORSTROKE
|
||||
save 'lesseq' 0x2264
|
||||
branch
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
flat SB ([mix top bot 0.5] - fine) [heading RIGHTWARD]
|
||||
flat SB ([mix top bot 0.5] - fine) [heading RIGHTWARD]
|
||||
curl RIGHTSB (bot - fine)
|
||||
save 'lesseqslant' 0x2A7D
|
||||
|
||||
sketch # greatereq
|
||||
include markset.plus
|
||||
local fine : Math.max [adviceBlackness 4] (XH * 0.1)
|
||||
local top : [mix parenMid parenTop 0.5] - fine
|
||||
local bot : [mix parenMid parenBot 0.5] + fine
|
||||
|
@ -222,16 +278,21 @@ export : define [apply] : begin
|
|||
curl RIGHTSB ([mix top bot 0.5] + fine) [heading RIGHTWARD]
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
flat RIGHTSB ([mix top bot 0.5] + fine) [heading LEFTWARD]
|
||||
flat RIGHTSB ([mix top bot 0.5] + fine) [heading LEFTWARD]
|
||||
curl SB (bot + fine)
|
||||
|
||||
branch
|
||||
include : Upright
|
||||
include : Translate 0 (-fine)
|
||||
include : Italify
|
||||
save 'greater.narrow'
|
||||
branch
|
||||
include : HBar SB RIGHTSB (bot - fine) OPERATORSTROKE
|
||||
save 'greatereq' 0x2265
|
||||
branch
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
flat RIGHTSB ([mix top bot 0.5] - fine) [heading LEFTWARD]
|
||||
flat RIGHTSB ([mix top bot 0.5] - fine) [heading LEFTWARD]
|
||||
curl SB (bot - fine)
|
||||
save 'greatereqslant' 0x2A7E
|
||||
|
||||
|
@ -281,14 +342,17 @@ export : define [apply] : begin
|
|||
include glyphs.(oldid)
|
||||
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
widths.center [adviceBlackness 4]
|
||||
flat ([fallback shift 0] + [mix SB RIGHTSB [fallback prop 0.25]]) [fallback bot operBot]
|
||||
curl ([fallback shift 0] + [mix RIGHTSB SB [fallback prop 0.25]]) [fallback top operTop]
|
||||
|
||||
define [notGlyph.right newid unicode oldid top bot prop shift] : notGlyph newid unicode oldid top bot prop (-OPERATORSTROKE * 0.5)
|
||||
define [notGlyph.left newid unicode oldid top bot prop shift] : notGlyph newid unicode oldid top bot prop (OPERATORSTROKE * 0.5)
|
||||
|
||||
notGlyph 'noteq' 0x2260 'equal'
|
||||
notGlyph 'notident' 0x2262 'ident'
|
||||
notGlyph 'notvdash' 0x22AC 'vdash'
|
||||
notGlyph 'nottaut' 0x22AD 'tautalogy'
|
||||
notGlyph.left 'notless' 0x226E 'less'
|
||||
notGlyph.right 'notgreater' 0x226F 'greater'
|
||||
notGlyph 'notapprox' 0x2249 'approx' [mix parenMid operTop 0.75] [mix parenMid operBot 0.75]
|
||||
|
@ -304,7 +368,6 @@ export : define [apply] : begin
|
|||
### 'Large Operators'
|
||||
sketch # sum
|
||||
include : SigmaShape parenTop parenBot OPERATORSTROKE
|
||||
|
||||
save 'sum' 0x2211
|
||||
|
||||
sketch # product
|
||||
|
@ -314,18 +377,15 @@ export : define [apply] : begin
|
|||
|
||||
sketch # integrate
|
||||
include : LongSShape parenTop parenBot HOOK (HOOK * 0.75) OPERATORSTROKE
|
||||
|
||||
save 'integrate' 0x222B
|
||||
dual 'doubleintegrate' 0x222C 'integrate' (0.5 * WIDTH)
|
||||
|
||||
sketch # ringintegrate
|
||||
include glyphs.integrate
|
||||
include : OShape (parenMid + (RIGHTSB - SB) / 2) (parenMid - (RIGHTSB - SB) / 2) SB RIGHTSB OPERATORSTROKE
|
||||
|
||||
save 'ringintegrate' 0x222E
|
||||
|
||||
sketch # Vee
|
||||
|
||||
include : dispiro
|
||||
widths.center OPERATORSTROKE
|
||||
flat SB parenTop
|
||||
|
@ -343,8 +403,121 @@ export : define [apply] : begin
|
|||
save 'Cup' 0x22C3
|
||||
turned 'Cap' 0x22C2 'Cup' MIDDLE parenMid
|
||||
|
||||
### APL
|
||||
local aplBoxSW : adviceBlackness 4.5
|
||||
sketch # aplsquare
|
||||
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 : VBarLeft l operTop operBot aplBoxSW
|
||||
include : VBarRight r operTop operBot aplBoxSW
|
||||
save 'aplsquare' 0x2395
|
||||
sketch # aplbar
|
||||
include : VBar MIDDLE parenTop parenBot aplBoxSW
|
||||
save 'aplbar'
|
||||
sketch # aplslash
|
||||
include : dispiro
|
||||
widths.center aplBoxSW
|
||||
flat SB operBot
|
||||
curl RIGHTSB operTop
|
||||
save 'aplslash'
|
||||
sketch # aplbackslash
|
||||
include : dispiro
|
||||
widths.center aplBoxSW
|
||||
flat SB operTop
|
||||
curl RIGHTSB operBot
|
||||
save 'aplbackslash'
|
||||
|
||||
define aplBoxTfm : ScaleAround MIDDLE parenMid ((WIDTH - aplBoxSW * 1.75) / WIDTH)
|
||||
|
||||
composite glyphs.equal aplBoxTfm glyphs.aplsquare [into-unicode 0x2338]
|
||||
composite glyphs.divide aplBoxTfm glyphs.aplsquare [into-unicode 0x2339]
|
||||
composite glyphs.hwwhitediamond aplBoxTfm glyphs.aplsquare [into-unicode 0x233A]
|
||||
composite glyphs.hwsmallwhitecircle aplBoxTfm glyphs.aplsquare [into-unicode 0x233B]
|
||||
composite glyphs.hwwhitecircle aplBoxTfm glyphs.aplsquare [into-unicode 0x233C]
|
||||
composite glyphs.hwwhitecircle glyphs.aplbar [into-unicode 0x233D]
|
||||
composite glyphs.hwwhitecircle glyphs.hwsmallwhitecircle [into-unicode 0x233E]
|
||||
composite glyphs.minus glyphs.aplslash [into-unicode 0x233F]
|
||||
composite glyphs.minus glyphs.aplbackslash [into-unicode 0x2340]
|
||||
composite glyphs.slash aplBoxTfm glyphs.aplsquare [into-unicode 0x2341]
|
||||
composite glyphs.backslash aplBoxTfm glyphs.aplsquare [into-unicode 0x2342]
|
||||
composite glyphs.less aplBoxTfm glyphs.aplsquare [into-unicode 0x2343]
|
||||
composite glyphs.greater aplBoxTfm glyphs.aplsquare [into-unicode 0x2344]
|
||||
composite glyphs.hwarrowleft glyphs.aplbar [into-unicode 0x2345]
|
||||
composite glyphs.hwarrowright glyphs.aplbar [into-unicode 0x2346]
|
||||
composite glyphs.hwarrowleft aplBoxTfm glyphs.aplsquare [into-unicode 0x2347]
|
||||
composite glyphs.hwarrowright aplBoxTfm glyphs.aplsquare [into-unicode 0x2348]
|
||||
composite glyphs.hwwhitecircle glyphs.aplbackslash [into-unicode 0x2349]
|
||||
composite glyphs.bot glyphs.underlineBelow [into-unicode 0x234A]
|
||||
composite glyphs.increment glyphs.aplbar [into-unicode 0x234B]
|
||||
composite glyphs.vee aplBoxTfm glyphs.aplsquare [into-unicode 0x234C]
|
||||
composite glyphs.increment aplBoxTfm glyphs.aplsquare [into-unicode 0x234D]
|
||||
composite
|
||||
begin glyphs.hwwhitecircle
|
||||
VBar MIDDLE operBot operTop aplBoxSW
|
||||
HBarBottom SB RIGHTSB operBot aplBoxSW
|
||||
into-unicode 0x234E
|
||||
composite glyphs.hwarrowup glyphs.minus [into-unicode 0x234F]
|
||||
composite glyphs.hwarrowup aplBoxTfm glyphs.aplsquare [into-unicode 0x2350]
|
||||
composite glyphs.top glyphs.overlineAbove [into-unicode 0x2351]
|
||||
composite glyphs.nabla glyphs.aplbar [into-unicode 0x2352]
|
||||
composite glyphs.wedge aplBoxTfm glyphs.aplsquare [into-unicode 0x2353]
|
||||
composite glyphs.nabla aplBoxTfm glyphs.aplsquare [into-unicode 0x2354]
|
||||
composite
|
||||
begin glyphs.hwwhitecircle
|
||||
VBar MIDDLE operBot operTop aplBoxSW
|
||||
HBarTop SB RIGHTSB operTop aplBoxSW
|
||||
into-unicode 0x2355
|
||||
composite glyphs.hwarrowdown glyphs.minus [into-unicode 0x2356]
|
||||
composite glyphs.hwarrowdown aplBoxTfm glyphs.aplsquare [into-unicode 0x2357]
|
||||
composite glyphs.singleQuote markset.plus glyphs.underlineBelow [into-unicode 0x2358]
|
||||
composite glyphs.nabla glyphs.underlineBelow [into-unicode 0x2359]
|
||||
composite glyphs.hwwhitediamond markset.plus glyphs.underlineBelow [into-unicode 0x235A]
|
||||
composite glyphs.hwsmallwhitecircle markset.plus glyphs.underlineBelow [into-unicode 0x235B]
|
||||
composite glyphs.hwwhitecircle markset.plus glyphs.underlineBelow [into-unicode 0x235C]
|
||||
composite
|
||||
begin glyphs.hwsmallwhitecircle
|
||||
ScaleAround MIDDLE parenMid 0.75
|
||||
Realign MIDDLE parenMid MIDDLE (operBot + SMOOTH)
|
||||
UShape operTop operBot [adviceBlackness 5] true
|
||||
FlipAround MIDDLE parenMid
|
||||
into-unicode 0x235D
|
||||
composite glyphs.singleQuote aplBoxTfm glyphs.aplsquare [into-unicode 0x235E]
|
||||
composite glyphs.hwblackstar [FlipAround MIDDLE parenMid 0.75] glyphs.mathO [into-unicode 0x235F]
|
||||
composite glyphs.colon [Realign MIDDLE (XH/2) MIDDLE parenMid] aplBoxTfm glyphs.aplsquare [into-unicode 0x2360]
|
||||
composite glyphs.top glyphs.dieresisAbove [into-unicode 0x2361]
|
||||
composite glyphs.nabla glyphs.dieresisAbove [into-unicode 0x2362]
|
||||
composite glyphs.hwblackstar glyphs.dieresisAbove [into-unicode 0x2363]
|
||||
composite glyphs.hwsmallwhitecircle markset.plus glyphs.dieresisAbove [into-unicode 0x2364]
|
||||
composite glyphs.hwwhitecircle markset.plus glyphs.dieresisAbove [into-unicode 0x2365]
|
||||
composite glyphs.space [UShape operTop operBot aplBoxSW true] glyphs.aplbar [into-unicode 0x2366]
|
||||
composite glyphs.subst glyphs.aplbar [into-unicode 0x2367]
|
||||
composite glyphs.'asciitilde.low' glyphs.dieresisAbove [into-unicode 0x2368]
|
||||
composite glyphs.'greater.narrow' glyphs.dieresisAbove [into-unicode 0x2369]
|
||||
composite glyphs.minus glyphs.comma [Upright] [Translate 0 (XH / 2)] [Italify] [into-unicode 0x236A]
|
||||
composite glyphs.nabla glyphs.'asciitilde.low' [into-unicode 0x236B]
|
||||
composite glyphs.'zero.unslashed' glyphs.'asciitilde.low' [into-unicode 0x236C]
|
||||
composite glyphs.bar glyphs.'asciitilde.low' [into-unicode 0x236D]
|
||||
composite glyphs.semicolon [Realign MIDDLE (XH/2) MIDDLE parenMid] markset.plus glyphs.underlineBelow [into-unicode 0x236E]
|
||||
composite glyphs.noteq aplBoxTfm glyphs.aplsquare [into-unicode 0x236F]
|
||||
composite glyphs.question aplBoxTfm glyphs.aplsquare [into-unicode 0x2370]
|
||||
composite glyphs.vee glyphs.'asciitilde.low' [into-unicode 0x2371]
|
||||
composite glyphs.wedge glyphs.'asciitilde.low' [into-unicode 0x2372]
|
||||
alias 'apliota' 0x2373 'iota'
|
||||
alias 'aplrho' 0x2374 'rho'
|
||||
alias 'aplomega' 0x2375 'omega'
|
||||
composite glyphs.alpha glyphs.underlineBelow [into-unicode 0x2376]
|
||||
composite glyphs.epsilon glyphs.underlineBelow [into-unicode 0x2377]
|
||||
composite glyphs.iota glyphs.underlineBelow [into-unicode 0x2378]
|
||||
composite glyphs.omega glyphs.underlineBelow [into-unicode 0x2379]
|
||||
alias 'aplalpha' 0x237A 'alpha'
|
||||
|
||||
|
||||
### Others
|
||||
alias 'mathbullet' 0x2219 'bullet'
|
||||
alias 'mathsmallcircle' 0x2218 'hwsmallwhitecircle'
|
||||
alias 'mathstar' 0x22C6 'hwblackstar'
|
||||
|
||||
sketch # sqrt
|
||||
include : dispiro
|
||||
|
|
|
@ -523,6 +523,7 @@ export : define [apply] : begin
|
|||
line-to (RIGHTSB - STROKE * cor) parenTop
|
||||
reverse-last
|
||||
save 'slash' '/'
|
||||
alias 'solidus' 0x2044 'slash'
|
||||
|
||||
sketch # backslash
|
||||
local width : (RIGHTSB - SB) * (1 + TANSLANT * 2)
|
||||
|
@ -531,9 +532,7 @@ export : define [apply] : begin
|
|||
line-to (MIDDLE - width / 2 + STROKE * cor) parenTop
|
||||
line-to (MIDDLE + width / 2) parenBot
|
||||
line-to (MIDDLE + width / 2 - STROKE * cor) parenBot
|
||||
reverse-last
|
||||
save 'backslash' "\\"
|
||||
alias 'solidus' 0x2044 'slash'
|
||||
|
||||
|
||||
### 'Dashes'
|
||||
|
@ -878,12 +877,12 @@ export : define [apply] : begin
|
|||
apply-transform : Translate (MIDDLE) (XH + ACCENT)
|
||||
apply-transform : Italify
|
||||
|
||||
composite 'asciitilde.low' glyphs.'asciitilde.high' [Upright] [Translate 0 (parenMid - XH - ACCENT)] [Italify]
|
||||
composite 'asciitilde.low' glyphs.'asciitilde.high' [Upright] [Translate 0 (parenMid - XH - ACCENT)] [Italify] markset.plus
|
||||
select-variant 'asciitilde' '~' 'low' {
|
||||
.cv16 'asciitilde.high'
|
||||
.cv17 'asciitilde.low'
|
||||
}
|
||||
composite 'asciicaret.low' glyphs.'asciicaret.high' [Upright] [Translate 0 (parenMid - XH - ACCENT)] [Italify]
|
||||
composite 'asciicaret.low' glyphs.'asciicaret.high' [Upright] [Translate 0 (parenMid - XH - ACCENT)] [Italify] markset.plus
|
||||
select-variant 'asciicaret' '^' 'high' {
|
||||
.cv29 'asciicaret.high'
|
||||
.cv30 'asciicaret.low'
|
||||
|
|
|
@ -19,6 +19,8 @@ export : define [calculateMetrics para] : begin
|
|||
define parenBot (parenMid - (CAP - XH) * 2.6)
|
||||
define operTop : mix parenMid parenTop 0.8
|
||||
define operBot : mix parenMid parenBot 0.8
|
||||
define plusTop : parenMid + (WIDTH - SB * 2) * 0.55
|
||||
define plusBot : parenMid - (WIDTH - SB * 2) * 0.55
|
||||
define operMid parenMid
|
||||
|
||||
# Transform constructors
|
||||
|
@ -140,7 +142,7 @@ export : define [calculateMetrics para] : begin
|
|||
|
||||
return [object
|
||||
UPM WIDTH SB CAP XH DESCENDER CONTRAST
|
||||
parenMid parenTop parenBot operTop operBot operMid Italify Upright Scale Translate Rotate globalTransform
|
||||
parenMid parenTop parenBot operTop operBot plusTop plusBot operMid Italify Upright Scale Translate Rotate globalTransform
|
||||
TANSLANT SINSLANT COSSLANT HVCONTRAST UPWARD DOWNWARD RIGHTWARD LEFTWARD
|
||||
O OX OXHOOK HOOK AHOOK SHOOK RHOOK JHOOK FHOOK HOOKX SMOOTH SMALLSMOOTH STROKE DOTSIZE PERIODSIZE
|
||||
BARPOS GBARPOS PBARPOS EBARPOS OVERLAYPOS FIVEBARPOS LONGJUT JUT VJUT ACCENT ACCENTX CTHIN CTHINB SLAB
|
||||
|
@ -176,4 +178,8 @@ export : define [setFontMetrics para metrics font] : begin
|
|||
set font.post.italicAngle (0 - para.slantAngle)
|
||||
|
||||
export : define designParameters : object
|
||||
equal_wideness 0.1
|
||||
equal_wideness 0.1
|
||||
logic_narrow_shrink 0.75
|
||||
geometric_large_x (1 + 2 / 3)
|
||||
geometric_small_x (3 / 5)
|
||||
arrow_size (3 / 8)
|
|
@ -133,7 +133,7 @@ define-macro save : syntax-rules
|
|||
define-macro glyph-module-entry : syntax-rules
|
||||
`[glyph-module-entry @::_opts] : begin
|
||||
define optionalImports : object
|
||||
commonShapes `[define [object select-variant italic-variant alias composite into-unicode turned dual vdual fwl fwr dwl dwr dwc Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif AIVSerifs AIHSerifs AINSerifs AICyrISerifs AIMSerifs halfXStrand xStrand nShoulderKnots nShoulder mShoulderSpiro HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar CurlyTail HCurlyTail FlatSlashShape determineMixR HookShape hookstart hookend WaveShape CyrDescender refair Fork Miniature Thinner Widen FlipAround] $capture.commonShapes]
|
||||
commonShapes `[define [object select-variant italic-variant alias composite into-unicode turned dual vdual fwl fwr dwl dwr dwc Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OBarLeftShape OBarRightShape LeftwardTopSerif LeftwardBottomSerif RightwardTopSerif RightwardBottomSerif CenterTopSerif CenterBottomSerif DownwardRightSerif UpwardRightSerif DownwardLeftSerif UpwardLeftSerif AIVSerifs AIHSerifs AINSerifs AICyrISerifs AIMSerifs halfXStrand xStrand nShoulderKnots nShoulder mShoulderSpiro HBar HBarTop HBarBottom HOverlayBar VBar VBarLeft VBarRight VerticalHook LegShape LeftHook HooktopLeftBar CurlyTail HCurlyTail FlatSlashShape determineMixR HookShape hookstart hookend WaveShape CyrDescender refair Fork Miniature Thinner Widen FlipAround ScaleAround Realign] $capture.commonShapes]
|
||||
|
||||
overmarks `[define [object markExtend markHalfStroke markStress markFine markMiddle markDotsRadius aboveMarkTop aboveMarkBot aboveMarkMid belowMarkBot belowMarkTop commaOvershoot commaOvershoot2 commaAboveRadius] $capture.overmarks]
|
||||
|
||||
|
@ -151,7 +151,7 @@ define-macro glyph-module-entry : syntax-rules
|
|||
define [object metrics $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged TempFont includeGlyphPart compsiteMarkSet] $capture
|
||||
define [object
|
||||
UPM WIDTH SB CAP XH DESCENDER CONTRAST
|
||||
parenMid parenTop parenBot operTop operBot operMid Italify Upright Scale Translate Rotate globalTransform
|
||||
parenMid parenTop parenBot operTop operBot plusTop plusBot operMid Italify Upright Scale Translate Rotate globalTransform
|
||||
TANSLANT SINSLANT COSSLANT HVCONTRAST UPWARD DOWNWARD RIGHTWARD LEFTWARD
|
||||
O OX OXHOOK HOOK AHOOK SHOOK RHOOK JHOOK FHOOK HOOKX SMOOTH SMALLSMOOTH STROKE DOTSIZE PERIODSIZE
|
||||
BARPOS GBARPOS PBARPOS EBARPOS OVERLAYPOS FIVEBARPOS LONGJUT JUT VJUT ACCENT ACCENTX CTHIN CTHINB SLAB
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
<style>
|
||||
|
||||
</style>
|
||||
<script src="https://cdn.bootcss.com/vue/1.0.7/vue.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/vue-resource/0.1.17/vue-resource.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.min.js"></script>
|
||||
<link rel="stylesheet" href="specimen.css">
|
||||
<link rel="stylesheet" href="http://maxcdn.icons8.com/fonts/icons8_win10/1.0./styles.min.css">
|
||||
|
||||
|
@ -16,30 +15,29 @@
|
|||
|
||||
<body>
|
||||
<div id="picker">
|
||||
<span class="title pp {{current.cls}}">Iosevka {{current.display}} Specimen<span class="icon icons8-angle-down"></span></span>
|
||||
<span class="title pp" v-bind:class="[current.cls]">Iosevka {{current.display}} Specimen<span class="icon icons8-angle-down"></span></span>
|
||||
<div class="menu">
|
||||
<div class="group" v-for="group in fonts">
|
||||
<a href="#" v-for="item in group" v-on:click.prevent="choose(item)" class="pp {{item.cls}} {{item === current ? 'active' : ''}}">{{item.display}}</a>
|
||||
<a href="#" v-for="item in group" v-on:click.prevent="choose(item)" class="pp" v-bind:class="[item.cls, item === current ? 'active' : '']">{{item.display}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="display">
|
||||
<div id="waiting" v-show="(!!waiting)"></div>
|
||||
<div class="show {{currentFont.cls}}">
|
||||
<p class="waterfall" v-for="size in waterfall" style="font-size:{{size / 14}}rem">float Fox.quick(h){!isBrown && jumpO̶̸ver(dogeś̠̣.lazy)}</p>
|
||||
<p class="lipsum" v-for="item in lipsums">{{item}}</p>
|
||||
<div class="show" v-bind:class="[currentFont.cls]">
|
||||
<p class="waterfall" v-for="size in waterfall" v-bind:style="{fontSize: (size / 14 + 'rem')}">float Fox.quick(h){!isBrown && jumpO̶̸ver(dogeś̠̣.lazy)}</p>
|
||||
<pre class="langs"><code class=patel><span class=keyword>define</span> samples : <span class=keyword>object</span><template v-for="sample in samples">
|
||||
{<span class=qualifier>.lang</span> <span class=string>'{{sample.lang}}'</span>{{sample.spaces}}<span class=qualifier>.sample</span> <span class=string lang="{{sample.code}}">'{{{sample.sample}}}'</span>}<span class=comment>{{sample.comment}}</span></template></code></pre>
|
||||
{<span class=qualifier>.lang</span> <span class=string>'{{sample.lang}}'</span>{{sample.spaces}}<span class=qualifier>.sample</span> <span class=string lang="{{sample.code}}">'<span v-html="sample.sample"></span>'</span>}<span class=comment>{{sample.comment}}</span></template></code></pre>
|
||||
</div>
|
||||
<div class="usheet show {{block.font.cls}}" v-for="block in blocks" track-by="$index">
|
||||
<div v-for="block in blocks" class="usheet show" v-bind:class="[block.font.cls]">
|
||||
<h3><span>{{block.name}}</span></h3>
|
||||
<table class="block">
|
||||
<tr class="row" v-for="row in block.rows">
|
||||
<td class="indicator"><s>x</s>
|
||||
<n>U+{{row.startIndex}}</n>
|
||||
</td>
|
||||
<td v-for="char in row.chars" class="{{char.name ? 'present' : 'missing'}}" title="{{char.name}}">
|
||||
<d class="{{(char.isMark ? 'mark' : char.isTie ? 'tie' : 'simple')}}">{{char.char}}</d>
|
||||
<td v-for="char in row.chars" v-bind:class="[char.name ? 'present' : 'missing']" v-bind:title="char.name">
|
||||
<d v-bind:class="[(char.isMark ? 'mark' : char.isTie ? 'tie' : 'simple')]">{{char.char}}</d>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -333,7 +333,6 @@ var display = new Vue({
|
|||
el: '#display',
|
||||
data: {
|
||||
charsHTML: '',
|
||||
lipsums: [], //lipsums,
|
||||
samples: (function (ss) {
|
||||
var langlen = 0;
|
||||
for (var j = 0; j < ss.length; j++) { if (ss[j].lang.length > langlen) langlen = ss[j].lang.length };
|
||||
|
@ -359,12 +358,16 @@ var display = new Vue({
|
|||
} else {
|
||||
t.waiting -= 1;
|
||||
}
|
||||
}, 10);
|
||||
});
|
||||
}
|
||||
},
|
||||
ready: function () {
|
||||
created: function () {
|
||||
console.log('Ready to show up.');
|
||||
this.waiting += 1;
|
||||
this.$http.get('assets/' + this.currentFont.name + '.charmap', function (data) {
|
||||
var t = this;
|
||||
fetch('assets/' + this.currentFont.name + '.charmap').then(function (response) {
|
||||
return response.json()
|
||||
}).then(function(data){
|
||||
var blocks = [];
|
||||
var uhash = [];
|
||||
var whash = [];
|
||||
|
@ -414,10 +417,9 @@ var display = new Vue({
|
|||
};
|
||||
|
||||
var nblocks = 0;
|
||||
var t = this;
|
||||
requestAnimationFrame(function fn() {
|
||||
if (nblocks < blocks.length) {
|
||||
t.blocks.$set(nblocks, blocks[nblocks]);
|
||||
Vue.set(t.blocks, nblocks, blocks[nblocks]);
|
||||
nblocks += 1;
|
||||
requestAnimationFrame(fn)
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user