Fix #43
This commit is contained in:
parent
bc8c09465e
commit
f53d1586f4
4 changed files with 70 additions and 55 deletions
|
@ -375,11 +375,14 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
|
||||||
set font.hhea.ascent asc
|
set font.hhea.ascent asc
|
||||||
set font.'OS/2'.usWinAscent asc
|
set font.'OS/2'.usWinAscent asc
|
||||||
set font.'OS/2'.sTypoAscender asc
|
set font.'OS/2'.sTypoAscender asc
|
||||||
set font.hhea.descent desc
|
|
||||||
|
set font.hhea.descent DESCENDER
|
||||||
set font.'OS/2'.usWinDescent [Math.abs desc]
|
set font.'OS/2'.usWinDescent [Math.abs desc]
|
||||||
set font.'OS/2'.sTypoDescender desc
|
set font.'OS/2'.sTypoDescender DESCENDER
|
||||||
set font.hhea.lineGap para.linegap
|
|
||||||
set font.'OS/2'.sTypoLineGap para.linegap
|
set font.hhea.lineGap (para.leading - asc + DESCENDER)
|
||||||
|
set font.'OS/2'.sTypoLineGap (para.leading - asc + DESCENDER)
|
||||||
|
|
||||||
set font.'OS/2'.sxHeight XH
|
set font.'OS/2'.sxHeight XH
|
||||||
set font.'OS/2'.sCapHeight CAP
|
set font.'OS/2'.sCapHeight CAP
|
||||||
set font.post.italicAngle (0 - para.slantAngle)
|
set font.post.italicAngle (0 - para.slantAngle)
|
||||||
|
|
|
@ -223,13 +223,13 @@ symbol-block 'Block Shapes'
|
||||||
create-glyph 'fullblock' : glyph-construction
|
create-glyph 'fullblock' : glyph-construction
|
||||||
set-width FULLWIDTH
|
set-width FULLWIDTH
|
||||||
assign-unicode 0x2588
|
assign-unicode 0x2588
|
||||||
start-from 0 font.hhea.ascent
|
start-from 0 font.'OS/2'.usWinAscent
|
||||||
line-to FULLWIDTH font.hhea.ascent
|
line-to FULLWIDTH font.'OS/2'.usWinAscent
|
||||||
line-to FULLWIDTH font.hhea.descent
|
line-to FULLWIDTH (-font.'OS/2'.usWinDescent)
|
||||||
line-to 0 font.hhea.descent
|
line-to 0 (-font.'OS/2'.usWinDescent)
|
||||||
define [Shade fn] : glyph-construction
|
define [Shade fn] : glyph-construction
|
||||||
local top font.hhea.ascent
|
local top font.'OS/2'.usWinAscent
|
||||||
local bottom font.hhea.descent
|
local bottom (-font.'OS/2'.usWinDescent)
|
||||||
local segx 6
|
local segx 6
|
||||||
local segy 16
|
local segy 16
|
||||||
local g : create-glyph : glyph-construction : foreach j [range 0 segx] : foreach k [range 0 segy] : if [fn j k] : begin
|
local g : create-glyph : glyph-construction : foreach j [range 0 segx] : foreach k [range 0 segy] : if [fn j k] : begin
|
||||||
|
@ -257,31 +257,31 @@ symbol-block 'Block Shapes'
|
||||||
create-glyph ('vfill' + fill) : glyph-construction
|
create-glyph ('vfill' + fill) : glyph-construction
|
||||||
set-width FULLWIDTH
|
set-width FULLWIDTH
|
||||||
assign-unicode (0x2580 + fill)
|
assign-unicode (0x2580 + fill)
|
||||||
start-from 0 [mix font.hhea.descent font.hhea.ascent (fill / 8)]
|
start-from 0 [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent (fill / 8)]
|
||||||
line-to FULLWIDTH [mix font.hhea.descent font.hhea.ascent (fill / 8)]
|
line-to FULLWIDTH [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent (fill / 8)]
|
||||||
line-to FULLWIDTH font.hhea.descent
|
line-to FULLWIDTH (-font.'OS/2'.usWinDescent)
|
||||||
line-to 0 font.hhea.descent
|
line-to 0 (-font.'OS/2'.usWinDescent)
|
||||||
create-glyph ('hfill' + fill) : glyph-construction
|
create-glyph ('hfill' + fill) : glyph-construction
|
||||||
set-width FULLWIDTH
|
set-width FULLWIDTH
|
||||||
assign-unicode (0x2590 - fill)
|
assign-unicode (0x2590 - fill)
|
||||||
start-from 0 font.hhea.ascent
|
start-from 0 font.'OS/2'.usWinAscent
|
||||||
line-to (FULLWIDTH * fill / 8) font.hhea.ascent
|
line-to (FULLWIDTH * fill / 8) font.'OS/2'.usWinAscent
|
||||||
line-to (FULLWIDTH * fill / 8) font.hhea.descent
|
line-to (FULLWIDTH * fill / 8) (-font.'OS/2'.usWinDescent)
|
||||||
line-to 0 font.hhea.descent
|
line-to 0 (-font.'OS/2'.usWinDescent)
|
||||||
create-glyph 'upHalfblock' : glyph-construction
|
create-glyph 'upHalfblock' : glyph-construction
|
||||||
set-width FULLWIDTH
|
set-width FULLWIDTH
|
||||||
assign-unicode 0x2580
|
assign-unicode 0x2580
|
||||||
start-from 0 font.hhea.ascent
|
start-from 0 font.'OS/2'.usWinAscent
|
||||||
line-to FULLWIDTH font.hhea.ascent
|
line-to FULLWIDTH font.'OS/2'.usWinAscent
|
||||||
line-to FULLWIDTH [mix font.hhea.descent font.hhea.ascent 0.5]
|
line-to FULLWIDTH [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent 0.5]
|
||||||
line-to 0 [mix font.hhea.descent font.hhea.ascent 0.5]
|
line-to 0 [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent 0.5]
|
||||||
create-glyph 'rightHalfBlock' : glyph-construction
|
create-glyph 'rightHalfBlock' : glyph-construction
|
||||||
set-width FULLWIDTH
|
set-width FULLWIDTH
|
||||||
assign-unicode 0x2590
|
assign-unicode 0x2590
|
||||||
start-from (FULLWIDTH * 0.5) font.hhea.ascent
|
start-from (FULLWIDTH * 0.5) font.'OS/2'.usWinAscent
|
||||||
line-to FULLWIDTH font.hhea.ascent
|
line-to FULLWIDTH font.'OS/2'.usWinAscent
|
||||||
line-to FULLWIDTH font.hhea.descent
|
line-to FULLWIDTH (-font.'OS/2'.usWinDescent)
|
||||||
line-to (FULLWIDTH * 0.5) font.hhea.descent
|
line-to (FULLWIDTH * 0.5) (-font.'OS/2'.usWinDescent)
|
||||||
|
|
||||||
### Box drawing glyphs
|
### Box drawing glyphs
|
||||||
symbol-block 'Box-Drawing'
|
symbol-block 'Box-Drawing'
|
||||||
|
@ -289,7 +289,7 @@ symbol-block 'Box-Drawing'
|
||||||
local heavy : Math.max (light * 2) (WIDTH * 0.15)
|
local heavy : Math.max (light * 2) (WIDTH * 0.15)
|
||||||
local width FULLWIDTH
|
local width FULLWIDTH
|
||||||
local midx : FULLWIDTH / 2
|
local midx : FULLWIDTH / 2
|
||||||
local midy : mix font.hhea.descent font.hhea.ascent 0.5
|
local midy : mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent 0.5
|
||||||
define [boxdraw unicode u d l r] : create-glyph ('bd' + [unicode.toString 16 :.toUpperCase]) : glyph-construction
|
define [boxdraw unicode u d l r] : create-glyph ('bd' + [unicode.toString 16 :.toUpperCase]) : glyph-construction
|
||||||
assign-unicode unicode
|
assign-unicode unicode
|
||||||
set-width width
|
set-width width
|
||||||
|
@ -297,8 +297,8 @@ symbol-block 'Box-Drawing'
|
||||||
local stopV : [Math.max l r] / 2
|
local stopV : [Math.max l r] / 2
|
||||||
if l : include : HBar 0 (midx + stopH) midy l
|
if l : include : HBar 0 (midx + stopH) midy l
|
||||||
if r : include : HBar (midx - stopH) width midy r
|
if r : include : HBar (midx - stopH) width midy r
|
||||||
if d : include : VBar midx font.hhea.descent (midy + stopV) d
|
if d : include : VBar midx (-font.'OS/2'.usWinDescent) (midy + stopV) d
|
||||||
if u : include : VBar midx (midy - stopV) font.hhea.ascent u
|
if u : include : VBar midx (midy - stopV) font.'OS/2'.usWinAscent u
|
||||||
define [dlboxdraw unicode u d l r] : create-glyph ('bd' + [unicode.toString 16 :.toUpperCase]) : glyph-construction
|
define [dlboxdraw unicode u d l r] : create-glyph ('bd' + [unicode.toString 16 :.toUpperCase]) : glyph-construction
|
||||||
assign-unicode unicode
|
assign-unicode unicode
|
||||||
set-width width
|
set-width width
|
||||||
|
@ -313,11 +313,11 @@ symbol-block 'Box-Drawing'
|
||||||
include : HBar (midx + stopH) width (midy + (r - light)) light
|
include : HBar (midx + stopH) width (midy + (r - light)) light
|
||||||
if (r > light) : include : HBar (midx + stopH) width (midy - (r - light)) light
|
if (r > light) : include : HBar (midx + stopH) width (midy - (r - light)) light
|
||||||
if d : begin
|
if d : begin
|
||||||
include : VBar (midx + (d - light)) font.hhea.descent (midy - stopV) light
|
include : VBar (midx + (d - light)) (-font.'OS/2'.usWinDescent) (midy - stopV) light
|
||||||
if (d > light) : include : VBar (midx - (d - light)) font.hhea.descent (midy - stopV) light
|
if (d > light) : include : VBar (midx - (d - light)) (-font.'OS/2'.usWinDescent) (midy - stopV) light
|
||||||
if u : begin
|
if u : begin
|
||||||
include : VBar (midx + (u - light)) (midy + stopV) font.hhea.ascent light
|
include : VBar (midx + (u - light)) (midy + stopV) font.'OS/2'.usWinAscent light
|
||||||
if (u > light) : include : VBar (midx - (u - light)) (midy + stopV) font.hhea.ascent light
|
if (u > light) : include : VBar (midx - (u - light)) (midy + stopV) font.'OS/2'.usWinAscent light
|
||||||
if (stopH > 0 && [not u]) : include : HBar (midx - stopH - light * HVCONTRAST) (midx + stopH + light * HVCONTRAST) (midy + capV) light
|
if (stopH > 0 && [not u]) : include : HBar (midx - stopH - light * HVCONTRAST) (midx + stopH + light * HVCONTRAST) (midy + capV) light
|
||||||
if (stopH > 0 && [not d]) : include : HBar (midx - stopH - light * HVCONTRAST) (midx + stopH + light * HVCONTRAST) (midy - capV) light
|
if (stopH > 0 && [not d]) : include : HBar (midx - stopH - light * HVCONTRAST) (midx + stopH + light * HVCONTRAST) (midy - capV) light
|
||||||
if (stopV > 0 && [not l]) : include : VBar (midx - capH) (midy - stopV - light) (midy + stopV + light) light
|
if (stopV > 0 && [not l]) : include : VBar (midx - capH) (midy - stopV - light) (midy + stopV + light) light
|
||||||
|
@ -404,7 +404,7 @@ symbol-block 'Box-Drawing'
|
||||||
define [vDashed unicode segments weight] : create-glyph ('bd' + [unicode.toString 16 :.toUpperCase]) : glyph-construction
|
define [vDashed unicode segments weight] : create-glyph ('bd' + [unicode.toString 16 :.toUpperCase]) : glyph-construction
|
||||||
assign-unicode unicode
|
assign-unicode unicode
|
||||||
set-width width
|
set-width width
|
||||||
foreach j [range 0 segments] : include : VBar midx [mix [mix font.hhea.descent font.hhea.ascent (j / segments)] [mix font.hhea.descent font.hhea.ascent ((j + 1) / segments)] 0.2] [mix [mix font.hhea.descent font.hhea.ascent (j / segments)] [mix font.hhea.descent font.hhea.ascent ((j + 1) / segments)] 0.8] weight
|
foreach j [range 0 segments] : include : VBar midx [mix [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent (j / segments)] [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent ((j + 1) / segments)] 0.2] [mix [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent (j / segments)] [mix (-font.'OS/2'.usWinDescent) font.'OS/2'.usWinAscent ((j + 1) / segments)] 0.8] weight
|
||||||
hDashed 0x2504 3 light
|
hDashed 0x2504 3 light
|
||||||
hDashed 0x2505 3 heavy
|
hDashed 0x2505 3 heavy
|
||||||
hDashed 0x2508 4 light
|
hDashed 0x2508 4 light
|
||||||
|
@ -424,7 +424,7 @@ symbol-block 'Box-Drawing'
|
||||||
set-width width
|
set-width width
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center light
|
widths.center light
|
||||||
g4.up.start midx font.hhea.descent [heading UPWARD]
|
g4.up.start midx (-font.'OS/2'.usWinDescent) [heading UPWARD]
|
||||||
arcvh
|
arcvh
|
||||||
g4.right.end width midy [heading RIGHTWARD]
|
g4.right.end width midy [heading RIGHTWARD]
|
||||||
create-glyph 'bd256E' : glyph-construction
|
create-glyph 'bd256E' : glyph-construction
|
||||||
|
@ -432,7 +432,7 @@ symbol-block 'Box-Drawing'
|
||||||
set-width width
|
set-width width
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center light
|
widths.center light
|
||||||
g4.up.start midx font.hhea.descent [heading UPWARD]
|
g4.up.start midx (-font.'OS/2'.usWinDescent) [heading UPWARD]
|
||||||
arcvh
|
arcvh
|
||||||
g4.left.end 0 midy [heading LEFTWARD]
|
g4.left.end 0 midy [heading LEFTWARD]
|
||||||
create-glyph 'bd256F' : glyph-construction
|
create-glyph 'bd256F' : glyph-construction
|
||||||
|
@ -440,7 +440,7 @@ symbol-block 'Box-Drawing'
|
||||||
set-width width
|
set-width width
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center light
|
widths.center light
|
||||||
g4.down.start midx font.hhea.ascent [heading DOWNWARD]
|
g4.down.start midx font.'OS/2'.usWinAscent [heading DOWNWARD]
|
||||||
arcvh
|
arcvh
|
||||||
g4.left.end 0 midy [heading LEFTWARD]
|
g4.left.end 0 midy [heading LEFTWARD]
|
||||||
create-glyph 'bd2570' : glyph-construction
|
create-glyph 'bd2570' : glyph-construction
|
||||||
|
@ -448,7 +448,7 @@ symbol-block 'Box-Drawing'
|
||||||
set-width width
|
set-width width
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center light
|
widths.center light
|
||||||
g4.down.start midx font.hhea.ascent [heading DOWNWARD]
|
g4.down.start midx font.'OS/2'.usWinAscent [heading DOWNWARD]
|
||||||
arcvh
|
arcvh
|
||||||
g4.right.end width midy [heading RIGHTWARD]
|
g4.right.end width midy [heading RIGHTWARD]
|
||||||
create-glyph 'bd2571' : glyph-construction
|
create-glyph 'bd2571' : glyph-construction
|
||||||
|
@ -456,15 +456,15 @@ symbol-block 'Box-Drawing'
|
||||||
set-width width
|
set-width width
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center light
|
widths.center light
|
||||||
flat width font.hhea.ascent
|
flat width font.'OS/2'.usWinAscent
|
||||||
curl 0 font.hhea.descent
|
curl 0 (-font.'OS/2'.usWinDescent)
|
||||||
create-glyph 'bd2572' : glyph-construction
|
create-glyph 'bd2572' : glyph-construction
|
||||||
assign-unicode 0x2572
|
assign-unicode 0x2572
|
||||||
set-width width
|
set-width width
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.center light
|
widths.center light
|
||||||
flat 0 font.hhea.ascent
|
flat 0 font.'OS/2'.usWinAscent
|
||||||
curl width font.hhea.descent
|
curl width (-font.'OS/2'.usWinDescent)
|
||||||
create-glyph 'bd2573' : glyph-construction
|
create-glyph 'bd2573' : glyph-construction
|
||||||
assign-unicode 0x2573
|
assign-unicode 0x2573
|
||||||
set-width width
|
set-width width
|
||||||
|
@ -489,33 +489,33 @@ symbol-block 'Powerline'
|
||||||
|
|
||||||
create-glyph 'pwlTriangleRight' : glyph-construction
|
create-glyph 'pwlTriangleRight' : glyph-construction
|
||||||
assign-unicode 0xE0B0
|
assign-unicode 0xE0B0
|
||||||
start-from O font.hhea.ascent
|
start-from O font.'OS/2'.usWinAscent
|
||||||
line-to 0 font.hhea.ascent
|
line-to 0 font.'OS/2'.usWinAscent
|
||||||
line-to WIDTH [mix font.hhea.ascent font.hhea.descent 0.5]
|
line-to WIDTH [mix font.'OS/2'.usWinAscent (-font.'OS/2'.usWinDescent) 0.5]
|
||||||
line-to 0 font.hhea.descent
|
line-to 0 (-font.'OS/2'.usWinDescent)
|
||||||
line-to O font.hhea.descent
|
line-to O (-font.'OS/2'.usWinDescent)
|
||||||
|
|
||||||
create-glyph 'pwlAngleRight' : glyph-construction
|
create-glyph 'pwlAngleRight' : glyph-construction
|
||||||
assign-unicode 0xE0B1
|
assign-unicode 0xE0B1
|
||||||
local fine : adviceBlackness 4
|
local fine : adviceBlackness 4
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.rhs fine
|
widths.rhs fine
|
||||||
flat 0 font.hhea.ascent
|
flat 0 font.'OS/2'.usWinAscent
|
||||||
curl WIDTH [mix font.hhea.ascent font.hhea.descent 0.5]
|
curl WIDTH [mix font.'OS/2'.usWinAscent (-font.'OS/2'.usWinDescent) 0.5]
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.rhs fine
|
widths.rhs fine
|
||||||
flat WIDTH [mix font.hhea.ascent font.hhea.descent 0.5]
|
flat WIDTH [mix font.'OS/2'.usWinAscent (-font.'OS/2'.usWinDescent) 0.5]
|
||||||
curl 0 font.hhea.descent
|
curl 0 (-font.'OS/2'.usWinDescent)
|
||||||
|
|
||||||
create-glyph 'pwlTriangleLeft' : glyph-construction
|
create-glyph 'pwlTriangleLeft' : glyph-construction
|
||||||
assign-unicode 0xE0B2
|
assign-unicode 0xE0B2
|
||||||
include glyphs.pwlTriangleRight
|
include glyphs.pwlTriangleRight
|
||||||
include : FlipAround MIDDLE [mix font.hhea.ascent font.hhea.descent 0.5]
|
include : FlipAround MIDDLE [mix font.'OS/2'.usWinAscent (-font.'OS/2'.usWinDescent) 0.5]
|
||||||
|
|
||||||
create-glyph 'pwlAngleLeft' : glyph-construction
|
create-glyph 'pwlAngleLeft' : glyph-construction
|
||||||
assign-unicode 0xE0B3
|
assign-unicode 0xE0B3
|
||||||
include glyphs.pwlAngleRight
|
include glyphs.pwlAngleRight
|
||||||
include : FlipAround MIDDLE [mix font.hhea.ascent font.hhea.descent 0.5]
|
include : FlipAround MIDDLE [mix font.'OS/2'.usWinAscent (-font.'OS/2'.usWinDescent) 0.5]
|
||||||
|
|
||||||
create-glyph 'pwlLock' : glyph-construction
|
create-glyph 'pwlLock' : glyph-construction
|
||||||
assign-unicode 0xE0A2
|
assign-unicode 0xE0A2
|
||||||
|
|
|
@ -106,4 +106,16 @@ symbol-block 'Musical'
|
||||||
widths.rhs fine
|
widths.rhs fine
|
||||||
g4 (SB + noteSize) operTop
|
g4 (SB + noteSize) operTop
|
||||||
bezcontrols.absolute RIGHTSB y1 RIGHTSB y2
|
bezcontrols.absolute RIGHTSB y1 RIGHTSB y2
|
||||||
g4 x3 y3
|
g4 x3 y3
|
||||||
|
|
||||||
|
symbol-block 'Metric marks'
|
||||||
|
create-glyph 'metmark' : glyph-construction
|
||||||
|
assign-unicode 0xE09F
|
||||||
|
include : VBar MIDDLE (-font.'OS/2'.usWinDescent) (font.'OS/2'.usWinAscent) SHOULDERFINE
|
||||||
|
include : HBar MIDDLE WIDTH 0 SHOULDERFINE
|
||||||
|
include : HBar MIDDLE WIDTH CAP SHOULDERFINE
|
||||||
|
include : HBar MIDDLE WIDTH XH SHOULDERFINE
|
||||||
|
include : HBar MIDDLE WIDTH DESCENDER SHOULDERFINE
|
||||||
|
include : HBar 0 MIDDLE parenMid SHOULDERFINE
|
||||||
|
include : HBar 0 MIDDLE parenTop SHOULDERFINE
|
||||||
|
include : HBar 0 MIDDLE parenBot SHOULDERFINE
|
|
@ -6,7 +6,7 @@ copyright = 'Copyright (c) 2015 Belleve Invis.'
|
||||||
licence = '''This font software is licenced under the SIL Open Font Licence, Version 1.1. This is licence is avaliable with a FAQ at: http://scripts.sil.org/OFL. This font software is distributes on an 'AS IS' basis, without warranties or conditions of any kind, either express or implied. See the SIL Open Font licence fot the specific language, premissions and limitations governing your use of this font software.'''
|
licence = '''This font software is licenced under the SIL Open Font Licence, Version 1.1. This is licence is avaliable with a FAQ at: http://scripts.sil.org/OFL. This font software is distributes on an 'AS IS' basis, without warranties or conditions of any kind, either express or implied. See the SIL Open Font licence fot the specific language, premissions and limitations governing your use of this font software.'''
|
||||||
|
|
||||||
leading = 1250 # Line height times 1000.
|
leading = 1250 # Line height times 1000.
|
||||||
linegap = 0 # Additional line gap.
|
#linegap = 0 # Additional line gap.
|
||||||
width = 500 # Character width. Increase this if you think that Iosevka is too narrow.
|
width = 500 # Character width. Increase this if you think that Iosevka is too narrow.
|
||||||
cap = 735 # Cap height (as well as ascender).
|
cap = 735 # Cap height (as well as ascender).
|
||||||
xheight = 530 # X-height.
|
xheight = 530 # X-height.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue