Skip to content

Commit

Permalink
Add parameter parenSize, operSize, tackSize to control size of symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Sep 8, 2018
1 parent 88a45b8 commit 8707990
Show file tree
Hide file tree
Showing 14 changed files with 495 additions and 489 deletions.
8 changes: 4 additions & 4 deletions gen/buildglyphs.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -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 parenMid parenTop parenBot operTop operBot plusTop plusBot operMid logicTop logicBot] metrics
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

# Anchor parameters
define [object MARK BASE] Anchor
Expand All @@ -55,11 +55,11 @@ export as build : define [buildFont para recursive recursiveCodes] : begin

define markAboveLower {.anchors {.above [ta : new Anchor MIDDLE XH BASE]}}
define markAboveOper {.anchors {.above [ta : new Anchor MIDDLE operTop BASE]}}
define markAboveLogic {.anchors {.above [ta : new Anchor MIDDLE logicTop BASE]}}
define markAboveTack {.anchors {.above [ta : new Anchor MIDDLE tackTop 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 markBelowLogic {.anchors {.below [ta : new Anchor MIDDLE logicBot BASE]}}
define markBelowTack {.anchors {.below [ta : new Anchor MIDDLE tackBot 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]}}
Expand All @@ -85,7 +85,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
b : buildStandardMarkSet markAboveCap markBelowZero markToprightCap markBottomrightZero
e : buildStandardMarkSet markAboveLower markBelowZero markToprightLower markBottomrightZero
oper : buildStandardMarkSet markAboveOper markBelowOper markToprightLower markBottomrightZero
logic : buildStandardMarkSet markAboveLogic markBelowLogic markToprightLower markBottomrightZero
tack : buildStandardMarkSet markAboveTack markBelowTack markToprightLower markBottomrightZero
plus : buildStandardMarkSet markAbovePlus markBelowPlus markToprightLower markBottomrightZero
p : buildStandardMarkSet markAboveLower markBelowLower markToprightLower markBottomrightLower
if : buildStandardMarkSet markAboveCap markBelowLower markToprightCap markBottomrightLower
Expand Down
22 changes: 11 additions & 11 deletions glyphs/autobuilds.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export : define [apply] : begin
include : OShape top bot left right sw (SMALLSMOOTHA * width / WIDTH) (SMALLSMOOTHB * width / WIDTH)

apply-transform : Upright
apply-transform : Translate 0 (parenMid - CAP * dscale / 2)
apply-transform : Translate 0 (symbolMid - CAP * dscale / 2)
apply-transform : Italify

define [createInsetCircledGlyphs records] : if [not recursive] : begin
Expand All @@ -327,7 +327,7 @@ export : define [apply] : begin
circleInner dscale miniatureFont unicode parts width bal baly

apply-transform : Upright
apply-transform : Translate 0 (parenMid - CAP * dscale / 2)
apply-transform : Translate 0 (symbolMid - CAP * dscale / 2)
apply-transform : Italify

define [createDoubleCircledGlyphs records] : if [not recursive] : begin
Expand All @@ -350,7 +350,7 @@ export : define [apply] : begin
SMALLSMOOTHB * width / WIDTH

apply-transform : Upright
apply-transform : Translate 0 (parenMid - CAP * dscale / 2)
apply-transform : Translate 0 (symbolMid - CAP * dscale / 2)
apply-transform : Italify

define [bracedDottdeDimens width] : begin
Expand Down Expand Up @@ -400,30 +400,30 @@ export : define [apply] : begin
if bal : set shift : CAP / 2 - [mix baly gMiddleY bal]
: else : set shift : CAP / 2 - gMiddleY

apply-transform : Translate (width / 2) (parenMid * pscale - (CAP / 2 - shift) * dscale)
apply-transform : Translate (width / 2) (symbolMid * pscale - (CAP / 2 - shift) * dscale)
apply-transform : Italify
set currentGlyph.cmpPriority 11
refair this
set-width 0

sketch
local s : TANSLANT * parenMid
local s : TANSLANT * symbolMid
set-width width
include lg
include : dispiro
widths.lhs sw
g4 ([mix l r 0.15] - s) (parenTop * pscale)
g4.down.mid (l - s + O) (parenMid * pscale)
g4.down.mid (l - s + O) (symbolMid * pscale)
g4 ([mix l r 0.15] - s) (parenBot * pscale)

include : dispiro
widths.rhs sw
g4 ([mix r l 0.15] + s) (parenTop * pscale)
g4.down.mid (r + s - O) (parenMid * pscale)
g4.down.mid (r + s - O) (symbolMid * pscale)
g4 ([mix r l 0.15] + s) (parenBot * pscale)

include : Upright
include : Translate 0 (parenMid - parenMid * pscale)
include : Translate 0 (symbolMid - symbolMid * pscale)
include : Italify

save gn unicode
Expand Down Expand Up @@ -543,7 +543,7 @@ export : define [apply] : begin
apply-transform : Upright
apply-transform : Translate (- miniatureFont.(numid).advanceWidth / 2) 0
apply-transform : Scale (CAP / [fallback height CAP] * scaleFactor)
apply-transform : Translate MIDDLE (parenMid + dist / 2)
apply-transform : Translate MIDDLE (symbolMid + dist / 2)
apply-transform : Italify
refair this

Expand All @@ -553,7 +553,7 @@ export : define [apply] : begin
apply-transform : Upright
apply-transform : Translate (- miniatureFont.(denid).advanceWidth / 2) 0
apply-transform : Scale (CAP / [fallback height CAP] * scaleFactor)
apply-transform : Translate MIDDLE (parenMid - CAP * scaleFactor - dist / 2)
apply-transform : Translate MIDDLE (symbolMid - CAP * scaleFactor - dist / 2)
apply-transform : Italify
refair this

Expand All @@ -562,7 +562,7 @@ export : define [apply] : begin
save-glyph [suggestName : numid + 'over' + denid] unicode : glyph-construction
include glyphs.(numid + ".numpart")
include glyphs.(denid + ".denpart")
include : HBar SB RIGHTSB parenMid (fine * 0.75)
include : HBar SB RIGHTSB symbolMid (fine * 0.75)

createSMCPs : list
list 0x1D00 'A'
Expand Down
2 changes: 1 addition & 1 deletion glyphs/overmarks.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export : define [apply] : begin
leftEnd -- [mix 0 SB (1/3)]
rightEnd -- [mix WIDTH RIGHTSB (1/3)]
hs -- ([adviceBlackness 4.5] / 2)
include : Realign MIDDLE [mix t b (1/2)] MIDDLE parenMid
include : Realign MIDDLE [mix t b (1/2)] MIDDLE symbolMid
save 'overlaytilde'

sketch
Expand Down
4 changes: 2 additions & 2 deletions glyphs/symbol-braille.ptl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export : define [apply] : begin
if recursive : return nothing
local left : MIDDLE - (0.25 * WIDTH)
local right : MIDDLE + (0.25 * WIDTH)
local offsetY : 0.25 * (parenMid - parenTop)
local offsetY : 0.3 * (symbolMid - operBot)
local stress : 0.5 * [adviceBlackness 3.375]
local dotRadius : PERIODRADIUS * [Math.min 1 (stress / HALFSTROKE)]

Expand All @@ -32,7 +32,7 @@ export : define [apply] : begin
###
foreach [byte : range 1 256] : sketch
local dots {}
local [y-coord y] (parenMid + y * offsetY)
local [y-coord y] (symbolMid + y * offsetY)
# Is there a way to directly use (byte & (1 << bit)) here?
foreach [bit : range 0 8] : if [maskBit byte bit] : begin
include : match bit
Expand Down
Loading

0 comments on commit 8707990

Please sign in to comment.