Start diversity work
This commit is contained in:
parent
b8535b964d
commit
13de3ee48a
13 changed files with 763 additions and 498 deletions
|
@ -121,6 +121,9 @@ design = ["ss11"]
|
||||||
family = "Iosevka Term SS11"
|
family = "Iosevka Term SS11"
|
||||||
design = ["term", "ss11"]
|
design = ["term", "ss11"]
|
||||||
|
|
||||||
|
[buildPlans.iosevka-poly1]
|
||||||
|
family = "Iosevka Poly1"
|
||||||
|
design = ["shape-straight-bar", "diversity-1", "v-at-fourfold"]
|
||||||
|
|
||||||
# Export plans
|
# Export plans
|
||||||
# This mapping affects the process of creating ZIP archives only
|
# This mapping affects the process of creating ZIP archives only
|
||||||
|
|
|
@ -41,32 +41,34 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
||||||
return nothing
|
return nothing
|
||||||
|
|
||||||
define metrics : calculateMetrics para
|
define metrics : calculateMetrics para
|
||||||
define [object globalTransform MIDDLE CAP XH SB RIGHTSB CONTRAST STROKE SUPERNESS WIDTH TANSLANT OVERLAYPOS DESCENDER symbolMid parenTop parenBot operTop operBot plusTop plusBot tackTop tackBot] metrics
|
define [object globalTransform MIDDLE CAP XH SB RIGHTSB CONTRAST STROKE SUPERNESS WIDTH TANSLANT OVERLAYPOS DESCENDER MVERTSTROKE_D symbolMid parenTop parenBot operTop operBot plusTop plusBot tackTop tackBot] metrics
|
||||||
|
|
||||||
# Anchor parameters
|
# Anchor parameters
|
||||||
define [object MARK BASE] Anchor
|
define [object MARK BASE] Anchor
|
||||||
define {AS_BASE ALSO_METRICS} {'AS-BASE' 'ALSO-METRICS'}
|
define {AS_BASE ALSO_METRICS} {'AS-BASE' 'ALSO-METRICS'}
|
||||||
|
|
||||||
define markset : do
|
define [MarksetDiv p] : begin
|
||||||
|
define middle : p * MIDDLE
|
||||||
|
define rightSB : WIDTH * p - SB
|
||||||
define [ta anchor] : return : new Anchor
|
define [ta anchor] : return : new Anchor
|
||||||
* (anchor.x * globalTransform.xx + anchor.y * TANSLANT + globalTransform.x)
|
* (anchor.x * globalTransform.xx + anchor.y * TANSLANT + globalTransform.x)
|
||||||
* (anchor.x * globalTransform.xy + anchor.y * globalTransform.yy + globalTransform.y)
|
* (anchor.x * globalTransform.xy + anchor.y * globalTransform.yy + globalTransform.y)
|
||||||
* anchor.type
|
* anchor.type
|
||||||
|
|
||||||
define markAboveLower {.anchors {.above [ta : new Anchor MIDDLE XH BASE]}}
|
define markAboveLower {.anchors {.above [ta : new Anchor middle XH BASE]}}
|
||||||
define markAboveOper {.anchors {.above [ta : new Anchor MIDDLE operTop BASE]}}
|
define markAboveOper {.anchors {.above [ta : new Anchor middle operTop BASE]}}
|
||||||
define markAboveTack {.anchors {.above [ta : new Anchor MIDDLE tackTop BASE]}}
|
define markAboveTack {.anchors {.above [ta : new Anchor middle tackTop BASE]}}
|
||||||
define markAbovePlus {.anchors {.above [ta : new Anchor MIDDLE plusTop BASE]}}
|
define markAbovePlus {.anchors {.above [ta : new Anchor middle plusTop BASE]}}
|
||||||
define markAboveCap {.anchors {.above [ta : new Anchor MIDDLE CAP BASE]}}
|
define markAboveCap {.anchors {.above [ta : new Anchor middle CAP BASE]}}
|
||||||
define markBelowLower {.anchors {.below [ta : new Anchor MIDDLE DESCENDER BASE]}}
|
define markBelowLower {.anchors {.below [ta : new Anchor middle DESCENDER BASE]}}
|
||||||
define markBelowTack {.anchors {.below [ta : new Anchor MIDDLE tackBot BASE]}}
|
define markBelowTack {.anchors {.below [ta : new Anchor middle tackBot BASE]}}
|
||||||
define markBelowOper {.anchors {.below [ta : new Anchor MIDDLE operBot BASE]}}
|
define markBelowOper {.anchors {.below [ta : new Anchor middle operBot BASE]}}
|
||||||
define markBelowPlus {.anchors {.below [ta : new Anchor MIDDLE plusBot BASE]}}
|
define markBelowPlus {.anchors {.below [ta : new Anchor middle plusBot BASE]}}
|
||||||
define markBelowZero {.anchors {.below [ta : new Anchor MIDDLE 0 BASE]}}
|
define markBelowZero {.anchors {.below [ta : new Anchor middle 0 BASE]}}
|
||||||
define markToprightLower {.anchors {.topright [ta : new Anchor RIGHTSB XH BASE]}}
|
define markToprightLower {.anchors {.topright [ta : new Anchor rightSB XH BASE]}}
|
||||||
define markToprightCap {.anchors {.topright [ta : new Anchor RIGHTSB CAP BASE]}}
|
define markToprightCap {.anchors {.topright [ta : new Anchor rightSB CAP BASE]}}
|
||||||
define markBottomrightLower {.anchors {.bottomright [ta : new Anchor RIGHTSB DESCENDER BASE]}}
|
define markBottomrightLower {.anchors {.bottomright [ta : new Anchor rightSB DESCENDER BASE]}}
|
||||||
define markBottomrightZero {.anchors {.bottomright [ta : new Anchor RIGHTSB 0 BASE]}}
|
define markBottomrightZero {.anchors {.bottomright [ta : new Anchor rightSB 0 BASE]}}
|
||||||
|
|
||||||
define [buildStandardMarkSet] : begin
|
define [buildStandardMarkSet] : begin
|
||||||
local a : compsiteMarkSet.apply null arguments
|
local a : compsiteMarkSet.apply null arguments
|
||||||
|
@ -90,6 +92,17 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
||||||
p : buildStandardMarkSet markAboveLower markBelowLower markToprightLower markBottomrightLower
|
p : buildStandardMarkSet markAboveLower markBelowLower markToprightLower markBottomrightLower
|
||||||
if : buildStandardMarkSet markAboveCap markBelowLower markToprightCap markBottomrightLower
|
if : buildStandardMarkSet markAboveCap markBelowLower markToprightCap markBottomrightLower
|
||||||
|
|
||||||
|
define markset : MarksetDiv 1
|
||||||
|
|
||||||
|
define [DivFrame _div] : begin
|
||||||
|
local div : fallback _div 1
|
||||||
|
return : object
|
||||||
|
div div
|
||||||
|
width : WIDTH * div
|
||||||
|
middle : MIDDLE * div
|
||||||
|
rightSB : WIDTH * div - SB
|
||||||
|
mvs : MVERTSTROKE_D div
|
||||||
|
markSet: MarksetDiv div
|
||||||
|
|
||||||
### Glyph slots and dependency profile generation (used for recursive subfonts)
|
### Glyph slots and dependency profile generation (used for recursive subfonts)
|
||||||
local dependencyProfile {.}
|
local dependencyProfile {.}
|
||||||
|
@ -190,7 +203,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
||||||
save 'space' ' '
|
save 'space' ' '
|
||||||
|
|
||||||
# IDKY, but wrapping "metrics" prevents Node.js on Arch modifying it.
|
# IDKY, but wrapping "metrics" prevents Node.js on Arch modifying it.
|
||||||
define capture : object [metrics : Object.create metrics] $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ save-glyph spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged TempFont includeGlyphPart compsiteMarkSet
|
define capture : object [metrics : Object.create metrics] $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ save-glyph spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged TempFont includeGlyphPart compsiteMarkSet MarksetDiv DivFrame
|
||||||
|
|
||||||
### HERE WE GO
|
### HERE WE GO
|
||||||
set capture.commonShapes : [import '../glyphs/common-shapes.js'].apply.call capture
|
set capture.commonShapes : [import '../glyphs/common-shapes.js'].apply.call capture
|
||||||
|
|
|
@ -137,16 +137,11 @@ const font = (function() {
|
||||||
|
|
||||||
if (argv.charmap) {
|
if (argv.charmap) {
|
||||||
const charmap = font.glyf.map(function(glyph) {
|
const charmap = font.glyf.map(function(glyph) {
|
||||||
|
const isSpace = glyph.contours && glyph.contours.length ? 2 : 0;
|
||||||
return [
|
return [
|
||||||
glyph.name,
|
glyph.name,
|
||||||
glyph.unicode,
|
glyph.unicode,
|
||||||
glyph.advanceWidth === 0
|
glyph.advanceWidth === 0 ? (hasv(glyph.anchors) ? 1 : isSpace ? 2 : 0) : 0
|
||||||
? hasv(glyph.anchors)
|
|
||||||
? 1
|
|
||||||
: glyph.contours && glyph.contours.length
|
|
||||||
? 2
|
|
||||||
: 0
|
|
||||||
: 0
|
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
fs.writeFileSync(argv.charmap, JSON.stringify(charmap), "utf8");
|
fs.writeFileSync(argv.charmap, JSON.stringify(charmap), "utf8");
|
||||||
|
@ -207,10 +202,10 @@ if (argv.o) {
|
||||||
const excludeUnicodes = new Set();
|
const excludeUnicodes = new Set();
|
||||||
excludeUnicodes.add(0x80);
|
excludeUnicodes.add(0x80);
|
||||||
for (let c = 0x2500; c <= 0x259f; c++) excludeUnicodes.add(c);
|
for (let c = 0x2500; c <= 0x259f; c++) excludeUnicodes.add(c);
|
||||||
// autoref
|
// // autoref
|
||||||
autoref(font.glyf, excludeUnicodes);
|
// autoref(font.glyf, excludeUnicodes);
|
||||||
// regulate
|
// // regulate
|
||||||
for (let g of font.glyf) regulateGlyph(g, skew);
|
// for (let g of font.glyf) regulateGlyph(g, skew);
|
||||||
|
|
||||||
// reorder
|
// reorder
|
||||||
font.glyf = font.glyf.sort((a, b) => a.gord - b.gord);
|
font.glyf = font.glyf.sort((a, b) => a.gord - b.gord);
|
||||||
|
|
|
@ -505,6 +505,7 @@ export : define [apply] : begin
|
||||||
foreach {unicode glyphid tfm} [items-of records] : create-glyph [suggestName : 'smcp' + glyphid] : glyph-construction
|
foreach {unicode glyphid tfm} [items-of records] : create-glyph [suggestName : 'smcp' + glyphid] : glyph-construction
|
||||||
if unicode : assign-unicode unicode
|
if unicode : assign-unicode unicode
|
||||||
include sf.(glyphid) AS_BASE
|
include sf.(glyphid) AS_BASE
|
||||||
|
set-width sf.(glyphid).advanceWidth
|
||||||
if tfm : include tfm
|
if tfm : include tfm
|
||||||
|
|
||||||
define [createMedievalCombs records] : if [not recursive] : begin
|
define [createMedievalCombs records] : if [not recursive] : begin
|
||||||
|
@ -859,11 +860,14 @@ export : define [apply] : begin
|
||||||
list 0x1DF4 'udieresis'
|
list 0x1DF4 'udieresis'
|
||||||
|
|
||||||
# Unicode Ligatures
|
# Unicode Ligatures
|
||||||
define [createLigatures shrink1 shrink2 wadj1 wadj2 records] : if [not recursive] : begin
|
define [createLigatures _shrink1 _shrink2 wadj1 wadj2 records] : if [not recursive] : begin
|
||||||
local pendingGlyphs1 : records.map : [record] => record.1
|
local pendingGlyphs1 : records.map : [record] => record.1
|
||||||
local pendingGlyphs2 : records.map : [record] => record.2
|
local pendingGlyphs2 : records.map : [record] => record.2
|
||||||
local df1 : Thinner pendingGlyphs1 [if (para.spacing > 1) 1 shrink1]
|
local wide : para.spaing > 1 || para.diversityW > 1
|
||||||
local df2 : Thinner pendingGlyphs2 [if (para.spacing > 1) 1 shrink2]
|
local shrink1 : if (wide) 1 [clamp 0 1 (_shrink1 * para.diversityW)]
|
||||||
|
local shrink2 : if (wide) 1 [clamp 0 1 (_shrink2 * para.diversityW)]
|
||||||
|
local df1 : Thinner pendingGlyphs1 shrink1
|
||||||
|
local df2 : Thinner pendingGlyphs2 shrink2
|
||||||
|
|
||||||
foreach [{unicode c1 c2 mark} : items-of records] : begin
|
foreach [{unicode c1 c2 mark} : items-of records] : begin
|
||||||
local glyphName "\(c1)_\(c2)"
|
local glyphName "\(c1)_\(c2)"
|
||||||
|
@ -871,7 +875,7 @@ export : define [apply] : begin
|
||||||
local j 2
|
local j 2
|
||||||
while glyphs.(glyphName + j) : inc j
|
while glyphs.(glyphName + j) : inc j
|
||||||
set glyphName (glyphName + j)
|
set glyphName (glyphName + j)
|
||||||
if (para.spacing > 1) : begin
|
if wide : begin
|
||||||
sketch
|
sketch
|
||||||
include df2.(c2)
|
include df2.(c2)
|
||||||
include : Translate WIDTH 0
|
include : Translate WIDTH 0
|
||||||
|
@ -880,19 +884,20 @@ export : define [apply] : begin
|
||||||
save glyphName unicode
|
save glyphName unicode
|
||||||
: else
|
: else
|
||||||
local kern : SB * 7/8 * (shrink1 + shrink2)
|
local kern : SB * 7/8 * (shrink1 + shrink2)
|
||||||
local refw : WIDTH * (shrink1 * wadj1 + shrink2 * wadj2) - kern
|
local refW : WIDTH * (shrink1 * wadj1 + shrink2 * wadj2) - kern
|
||||||
|
local targetW : WIDTH * para.diversityW
|
||||||
sketch
|
sketch
|
||||||
include df2.(c2)
|
include df2.(c2)
|
||||||
include : Translate (WIDTH * shrink1 * wadj1 - kern) 0
|
include : Translate (WIDTH * shrink1 * wadj1 - kern) 0
|
||||||
include df1.(c1)
|
include df1.(c1)
|
||||||
include : Translate (-WIDTH * shrink1 * (1 - wadj1) / 2) 0
|
include : Translate (-WIDTH * shrink1 * (1 - wadj1) / 2) 0
|
||||||
include : Upright
|
include : Upright
|
||||||
include : Translate (-refw / 2) 0
|
include : Translate (-refW / 2) 0
|
||||||
include : Scale ((WIDTH - SB * 1.25) / (WIDTH - SB * 2) * WIDTH / refw) 1
|
include : Scale ((targetW - SB * 1.25) / (targetW - SB * 2) * targetW / refW) 1
|
||||||
include : Translate (WIDTH / 2) 0
|
include : Translate (targetW / 2) 0
|
||||||
include : Italify
|
include : Italify
|
||||||
|
|
||||||
if mark : include mark
|
if mark : include [MarksetDiv para.diversityW].(mark)
|
||||||
save glyphName unicode
|
save glyphName unicode
|
||||||
|
|
||||||
define stdShrink : clamp 0.75 0.9 : linreg 72 0.75 108 0.9 STROKE
|
define stdShrink : clamp 0.75 0.9 : linreg 72 0.75 108 0.9 STROKE
|
||||||
|
@ -918,8 +923,8 @@ export : define [apply] : begin
|
||||||
list 0x2A9 'f' 'eng'
|
list 0x2A9 'f' 'eng'
|
||||||
list 0x2AA 'l' 's'
|
list 0x2AA 'l' 's'
|
||||||
list 0x2AB 'l' 'z'
|
list 0x2AB 'l' 'z'
|
||||||
list 0x478 'O' 'y' markset.if
|
list 0x478 'O' 'y' 'if'
|
||||||
list 0x479 'o' 'y' markset.p
|
list 0x479 'o' 'y' 'p'
|
||||||
list 0x20A7 'P' 's'
|
list 0x20A7 'P' 's'
|
||||||
list 0x20A8 'R' 's'
|
list 0x20A8 'R' 's'
|
||||||
createLigatures 0.7 0.8 0.75 0.9 : list
|
createLigatures 0.7 0.8 0.75 0.9 : list
|
||||||
|
|
|
@ -31,9 +31,9 @@ export : define [apply] : begin
|
||||||
set this.cmpPriority chosenGlyph.cmpPriority
|
set this.cmpPriority chosenGlyph.cmpPriority
|
||||||
|
|
||||||
define [italic-variant name unicode] : create-glyph name : glyph-construction
|
define [italic-variant name unicode] : create-glyph name : glyph-construction
|
||||||
if para.isItalic
|
define base : if para.isItalic glyphs.(name + '.italic') glyphs.(name + '.upright')
|
||||||
then : include glyphs.(name + '.italic') AS_BASE
|
include base AS_BASE
|
||||||
else : include glyphs.(name + '.upright') AS_BASE
|
set-width base.advanceWidth
|
||||||
if unicode : assign-unicode unicode
|
if unicode : assign-unicode unicode
|
||||||
|
|
||||||
define [alias newid unicode oldid] : begin
|
define [alias newid unicode oldid] : begin
|
||||||
|
@ -132,6 +132,20 @@ export : define [apply] : begin
|
||||||
|
|
||||||
|
|
||||||
###### COMMON SHAPES
|
###### COMMON SHAPES
|
||||||
|
define [Rect u d l r transformShiftOnly] : create-glyph : glyph-construction
|
||||||
|
local my ((u + d) / 2)
|
||||||
|
local mx ((l + r) / 2)
|
||||||
|
currentGlyph.gizmo = [if transformShiftOnly [Translate 0 0] globalTransform]
|
||||||
|
include : spiro-outline
|
||||||
|
begin [lambda : set this.gizmo currentGlyph.gizmo]
|
||||||
|
corner l d
|
||||||
|
corner l u
|
||||||
|
corner u u
|
||||||
|
corner r d
|
||||||
|
close [lambda : begin [set this.angles 4] [set this.fairGizmo currentGlyph.gizmo]]
|
||||||
|
if transformShiftOnly : begin
|
||||||
|
local {.x mx1 .y my1} [tp globalTransform {.x mx .y my}]
|
||||||
|
apply-transform : Translate (mx1 - mx) (my1 - my)
|
||||||
define [Ring u d l r transformShiftOnly] : create-glyph : glyph-construction
|
define [Ring u d l r transformShiftOnly] : create-glyph : glyph-construction
|
||||||
local my ((u + d) / 2)
|
local my ((u + d) / 2)
|
||||||
local mx ((l + r) / 2)
|
local mx ((l + r) / 2)
|
||||||
|
@ -410,7 +424,7 @@ export : define [apply] : begin
|
||||||
include : dispiro : nShoulderKnots.apply null a
|
include : dispiro : nShoulderKnots.apply null a
|
||||||
|
|
||||||
|
|
||||||
define [mShoulderSpiro] : params [left right top bottom width fine] : glyph-construction
|
define [mShoulderSpiro] : params [left right top bottom width fine diversity] : glyph-construction
|
||||||
local fix : TANSLANT * STROKE * HVCONTRAST * width / STROKE
|
local fix : TANSLANT * STROKE * HVCONTRAST * width / STROKE
|
||||||
local sm : SMALLSMOOTH * 0.7
|
local sm : SMALLSMOOTH * 0.7
|
||||||
include : spiro-outline
|
include : spiro-outline
|
||||||
|
@ -430,6 +444,7 @@ export : define [apply] : begin
|
||||||
corner right bottom
|
corner right bottom
|
||||||
close
|
close
|
||||||
|
|
||||||
|
|
||||||
define [HBar xleft xright y _fine] : glyph-construction
|
define [HBar xleft xright y _fine] : glyph-construction
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center [fallback _fine STROKE]
|
widths.center [fallback _fine STROKE]
|
||||||
|
@ -653,6 +668,10 @@ export : define [apply] : begin
|
||||||
forkedPara.accentx = ACCENTX * p
|
forkedPara.accentx = ACCENTX * p
|
||||||
forkedPara.jut = JUT * p
|
forkedPara.jut = JUT * p
|
||||||
forkedPara.longjut = LONGJUT * p
|
forkedPara.longjut = LONGJUT * p
|
||||||
|
forkedPara.diversityM = 1
|
||||||
|
forkedPara.diversityW = 1
|
||||||
|
forkedPara.diversityI = 1
|
||||||
|
forkedPara.diversityF = 1
|
||||||
#forkedPara.hookx = HOOKX * p
|
#forkedPara.hookx = HOOKX * p
|
||||||
return : Fork glyphs forkedPara
|
return : Fork glyphs forkedPara
|
||||||
|
|
||||||
|
@ -712,4 +731,4 @@ export : define [apply] : begin
|
||||||
include : difference background [union.apply null candidates]
|
include : difference background [union.apply null candidates]
|
||||||
include overlay
|
include overlay
|
||||||
|
|
||||||
return [object queryFeatureSelector select-variant italic-variant alias composite into-unicode turned dual hcombine vdual vcombine fwl fwr dwl dwr dwc Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline 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 CyrDescender refair Fork Miniature Thinner Widen FlipAround ScaleAround Realign ForceUpright Overlay]
|
return [object queryFeatureSelector select-variant italic-variant alias composite into-unicode turned dual hcombine vdual vcombine fwl fwr dwl dwr dwc Rect Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline 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 CyrDescender refair Fork Miniature Thinner Widen FlipAround ScaleAround Realign ForceUpright Overlay]
|
||||||
|
|
|
@ -469,27 +469,41 @@ export : define [apply] : begin
|
||||||
save 'looprevesh' 0x1AA
|
save 'looprevesh' 0x1AA
|
||||||
|
|
||||||
### V and v
|
### V and v
|
||||||
local cornerdist : HALFSTROKE * HVCONTRAST * [if SLAB 1.2 1]
|
local cornerdist : HALFSTROKE * HVCONTRAST * 1.15
|
||||||
local vcurviness : if (SLAB && !para.isItalic) 0.15 0.3
|
local vcurviness : if (SLAB && !para.isItalic) 0.15 0.3
|
||||||
define [VShape] : params [top [sw STROKE]] : glyph-construction
|
define [VShape] : params [top [sw STROKE] barStraight div] : glyph-construction
|
||||||
include : dispiro
|
local df : DivFrame div
|
||||||
widths.lhs sw
|
local fine : if barStraight STROKE (VShape.fine * sw / STROKE)
|
||||||
flat SB top [heading DOWNWARD]
|
if barStraight : begin
|
||||||
curl SB (top * 0.9) [heading DOWNWARD]
|
include : dispiro
|
||||||
quadcontrols 0 vcurviness 9 unimportant
|
widths.lhs sw
|
||||||
g4 (MIDDLE - cornerdist) 0 [widths.lhs (VShape.fine * sw / STROKE)]
|
flat (SB + O * 2) top [heading DOWNWARD]
|
||||||
|
g4 (df.middle - cornerdist) 0 [widths.lhs fine]
|
||||||
|
: else : begin
|
||||||
|
include : dispiro
|
||||||
|
widths.lhs sw
|
||||||
|
flat SB top [heading DOWNWARD]
|
||||||
|
curl SB (top * 0.9) [heading DOWNWARD]
|
||||||
|
quadcontrols 0 vcurviness 9 unimportant
|
||||||
|
g4 (df.middle - cornerdist) 0 [widths.lhs fine]
|
||||||
|
|
||||||
#bottom cap
|
#bottom cap
|
||||||
start-from (MIDDLE + cornerdist) 0
|
start-from (df.middle + cornerdist) 0
|
||||||
line-to (MIDDLE - cornerdist) 0
|
line-to (df.middle - cornerdist) 0
|
||||||
line-to MIDDLE (VShape.fine * sw / STROKE)
|
line-to df.middle fine
|
||||||
|
|
||||||
include : dispiro
|
if barStraight : begin
|
||||||
widths.rhs sw
|
include : dispiro
|
||||||
flat RIGHTSB top [heading DOWNWARD]
|
widths.rhs sw
|
||||||
curl RIGHTSB (top * 0.9) [heading DOWNWARD]
|
flat (df.rightSB - O * 2) top [heading DOWNWARD]
|
||||||
quadcontrols 0 vcurviness 9 unimportant
|
g4 (df.middle + cornerdist) 0 [widths.rhs fine]
|
||||||
g4 (MIDDLE + cornerdist) 0 [widths.rhs (VShape.fine * sw / STROKE)]
|
: else : begin
|
||||||
|
include : dispiro
|
||||||
|
widths.rhs sw
|
||||||
|
flat df.rightSB top [heading DOWNWARD]
|
||||||
|
curl df.rightSB (top * 0.9) [heading DOWNWARD]
|
||||||
|
quadcontrols 0 vcurviness 9 unimportant
|
||||||
|
g4 (df.middle + cornerdist) 0 [widths.rhs fine]
|
||||||
tag-contour 'strokeUp'
|
tag-contour 'strokeUp'
|
||||||
include : AIVSerifs top
|
include : AIVSerifs top
|
||||||
set VShape.fine : STROKE * [fallback para.vtipfine : if SLAB 0.9 0.8]
|
set VShape.fine : STROKE * [fallback para.vtipfine : if SLAB 0.9 0.8]
|
||||||
|
@ -497,17 +511,17 @@ export : define [apply] : begin
|
||||||
sketch # V
|
sketch # V
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
include markset.capital
|
include markset.capital
|
||||||
include : VShape CAP
|
include : VShape CAP STROKE para.straightBar
|
||||||
|
|
||||||
save 'V' 'V'
|
save 'V' 'V'
|
||||||
|
|
||||||
sketch # v
|
sketch # v
|
||||||
include markset.e
|
include markset.e
|
||||||
include : VShape XH
|
include : VShape XH STROKE para.straightBar
|
||||||
|
|
||||||
save 'v' 'v'
|
save 'v' 'v'
|
||||||
define [VHooktopShape top] : glyph-construction
|
define [VHooktopShape top _stroke barStraight] : glyph-construction
|
||||||
include : VShape top
|
include : VShape top [fallback _stroke STROKE] barStraight
|
||||||
eject-contour 'serifRT'
|
eject-contour 'serifRT'
|
||||||
eject-contour 'strokeUp'
|
eject-contour 'strokeUp'
|
||||||
|
|
||||||
|
@ -520,13 +534,13 @@ export : define [apply] : begin
|
||||||
|
|
||||||
sketch # vhooktop
|
sketch # vhooktop
|
||||||
include markset.e
|
include markset.e
|
||||||
include : VHooktopShape XH
|
include : VHooktopShape XH STROKE para.straightBar
|
||||||
save 'vhooktop' 0x2C71
|
save 'vhooktop' 0x2C71
|
||||||
save 'cyrizhitsa' 0x475
|
save 'cyrizhitsa' 0x475
|
||||||
|
|
||||||
sketch # cyrIzhitsa
|
sketch # cyrIzhitsa
|
||||||
include markset.capital
|
include markset.capital
|
||||||
include : VHooktopShape CAP
|
include : VHooktopShape CAP STROKE para.straightBar
|
||||||
save 'cyrIzhitsa' 0x474
|
save 'cyrIzhitsa' 0x474
|
||||||
|
|
||||||
turned 'turnv' 0x28C 'v' MIDDLE (XH / 2)
|
turned 'turnv' 0x28C 'v' MIDDLE (XH / 2)
|
||||||
|
@ -557,10 +571,12 @@ export : define [apply] : begin
|
||||||
include markset.capital
|
include markset.capital
|
||||||
set-anchor 'trailing' BASE (RIGHTSB - markHalfStroke) 0
|
set-anchor 'trailing' BASE (RIGHTSB - markHalfStroke) 0
|
||||||
|
|
||||||
include : VShape CAP
|
include : VShape CAP STROKE para.straightBar
|
||||||
include : FlipAround MIDDLE (CAP / 2)
|
include : FlipAround MIDDLE (CAP / 2)
|
||||||
|
|
||||||
local p : linreg 18 0.075 108 0.075 STROKE
|
local p : if para.straightBar
|
||||||
|
linreg 18 0.16 108 0.16 STROKE
|
||||||
|
linreg 18 0.075 108 0.075 STROKE
|
||||||
if (SLAB && !para.isItalic) : set p : p * 1.33
|
if (SLAB && !para.isItalic) : set p : p * 1.33
|
||||||
include : HBarTop [mix SB RIGHTSB p] [mix RIGHTSB SB p] (XH / 2)
|
include : HBarTop [mix SB RIGHTSB p] [mix RIGHTSB SB p] (XH / 2)
|
||||||
save 'A' 'A'
|
save 'A' 'A'
|
||||||
|
@ -651,90 +667,131 @@ export : define [apply] : begin
|
||||||
save 'artail' 0x1D8F
|
save 'artail' 0x1D8F
|
||||||
|
|
||||||
### W and w
|
### W and w
|
||||||
define [WShape top] : glyph-construction
|
define [WShape top barStraight _div] : glyph-construction
|
||||||
local wheight (top * 0.6)
|
local div : fallback _div 1
|
||||||
|
local rightSB : WIDTH * div - SB
|
||||||
|
local middle : MIDDLE * div
|
||||||
|
local fine : if barStraight
|
||||||
|
adviceBlackness WShape.fineS div
|
||||||
|
[adviceBlackness WShape.fine div] / WShape.fineOffset
|
||||||
|
local fineOffset : fine / 2 * HVCONTRAST * WShape.fineOffset
|
||||||
|
local m1 : WIDTH * div * [if barStraight WShape.m1S WShape.m1] + [if barStraight O 0]
|
||||||
|
local m2 : WIDTH * div * [if barStraight WShape.m2S WShape.m2] - [if barStraight O 0]
|
||||||
|
local wheight : if barStraight top (top * 0.6)
|
||||||
|
|
||||||
include : dispiro
|
if barStraight : begin
|
||||||
widths.lhs
|
include : dispiro
|
||||||
flat SB top [heading DOWNWARD]
|
widths.lhs
|
||||||
curl SB (top * 0.75) [heading DOWNWARD]
|
flat (SB + O * 2) top [heading DOWNWARD]
|
||||||
quadcontrols 0 0.3 6 unimportant
|
g4 (m1 - fineOffset) 0 [widths.lhs fine]
|
||||||
g4 (WShape.m1 - WShape.fine / 2 * HVCONTRAST) 0 [widths.lhs (WShape.fine * 0.8)]
|
: else : begin
|
||||||
|
include : dispiro
|
||||||
|
widths.lhs
|
||||||
|
flat SB top [heading DOWNWARD]
|
||||||
|
curl SB (top * 0.75) [heading DOWNWARD]
|
||||||
|
quadcontrols 0 0.3 6 unimportant
|
||||||
|
g4 (m1 - fineOffset) 0 [widths.lhs fine]
|
||||||
|
|
||||||
# bottom cap 1
|
# bottom cap 1
|
||||||
start-from (WShape.m1 + WShape.fine / 2 * HVCONTRAST) 0
|
start-from (m1 + fineOffset) 0
|
||||||
line-to (WShape.m1 - WShape.fine / 2 * HVCONTRAST) 0
|
line-to (m1 - fineOffset) 0
|
||||||
line-to WShape.m1 WShape.fine
|
line-to m1 fine
|
||||||
|
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.rhs WShape.fine
|
widths.lhs fine
|
||||||
flat (MIDDLE + WShape.fine / 2 * HVCONTRAST) wheight [heading DOWNWARD]
|
flat (middle - fineOffset) wheight
|
||||||
#quadcontrols 0 0.1 6 unimportant
|
#quadcontrols 0 0.1 6 unimportant
|
||||||
g4 (WShape.m1 + WShape.fine / 2 * HVCONTRAST) 0 [widths.rhs WShape.fine]
|
g4 (m1 + fineOffset) 0 [widths.rhs fine]
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.lhs WShape.fine
|
widths.rhs fine
|
||||||
flat (MIDDLE - WShape.fine / 2 * HVCONTRAST) wheight [heading DOWNWARD]
|
flat (middle + fineOffset) wheight
|
||||||
#quadcontrols 0 0.1 6 unimportant
|
#quadcontrols 0 0.1 6 unimportant
|
||||||
curl (WShape.m2 - WShape.fine / 2 * HVCONTRAST) 0 [widths.lhs WShape.fine]
|
curl (m2 - fineOffset) 0 [widths.lhs fine]
|
||||||
|
|
||||||
|
# middle cap
|
||||||
|
start-from (middle + fineOffset) wheight
|
||||||
|
line-to middle (wheight - fine)
|
||||||
|
line-to (middle - fineOffset) wheight
|
||||||
|
|
||||||
# bottom cap 2
|
# bottom cap 2
|
||||||
start-from (WShape.m2 + WShape.fine / 2 * HVCONTRAST) 0
|
start-from (m2 + fineOffset) 0
|
||||||
line-to (WShape.m2 - WShape.fine / 2 * HVCONTRAST) 0
|
line-to (m2 - fineOffset) 0
|
||||||
line-to WShape.m2 WShape.fine
|
line-to m2 fine
|
||||||
|
|
||||||
include : dispiro
|
if barStraight : begin
|
||||||
widths.rhs
|
include : dispiro
|
||||||
flat RIGHTSB top [heading DOWNWARD]
|
widths.rhs
|
||||||
curl RIGHTSB (top * 0.75) [heading DOWNWARD]
|
flat (rightSB - O * 2) top [heading DOWNWARD]
|
||||||
quadcontrols 0 0.3 6 unimportant
|
g4 (m2 + fineOffset) 0 [widths.rhs fine]
|
||||||
g4 (WShape.m2 + WShape.fine / 2 * HVCONTRAST) 0 [widths.rhs (WShape.fine * 0.8)]
|
: else : begin
|
||||||
include : AIVSerifs top
|
include : dispiro
|
||||||
set WShape.fine : adviceBlackness 6
|
widths.rhs
|
||||||
set WShape.m1 : WIDTH * 0.325
|
flat rightSB top [heading DOWNWARD]
|
||||||
set WShape.m2 : WIDTH * 0.675
|
curl rightSB (top * 0.75) [heading DOWNWARD]
|
||||||
|
quadcontrols 0 0.3 6 unimportant
|
||||||
|
g4 (m2 + fineOffset) 0 [widths.rhs fine]
|
||||||
|
include : AIVSerifs top SB rightSB
|
||||||
|
|
||||||
|
set WShape.fine 6.5
|
||||||
|
set WShape.fineS 5.5
|
||||||
|
set WShape.fineOffset 1.375
|
||||||
|
set WShape.m1 0.325
|
||||||
|
set WShape.m2 0.675
|
||||||
|
set WShape.m1S 0.30
|
||||||
|
set WShape.m2S 0.70
|
||||||
|
|
||||||
sketch # W
|
sketch # W
|
||||||
set-width WIDTH
|
set-width (WIDTH * para.diversityW)
|
||||||
include markset.capital
|
include [MarksetDiv para.diversityW].capital
|
||||||
include : WShape CAP
|
include : WShape CAP para.straightBar para.diversityW
|
||||||
save 'W' 'W'
|
save 'W' 'W'
|
||||||
save 'cyrWe' 0x51C
|
save 'cyrWe' 0x51C
|
||||||
|
|
||||||
sketch # w
|
sketch # w
|
||||||
set-width WIDTH
|
set-width (WIDTH * para.diversityW)
|
||||||
include markset.e
|
include [MarksetDiv para.diversityW].e
|
||||||
include : WShape XH
|
include : WShape XH para.straightBar para.diversityW
|
||||||
save 'w' 'w'
|
save 'w' 'w'
|
||||||
save 'cyrwe' 0x51D
|
save 'cyrwe' 0x51D
|
||||||
|
|
||||||
turned nothing 0x28D 'w' MIDDLE (XH / 2)
|
turned nothing 0x28D 'w' (MIDDLE * para.diversityW) (XH / 2)
|
||||||
|
|
||||||
define [WHooktopShape top] : glyph-construction
|
define [WHooktopShape top barStraight _div] : glyph-construction
|
||||||
include : WShape top
|
local div : fallback _div 1
|
||||||
|
local fine : if barStraight
|
||||||
|
adviceBlackness WShape.fineS div
|
||||||
|
[adviceBlackness WShape.fine div] / WShape.fineOffset
|
||||||
|
local fineOffset : fine / 2 * HVCONTRAST * WShape.fineOffset
|
||||||
|
local rightSB : WIDTH * div - SB
|
||||||
|
local m2 : WIDTH * div * [if barStraight WShape.m2S WShape.m2] - [if barStraight O 0]
|
||||||
|
|
||||||
|
include : WShape top barStraight div
|
||||||
|
|
||||||
|
# Eject unnecessary contours
|
||||||
this.contours.pop
|
this.contours.pop
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
local s : this.contours.pop
|
local s : this.contours.pop
|
||||||
this.contours.pop
|
this.contours.pop
|
||||||
this.contours.push s
|
this.contours.push s
|
||||||
|
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.rhs
|
widths.rhs
|
||||||
straight.down.start RIGHTSB (top - HOOK) [heading DOWNWARD]
|
straight.down.start rightSB (top - HOOK) [heading DOWNWARD]
|
||||||
quadcontrols 0 0.3 6 unimportant g2
|
quadcontrols 0 0.3 6 unimportant g2
|
||||||
g4 (WShape.m2 + WShape.fine / 2 * HVCONTRAST) 0 [widths.rhs (WShape.fine * 0.8)]
|
g4 (m2 + fineOffset) 0 [widths.rhs fine]
|
||||||
include : VerticalHook (RIGHTSB - HALFSTROKE * HVCONTRAST) (top - HOOK) (HOOKX * 0.65) (-HOOK + HALFSTROKE)
|
|
||||||
|
include : VerticalHook (rightSB - HALFSTROKE * HVCONTRAST) (top - HOOK) (HOOKX * 0.65) (-HOOK + HALFSTROKE)
|
||||||
|
|
||||||
sketch # Whooktop
|
sketch # Whooktop
|
||||||
include markset.capital
|
set-width (WIDTH * para.diversityW)
|
||||||
|
include [MarksetDiv para.diversityW].capital
|
||||||
include : WHooktopShape CAP
|
include : WHooktopShape CAP para.straightBar para.diversityW
|
||||||
save 'Whooktop' 0x2C72
|
save 'Whooktop' 0x2C72
|
||||||
|
|
||||||
sketch # whooktop
|
sketch # whooktop
|
||||||
include markset.e
|
set-width (WIDTH * para.diversityW)
|
||||||
|
include [MarksetDiv para.diversityW].e
|
||||||
include : WHooktopShape XH
|
include : WHooktopShape XH para.straightBar para.diversityW
|
||||||
|
|
||||||
save 'whooktop' 0x2C73
|
save 'whooktop' 0x2C73
|
||||||
|
|
||||||
sketch # ww
|
sketch # ww
|
||||||
|
@ -965,22 +1022,44 @@ export : define [apply] : begin
|
||||||
save 'lambdaslash' 0x19B
|
save 'lambdaslash' 0x19B
|
||||||
|
|
||||||
### K and k
|
### K and k
|
||||||
define [KShape top] : glyph-construction
|
define [KShape top straightBar] : glyph-construction
|
||||||
local turn (top * 0.99)
|
local turn (top * 0.99)
|
||||||
|
|
||||||
local attach (top * [if SLAB 0.325 0.375])
|
|
||||||
local attach2 [if SLAB [mix SB RIGHTSB 0.48] MIDDLE]
|
|
||||||
|
|
||||||
local fine : adviceBlackness 3.5
|
local fine : adviceBlackness 3.5
|
||||||
include : dispiro
|
|
||||||
g4.down.start (RIGHTSB) top [widths.heading 0 (STROKE * [if SLAB 1.15 1.05] * (WIDTH * 2 / UPM)) DOWNWARD]
|
if straightBar : do
|
||||||
bezcontrols 0 [if SLAB 0.1 0.2] 0.5 [if SLAB 0.55 0.65] 8
|
local attach (top * 0.42 - STROKE)
|
||||||
g4 (SB + STROKE) attach [widths 0 fine]
|
local attach2 (top * 0.72 + STROKE)
|
||||||
include : dispiro
|
include : intersection
|
||||||
widths.center
|
Rect top 0 0 WIDTH
|
||||||
g4.up.start (RIGHTSB - O - HALFSTROKE * HVCONTRAST) 0 [heading UPWARD]
|
dispiro
|
||||||
quadcontrols 0 [if SLAB 0.125 0.25] 8
|
widths.rhs
|
||||||
g4 attach2 (top * 0.61) [widths.center fine]
|
flat (RIGHTSB - O * 2) top
|
||||||
|
curl (SB + STROKE) attach [widths 0 fine]
|
||||||
|
|
||||||
|
include : intersection
|
||||||
|
spiro-outline
|
||||||
|
corner (SB + STROKE) 0
|
||||||
|
corner (SB + STROKE) (attach + 1)
|
||||||
|
corner (RIGHTSB - O * 2 - 1) top
|
||||||
|
corner (RIGHTSB - O * 2) top
|
||||||
|
corner (RIGHTSB - O * 2) 0
|
||||||
|
dispiro
|
||||||
|
widths.lhs
|
||||||
|
flat (RIGHTSB - O * 2) 0
|
||||||
|
curl (SB + STROKE) attach2
|
||||||
|
: else : do
|
||||||
|
local attach (top * [if SLAB 0.325 0.375])
|
||||||
|
local attach2 [if SLAB [mix SB RIGHTSB 0.48] MIDDLE]
|
||||||
|
include : dispiro
|
||||||
|
g4.down.start (RIGHTSB) top [widths.heading 0 (STROKE * [if SLAB 1.15 1.05] * (WIDTH * 2 / UPM)) DOWNWARD]
|
||||||
|
bezcontrols 0 [if SLAB 0.1 0.2] 0.5 [if SLAB 0.55 0.65] 8
|
||||||
|
g4 (SB + STROKE) attach [widths 0 fine]
|
||||||
|
include : dispiro
|
||||||
|
widths.center
|
||||||
|
g4.up.start (RIGHTSB - O - HALFSTROKE * HVCONTRAST) 0 [heading UPWARD]
|
||||||
|
quadcontrols 0 [if SLAB 0.125 0.25] 8
|
||||||
|
g4 attach2 (top * 0.61) [widths.center fine]
|
||||||
|
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : RightwardTopSerif (RIGHTSB - (STROKE * [if SLAB 1.15 1.05] * (WIDTH * 2 / UPM) / 2 - HALFSTROKE) * HVCONTRAST * [if para.isItalic 1 0] - HALFSTROKE * 0.5 * HVCONTRAST) top (SIDEJUT + HALFSTROKE * 0.5 * HVCONTRAST)
|
include : RightwardTopSerif (RIGHTSB - (STROKE * [if SLAB 1.15 1.05] * (WIDTH * 2 / UPM) / 2 - HALFSTROKE) * HVCONTRAST * [if para.isItalic 1 0] - HALFSTROKE * 0.5 * HVCONTRAST) top (SIDEJUT + HALFSTROKE * 0.5 * HVCONTRAST)
|
||||||
include : RightwardBottomSerif (RIGHTSB - O * [if para.isItalic 1 0]) 0 SIDEJUT
|
include : RightwardBottomSerif (RIGHTSB - O * [if para.isItalic 1 0]) 0 SIDEJUT
|
||||||
|
@ -989,7 +1068,7 @@ export : define [apply] : begin
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
include markset.capital
|
include markset.capital
|
||||||
include : VBarLeft SB 0 CAP
|
include : VBarLeft SB 0 CAP
|
||||||
include : KShape CAP
|
include : KShape CAP para.straightBar
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : CenterTopSerif (SB + HALFSTROKE * HVCONTRAST) CAP JUT
|
include : CenterTopSerif (SB + HALFSTROKE * HVCONTRAST) CAP JUT
|
||||||
include : CenterBottomSerif (SB + HALFSTROKE * HVCONTRAST) 0 JUT
|
include : CenterBottomSerif (SB + HALFSTROKE * HVCONTRAST) 0 JUT
|
||||||
|
@ -1003,7 +1082,7 @@ export : define [apply] : begin
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
include markset.b
|
include markset.b
|
||||||
include : VBarLeft SB 0 CAP
|
include : VBarLeft SB 0 CAP
|
||||||
include : KShape XH
|
include : KShape XH para.straightBar
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : LeftwardTopSerif SB CAP SIDEJUT
|
include : LeftwardTopSerif SB CAP SIDEJUT
|
||||||
if (!para.isItalic) : begin
|
if (!para.isItalic) : begin
|
||||||
|
@ -1016,7 +1095,7 @@ export : define [apply] : begin
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
include markset.e
|
include markset.e
|
||||||
include : VBarLeft SB 0 XH
|
include : VBarLeft SB 0 XH
|
||||||
include : KShape XH
|
include : KShape XH para.straightBar
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : LeftwardTopSerif SB XH SIDEJUT
|
include : LeftwardTopSerif SB XH SIDEJUT
|
||||||
|
|
||||||
|
@ -1026,7 +1105,7 @@ export : define [apply] : begin
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
include markset.e
|
include markset.e
|
||||||
include : VBarLeft SB 0 XH
|
include : VBarLeft SB 0 XH
|
||||||
include : KShape XH
|
include : KShape XH para.straightBar
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : CenterBottomSerif (SB + HALFSTROKE * HVCONTRAST) 0 JUT
|
include : CenterBottomSerif (SB + HALFSTROKE * HVCONTRAST) 0 JUT
|
||||||
include : CenterTopSerif (SB + HALFSTROKE * HVCONTRAST) XH JUT
|
include : CenterTopSerif (SB + HALFSTROKE * HVCONTRAST) XH JUT
|
||||||
|
@ -1037,7 +1116,7 @@ export : define [apply] : begin
|
||||||
|
|
||||||
sketch # Khooktop
|
sketch # Khooktop
|
||||||
include markset.capital
|
include markset.capital
|
||||||
include : KShape CAP
|
include : KShape CAP para.straightBar
|
||||||
include : VBarLeft SB 0 (CAP - HOOK - HALFSTROKE)
|
include : VBarLeft SB 0 (CAP - HOOK - HALFSTROKE)
|
||||||
include : VerticalHook (SB + HALFSTROKE * HVCONTRAST) (CAP - HOOK - HALFSTROKE) HOOKX (-HOOK)
|
include : VerticalHook (SB + HALFSTROKE * HVCONTRAST) (CAP - HOOK - HALFSTROKE) HOOKX (-HOOK)
|
||||||
|
|
||||||
|
@ -1045,7 +1124,7 @@ export : define [apply] : begin
|
||||||
|
|
||||||
sketch # khooktop
|
sketch # khooktop
|
||||||
include markset.b
|
include markset.b
|
||||||
include : KShape XH
|
include : KShape XH para.straightBar
|
||||||
include : VBarLeft SB 0 (CAP - HOOK - HALFSTROKE)
|
include : VBarLeft SB 0 (CAP - HOOK - HALFSTROKE)
|
||||||
include : VerticalHook (SB + HALFSTROKE * HVCONTRAST) (CAP - HOOK - HALFSTROKE) HOOKX (-HOOK)
|
include : VerticalHook (SB + HALFSTROKE * HVCONTRAST) (CAP - HOOK - HALFSTROKE) HOOKX (-HOOK)
|
||||||
|
|
||||||
|
@ -2321,30 +2400,34 @@ export : define [apply] : begin
|
||||||
save 'latinupsilon2' 0x28B
|
save 'latinupsilon2' 0x28B
|
||||||
|
|
||||||
### M
|
### M
|
||||||
define [MShape top] : glyph-construction
|
define [MShape top _div] : glyph-construction
|
||||||
local topstroke : adviceBlackness 5
|
local div : fallback _div 1
|
||||||
|
local rightSB : WIDTH * div - SB
|
||||||
|
local middle : MIDDLE * div
|
||||||
|
local topstroke : adviceBlackness 5 div
|
||||||
local halftopstroke : topstroke / 2
|
local halftopstroke : topstroke / 2
|
||||||
|
local middleY : top * 0.3 / div
|
||||||
|
|
||||||
include : dispiro
|
include : dispiro
|
||||||
flat SB 0 [widths.heading 0 STROKE UPWARD]
|
flat SB 0 [widths.heading 0 STROKE UPWARD]
|
||||||
curl SB (top * 0.2) [heading UPWARD]
|
curl SB (top * 0.2) [heading UPWARD]
|
||||||
straight.up.end SB top [widths.heading 0 topstroke UPWARD]
|
straight.up.end SB top [widths.heading 0 topstroke UPWARD]
|
||||||
include : dispiro
|
include : dispiro
|
||||||
flat RIGHTSB 0 [widths.heading STROKE 0 UPWARD]
|
flat rightSB 0 [widths.heading STROKE 0 UPWARD]
|
||||||
curl RIGHTSB (top * 0.2) [heading UPWARD]
|
curl rightSB (top * 0.2) [heading UPWARD]
|
||||||
straight.up.end RIGHTSB top [widths.heading topstroke 0 UPWARD]
|
straight.up.end rightSB top [widths.heading topstroke 0 UPWARD]
|
||||||
include : dispiro
|
include : dispiro
|
||||||
flat (SB + halftopstroke) top [widths.heading topstroke 0 DOWNWARD]
|
flat (SB + halftopstroke) top [widths.heading topstroke 0 DOWNWARD]
|
||||||
curl MIDDLE (top * 0.3) [widths.heading (topstroke / 2) (topstroke / 2) DOWNWARD]
|
curl middle middleY [widths.heading (topstroke / 2) (topstroke / 2) DOWNWARD]
|
||||||
include : dispiro
|
include : dispiro
|
||||||
flat (RIGHTSB - halftopstroke) top [widths.heading 0 topstroke DOWNWARD]
|
flat (rightSB - halftopstroke) top [widths.heading 0 topstroke DOWNWARD]
|
||||||
curl MIDDLE (top * 0.3) [widths.heading (topstroke / 2) (topstroke / 2) DOWNWARD]
|
curl middle middleY [widths.heading (topstroke / 2) (topstroke / 2) DOWNWARD]
|
||||||
include : AIMSerifs top
|
include : AIMSerifs top SB rightSB
|
||||||
|
|
||||||
sketch # M
|
sketch # M
|
||||||
set-width WIDTH
|
set-width (WIDTH * para.diversityM)
|
||||||
include markset.capital
|
include [MarksetDiv para.diversityM].capital
|
||||||
include : MShape CAP
|
include : MShape CAP para.diversityM
|
||||||
save 'M' 'M'
|
save 'M' 'M'
|
||||||
save 'Mu' 0x39C
|
save 'Mu' 0x39C
|
||||||
save 'cyrEm' 0x41C
|
save 'cyrEm' 0x41C
|
||||||
|
@ -2355,66 +2438,77 @@ export : define [apply] : begin
|
||||||
save 'cyrem' 0x43C
|
save 'cyrem' 0x43C
|
||||||
|
|
||||||
### m
|
### m
|
||||||
define [SmallMShape top bot mbot] : glyph-construction
|
define [SmallMShape top bot mbot _div] : glyph-construction
|
||||||
local m1 : mix (SB + O) (MIDDLE + MVERTSTROKE / 2 * HVCONTRAST) 0.5
|
local div : fallback _div 1
|
||||||
local m2 : mix (RIGHTSB - O) (MIDDLE - MVERTSTROKE / 2 * HVCONTRAST) 0.5
|
local rightSB : WIDTH * div - SB
|
||||||
|
local middle : MIDDLE * div
|
||||||
|
local mvs : MVERTSTROKE_D div
|
||||||
|
|
||||||
|
local m1 : mix (SB + O) (middle + mvs / 2 * HVCONTRAST) 0.5
|
||||||
|
local m2 : mix (rightSB - O) (middle - mvs / 2 * HVCONTRAST) 0.5
|
||||||
include : mShoulderSpiro
|
include : mShoulderSpiro
|
||||||
left -- (SB + O + MVERTSTROKE * HVCONTRAST)
|
left -- (SB + O + mvs * HVCONTRAST)
|
||||||
right -- (MIDDLE + MVERTSTROKE / 2 * HVCONTRAST)
|
right -- (middle + mvs / 2 * HVCONTRAST)
|
||||||
top -- top
|
top -- top
|
||||||
bottom -- mbot
|
bottom -- mbot
|
||||||
width -- MVERTSTROKE
|
width -- mvs
|
||||||
fine -- (MVERTSTROKE * SHOULDERFINE / STROKE)
|
fine -- (mvs * SHOULDERFINE / STROKE)
|
||||||
|
diversity -- div
|
||||||
include : mShoulderSpiro
|
include : mShoulderSpiro
|
||||||
left -- (MIDDLE + MVERTSTROKE * 0.5 * HVCONTRAST)
|
left -- (middle + mvs * 0.5 * HVCONTRAST)
|
||||||
right -- (RIGHTSB - O)
|
right -- (rightSB - O)
|
||||||
top -- top
|
top -- top
|
||||||
bottom -- bot
|
bottom -- bot
|
||||||
width -- MVERTSTROKE
|
width -- mvs
|
||||||
fine -- (MVERTSTROKE * SHOULDERFINE / STROKE)
|
fine -- (mvs * SHOULDERFINE / STROKE)
|
||||||
include : VBarLeft (SB + O) bot top MVERTSTROKE
|
diversity -- div
|
||||||
|
include : VBarLeft (SB + O) bot top mvs
|
||||||
if SLAB : begin
|
if SLAB : begin
|
||||||
include : LeftwardTopSerif SB top SIDEJUT
|
include : LeftwardTopSerif SB top SIDEJUT
|
||||||
tag-contour 'serifLT'
|
tag-contour 'serifLT'
|
||||||
if (!para.isItalic) : include : LeftwardBottomSerif SB bot SIDEJUT
|
if (!para.isItalic) : include : LeftwardBottomSerif SB bot SIDEJUT
|
||||||
include : RightwardBottomSerif RIGHTSB bot SIDEJUT
|
include : RightwardBottomSerif rightSB bot SIDEJUT
|
||||||
tag-contour 'serifRB'
|
tag-contour 'serifRB'
|
||||||
|
|
||||||
sketch # m
|
sketch # m
|
||||||
set-width WIDTH
|
set-width (WIDTH * para.diversityM)
|
||||||
include markset.e
|
include [MarksetDiv para.diversityM].e
|
||||||
include : SmallMShape XH 0 0
|
include : SmallMShape XH 0 0 para.diversityM
|
||||||
save 'm.longleg'
|
save 'm.longleg'
|
||||||
save 'cyrte.italic'
|
save 'cyrte.italic'
|
||||||
sketch # m
|
sketch # m
|
||||||
set-width WIDTH
|
set-width (WIDTH * para.diversityM)
|
||||||
include markset.e
|
include [MarksetDiv para.diversityM].e
|
||||||
include : SmallMShape XH 0 [XH * 0.2]
|
include : SmallMShape XH 0 [XH * 0.2] para.diversityM
|
||||||
save 'm.shortleg'
|
save 'm.shortleg'
|
||||||
select-variant 'm' 'm'
|
select-variant 'm' 'm'
|
||||||
composite 'cyrtedescender.italic' glyphs.'cyrte.italic' [CyrDescender RIGHTSB] markset.e
|
composite 'cyrtedescender.italic' glyphs.'cyrte.italic' [CyrDescender (WIDTH * para.diversityM - SB)] markset.e
|
||||||
|
|
||||||
sketch # mltail
|
sketch # mltail
|
||||||
|
local mvs : MVERTSTROKE_D para.diversityM
|
||||||
include markset.p
|
include markset.p
|
||||||
include glyphs.m
|
include glyphs.m
|
||||||
eject-contour 'serifRB'
|
eject-contour 'serifRB'
|
||||||
include : VerticalHook (RIGHTSB - O - MVERTSTROKE / 2 * HVCONTRAST) 0 (-HOOKX) HOOK MVERTSTROKE
|
include : VerticalHook (WIDTH * para.diversityM - SB - O - mvs / 2 * HVCONTRAST) 0 (-HOOKX) HOOK mvs
|
||||||
|
|
||||||
save 'mltail' 0x271
|
save 'mltail' 0x271
|
||||||
turned nothing 0x26F 'm' MIDDLE (XH / 2)
|
turned nothing 0x26F 'm' (MIDDLE * para.diversityM) (XH / 2)
|
||||||
|
|
||||||
sketch # capitalTurnm
|
sketch # capitalTurnm
|
||||||
include markset.capital
|
set-width (WIDTH * para.diversityM)
|
||||||
include : SmallMShape CAP 0 0
|
include [MarksetDiv para.diversityM].capital
|
||||||
include : FlipAround MIDDLE (CAP / 2)
|
include : SmallMShape CAP 0 0 para.diversityM
|
||||||
|
include : FlipAround (MIDDLE * para.diversityM) (CAP / 2)
|
||||||
save 'capitalTurnm' 0x19C
|
save 'capitalTurnm' 0x19C
|
||||||
|
|
||||||
sketch # turnmleg
|
sketch # turnmleg
|
||||||
include markset.p
|
local mvs : MVERTSTROKE_D para.diversityM
|
||||||
|
set-width (WIDTH * para.diversityM)
|
||||||
|
include [MarksetDiv para.diversityM].p
|
||||||
include glyphs.m
|
include glyphs.m
|
||||||
eject-contour 'serifLT'
|
eject-contour 'serifLT'
|
||||||
include : FlipAround MIDDLE (XH / 2)
|
include : FlipAround (MIDDLE * para.diversityM) (XH / 2)
|
||||||
include : VBarRight (RIGHTSB - O) DESCENDER 0 MVERTSTROKE
|
include : VBarRight (WIDTH * para.diversityM - SB - O) DESCENDER 0 mvs
|
||||||
save 'turnmleg' 0x270
|
save 'turnmleg' 0x270
|
||||||
|
|
||||||
### H
|
### H
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -375,47 +375,49 @@ export : define [apply] : begin
|
||||||
curl (RIGHTSB - HALFSTROKE + TANSLANT * sw) (bot + O)
|
curl (RIGHTSB - HALFSTROKE + TANSLANT * sw) (bot + O)
|
||||||
save 'at.long'
|
save 'at.long'
|
||||||
|
|
||||||
sketch # at.tight
|
sketch # at.fourfold
|
||||||
set-width WIDTH
|
local div para.diversityM
|
||||||
|
set-width (WIDTH * div)
|
||||||
|
|
||||||
local top parenTop
|
local top parenTop
|
||||||
local bot parenBot
|
local bot parenBot
|
||||||
local otop : mix bot top 0.75
|
local otop : mix bot top 0.75
|
||||||
local obot : mix top bot 0.8
|
local obot : mix top bot 0.8
|
||||||
|
|
||||||
local sw : adviceBlackness 4
|
local sw : adviceBlackness 4 div
|
||||||
local swh : adviceBlackness 3.75
|
local swh : adviceBlackness 3.75 div
|
||||||
local left : SB - sw * HVCONTRAST / 3
|
local left : SB * div - sw * HVCONTRAST / 3
|
||||||
local right : RIGHTSB + sw * HVCONTRAST / 3
|
local right : (WIDTH * div - SB * div) + sw * HVCONTRAST / 3
|
||||||
|
local middle: MIDDLE * div
|
||||||
|
|
||||||
local m1 : [mix (left + sw / 2) (right - sw / 2) (1 / 3)] - sw * HVCONTRAST / 2
|
local m1 : [mix (left + sw / 2) (right - sw / 2) (1 / 3)] - sw * HVCONTRAST / 2
|
||||||
local m2 : [mix (left + sw / 2) (right - sw / 2) (2 / 3)] + sw * HVCONTRAST / 2
|
local m2 : [mix (left + sw / 2) (right - sw / 2) (2 / 3)] + sw * HVCONTRAST / 2
|
||||||
|
|
||||||
local sma : SMOOTHA * ((m2 - m1) / (RIGHTSB - SB) * 1.1)
|
local sma : SMOOTHA * ((m2 - m1) / (WIDTH - SB * 2) * 1.1)
|
||||||
local smb : SMOOTHB * ((m2 - m1) / (RIGHTSB - SB) * 1.1)
|
local smb : SMOOTHB * ((m2 - m1) / (WIDTH - SB * 2) * 1.1)
|
||||||
|
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.lhs sw
|
widths.lhs sw
|
||||||
flat m2 (obot - O) [heading UPWARD]
|
flat m2 (obot - O) [heading UPWARD]
|
||||||
curl m2 (otop - smb)
|
curl m2 (otop - smb)
|
||||||
arcvh
|
arcvh
|
||||||
g4 (MIDDLE - CORRECTION_OMIDX * sw) (otop - O)
|
g4 (middle - CORRECTION_OMIDX * sw) (otop - O)
|
||||||
archv
|
archv
|
||||||
flat m1 (otop - sma)
|
flat m1 (otop - sma)
|
||||||
curl m1 (obot + smb)
|
curl m1 (obot + smb)
|
||||||
arcvh
|
arcvh
|
||||||
flat MIDDLE obot
|
flat middle obot
|
||||||
curl (right - (m2 - m1) / 2) obot
|
curl (right - (m2 - m1) / 2) obot
|
||||||
archv
|
archv
|
||||||
flat right (obot + sma)
|
flat right (obot + sma)
|
||||||
curl right (top - SMOOTHB)
|
curl right (top - SMOOTHB * div)
|
||||||
arcvh
|
arcvh
|
||||||
g4 (MIDDLE - CORRECTION_OMIDS) (top - O) [widths swh 0]
|
g4 (middle - CORRECTION_OMIDS) (top - O) [widths swh 0]
|
||||||
archv
|
archv
|
||||||
flat left (top - SMOOTHA) [widths sw 0]
|
flat left (top - SMOOTHA * div) [widths sw 0]
|
||||||
curl left (bot + SMOOTHB)
|
curl left (bot + SMOOTHB * div)
|
||||||
arcvh
|
arcvh
|
||||||
flat (MIDDLE + CORRECTION_OMIDS) (bot + O) [widths swh 0 ]
|
flat (middle + CORRECTION_OMIDS) (bot + O) [widths swh 0 ]
|
||||||
curl (right - HALFSTROKE + TANSLANT * sw) (bot + O)
|
curl (right - HALFSTROKE + TANSLANT * sw) (bot + O)
|
||||||
save 'at.fourfold'
|
save 'at.fourfold'
|
||||||
|
|
||||||
|
|
|
@ -133,8 +133,9 @@ export : define [calculateMetrics para] : begin
|
||||||
# Blackness parameters
|
# Blackness parameters
|
||||||
# We will estimate blackness using lower-case 'e'
|
# We will estimate blackness using lower-case 'e'
|
||||||
define WHITENESS : ((XH - STROKE * 3) * (RIGHTSB - SB) * (1 / 3)) / (XH * (RIGHTSB - SB))
|
define WHITENESS : ((XH - STROKE * 3) * (RIGHTSB - SB) * (1 / 3)) / (XH * (RIGHTSB - SB))
|
||||||
define [adviceBlackness crowdedness] : Math.min STROKE ((500 - SB * 2) * (1 - WHITENESS) / (crowdedness * HVCONTRAST))
|
define [adviceBlackness crowdedness div] : Math.min STROKE (((WIDTH * [fallback div 1]) - SB * 2) * (1 - WHITENESS) / (crowdedness * HVCONTRAST))
|
||||||
define MVERTSTROKE : adviceBlackness : fallback para.lllcrowdedness (3 + 1 / 3)
|
define [MVERTSTROKE_D div] : adviceBlackness [fallback para.lllcrowdedness (3 + 1 / 3)] div
|
||||||
|
define MVERTSTROKE : MVERTSTROKE_D 1
|
||||||
define OVERLAYSTROKE : adviceBlackness 3.75
|
define OVERLAYSTROKE : adviceBlackness 3.75
|
||||||
define OPERATORSTROKE : adviceBlackness 3.2
|
define OPERATORSTROKE : adviceBlackness 3.2
|
||||||
define GEOMETRYSTROKE : adviceBlackness 4.5
|
define GEOMETRYSTROKE : adviceBlackness 4.5
|
||||||
|
@ -159,7 +160,7 @@ export : define [calculateMetrics para] : begin
|
||||||
TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2
|
TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2
|
||||||
FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB
|
FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB
|
||||||
MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS
|
MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS
|
||||||
WHITENESS adviceBlackness MVERTSTROKE OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy
|
WHITENESS adviceBlackness MVERTSTROKE MVERTSTROKE_D OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy
|
||||||
adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope]
|
adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope]
|
||||||
|
|
||||||
export : define [setFontMetrics para metrics font] : begin
|
export : define [setFontMetrics para metrics font] : begin
|
||||||
|
|
|
@ -135,7 +135,7 @@ define-macro save : syntax-rules
|
||||||
define-macro glyph-module-entry : syntax-rules
|
define-macro glyph-module-entry : syntax-rules
|
||||||
`[glyph-module-entry @::_opts] : begin
|
`[glyph-module-entry @::_opts] : begin
|
||||||
define optionalImports : object
|
define optionalImports : object
|
||||||
commonShapes `[define [object queryFeatureSelector select-variant italic-variant alias composite into-unicode turned hcombine vcombine dual vdual fwl fwr dwl dwr dwc Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline 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 CyrDescender refair Fork Miniature Thinner Widen FlipAround ScaleAround Realign ForceUpright Overlay] $capture.commonShapes]
|
commonShapes `[define [object queryFeatureSelector select-variant italic-variant alias composite into-unicode turned hcombine vcombine dual vdual fwl fwr dwl dwr dwc Rect Ring RingAt DotAt CircleRing CircleRingAt CircleDotAt OShape OShapeOutline 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 CyrDescender refair Fork Miniature Thinner Widen FlipAround ScaleAround Realign ForceUpright Overlay] $capture.commonShapes]
|
||||||
|
|
||||||
overmarks `[define [object markExtend markHalfStroke markStress markFine markMiddle markDotsRadius aboveMarkTop aboveMarkBot aboveMarkMid belowMarkBot belowMarkTop commaOvershoot commaOvershoot2 commaAboveRadius TildeShape] $capture.overmarks]
|
overmarks `[define [object markExtend markHalfStroke markStress markFine markMiddle markDotsRadius aboveMarkTop aboveMarkBot aboveMarkMid belowMarkBot belowMarkTop commaOvershoot commaOvershoot2 commaAboveRadius TildeShape] $capture.overmarks]
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ define-macro glyph-module-entry : syntax-rules
|
||||||
for [local j 0] (j < opts.length) [inc j] : if optionalImports.(opts.(j)) : optionalImportStatements.push optionalImports.(opts.(j))
|
for [local j 0] (j < opts.length) [inc j] : if optionalImports.(opts.(j)) : optionalImportStatements.push optionalImports.(opts.(j))
|
||||||
dirty `[begin \\
|
dirty `[begin \\
|
||||||
define $capture this
|
define $capture this
|
||||||
define [object metrics $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ save-glyph spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged TempFont includeGlyphPart compsiteMarkSet] $capture
|
define [object metrics $NamedParameterPair$ $donothing$ para recursive recursiveCodes variantSelector font glyphs glyphList unicodeGlyphs create-glyph $save$ save-glyph spirofns markset MARK BASE AS_BASE ALSO_METRICS pickHash dependencyProfile getDependencyProfile buildFont newtemp tagged TempFont includeGlyphPart compsiteMarkSet MarksetDiv DivFrame] $capture
|
||||||
define [object
|
define [object
|
||||||
UPM WIDTH SB CAP XH DESCENDER CONTRAST
|
UPM WIDTH SB CAP XH DESCENDER CONTRAST
|
||||||
symbolMid parenTop parenBot operTop operBot tackTop tackBot plusTop plusBot Italify Upright Scale Translate Rotate globalTransform
|
symbolMid parenTop parenBot operTop operBot tackTop tackBot plusTop plusBot Italify Upright Scale Translate Rotate globalTransform
|
||||||
|
@ -160,7 +160,7 @@ define-macro glyph-module-entry : syntax-rules
|
||||||
TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2
|
TAILADJX TAILADJY LBALANCE IBALANCE LBALANCE2 IBALANCE2 JBALANCE JBALANCE2 TBALANCE TBALANCE2 RBALANCE RBALANCE2
|
||||||
FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB
|
FBALANCE ONEBALANCE FULLWIDTH FULLWIDTH1 FULLWIDTH2 FULLWIDTH3 OXE ESS ESSQUESTION XO CAPO HALFSTROKE RIGHTSB FWRSB
|
||||||
MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS
|
MIDDLE FWMIDDLE CAPMIDDLE CAP_SMOOTH DOTRADIUS PERIODRADIUS SIDEJUT SMOOTHA SMOOTHB SMALLSMOOTHA SMALLSMOOTHB CORRECTION_OMIDX CORRECTION_OMIDS
|
||||||
WHITENESS adviceBlackness MVERTSTROKE OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy
|
WHITENESS adviceBlackness MVERTSTROKE MVERTSTROKE_D OVERLAYSTROKE OPERATORSTROKE GEOMETRYSTROKE SHOULDERFINE SUPERNESS superxy
|
||||||
adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope] metrics
|
adviceSSmooth adviceGlottalStopSmooth shoulderMidSlope] metrics
|
||||||
define [object
|
define [object
|
||||||
g4 g2 corner flat curl close end straight
|
g4 g2 corner flat curl close end straight
|
||||||
|
@ -168,4 +168,4 @@ define-macro glyph-module-entry : syntax-rules
|
||||||
alsothru alsothruthem bezcontrols quadcontrols archv arcvh complexThru
|
alsothru alsothruthem bezcontrols quadcontrols archv arcvh complexThru
|
||||||
dispiro spiro-outline union intersection difference] spirofns
|
dispiro spiro-outline union intersection difference] spirofns
|
||||||
* @optionalImportStatements
|
* @optionalImportStatements
|
||||||
]
|
]
|
||||||
|
|
|
@ -97,7 +97,6 @@ export : define [assignFontNames para metrics font] : begin
|
||||||
|
|
||||||
# Weight, width and slantness
|
# Weight, width and slantness
|
||||||
set font.OS_2.usWeightClass para.naming.weight
|
set font.OS_2.usWeightClass para.naming.weight
|
||||||
set font.OS_2.panose.3 9 # Monospaced
|
|
||||||
set font.OS_2.panose.2 : 1 + para.naming.weight / 100
|
set font.OS_2.panose.2 : 1 + para.naming.weight / 100
|
||||||
set font.OS_2.fsSelection : object
|
set font.OS_2.fsSelection : object
|
||||||
oblique : not : not isOblique
|
oblique : not : not isOblique
|
||||||
|
@ -106,8 +105,14 @@ export : define [assignFontNames para metrics font] : begin
|
||||||
regular : not : not ([not isBold] && [not isItalic] && [not isOblique])
|
regular : not : not ([not isBold] && [not isItalic] && [not isOblique])
|
||||||
useTypoMetrics true
|
useTypoMetrics true
|
||||||
set font.OS_2.sFamilyClass : 8 * 0x100 + 9
|
set font.OS_2.sFamilyClass : 8 * 0x100 + 9
|
||||||
set font.post.isFixedPitch true
|
|
||||||
set font.OS_2.xAvgCharWidth para.width
|
set font.OS_2.xAvgCharWidth para.width
|
||||||
set font.head.macStyle : object
|
set font.head.macStyle : object
|
||||||
bold : not : not isBold
|
bold : not : not isBold
|
||||||
italic : not : not (isItalic || isOblique)
|
italic : not : not (isItalic || isOblique)
|
||||||
|
|
||||||
|
if (para.diversityW == 1 && para.diversityM == 1 && para.diversityF == 1 && para.diversityI == 1) : begin
|
||||||
|
set font.OS_2.panose.3 9 # Monospaced
|
||||||
|
set font.post.isFixedPitch true
|
||||||
|
: else : begin
|
||||||
|
set font.OS_2.panose.3 0
|
||||||
|
set font.post.isFixedPitch false
|
|
@ -81,6 +81,12 @@ fullwidth_codes = []
|
||||||
# Comment the line below to enable CJKV glyph generation
|
# Comment the line below to enable CJKV glyph generation
|
||||||
noCJKV = true
|
noCJKV = true
|
||||||
|
|
||||||
|
# Diversity widths
|
||||||
|
diversityM = 1
|
||||||
|
diversityW = 1
|
||||||
|
diversityF = 1
|
||||||
|
diversityI = 1
|
||||||
|
|
||||||
[verbose]
|
[verbose]
|
||||||
verbose = true
|
verbose = true
|
||||||
|
|
||||||
|
@ -248,6 +254,14 @@ sb = 0.9
|
||||||
[compressed]
|
[compressed]
|
||||||
inherits = ['wd-compressed']
|
inherits = ['wd-compressed']
|
||||||
|
|
||||||
|
# EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
|
||||||
|
# Diversity: Having more width variations
|
||||||
|
[shape-straight-bar]
|
||||||
|
straightBar = 1
|
||||||
|
[diversity-1]
|
||||||
|
diversityM = 1.25
|
||||||
|
diversityW = 1.25
|
||||||
|
|
||||||
###### Full-width codes
|
###### Full-width codes
|
||||||
[xx-type]
|
[xx-type]
|
||||||
spacing = 2
|
spacing = 2
|
||||||
|
|
|
@ -414,6 +414,7 @@ phony(`release`).def(async target => {
|
||||||
////// Script Building //////
|
////// Script Building //////
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
const MARCOS = [`file-updated:meta/macros.ptl`];
|
||||||
oracle("{ptl|js}-scripts-under:***").def((target, $ext, $1) =>
|
oracle("{ptl|js}-scripts-under:***").def((target, $ext, $1) =>
|
||||||
FileList({ under: $1, pattern: `**/*.${$ext}` })(target)
|
FileList({ under: $1, pattern: `**/*.${$ext}` })(target)
|
||||||
);
|
);
|
||||||
|
@ -435,6 +436,9 @@ file(`{gen|glyphs|support|meta}/**/*.js`).def(async target => {
|
||||||
const [jsFromPtl] = await target.need("scripts:js-from-ptl");
|
const [jsFromPtl] = await target.need("scripts:js-from-ptl");
|
||||||
if (jsFromPtl.indexOf(target.path.full) >= 0) {
|
if (jsFromPtl.indexOf(target.path.full) >= 0) {
|
||||||
const ptl = target.path.full.replace(/\.js$/g, ".ptl");
|
const ptl = target.path.full.replace(/\.js$/g, ".ptl");
|
||||||
|
if (/^glyphs\//.test(target.path.full)) {
|
||||||
|
await target.need(MARCOS);
|
||||||
|
}
|
||||||
await target.need(`file-updated:${ptl}`);
|
await target.need(`file-updated:${ptl}`);
|
||||||
await run(PATEL_C, "--strict", ptl, "-o", target.path.full);
|
await run(PATEL_C, "--strict", ptl, "-o", target.path.full);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue