Minor touches.

This commit is contained in:
be5invis 2015-12-16 10:11:28 +08:00
parent 4719c2837b
commit f31a7fb240
10 changed files with 41 additions and 202 deletions

View File

@ -222,7 +222,7 @@ export as build : define [buildFont para recursive recursiveCodes] : begin
define CORRECTION_VX globalTransform.yx
define CORRECTION_VS : STROKE * globalTransform.yx
define CORRECTION_OMIDX : globalTransform.yx * 1.3
define CORRECTION_OMIDX : globalTransform.yx * [linreg 18 1.3 120 1 STROKE]
define CORRECTION_OMIDS : STROKE * CORRECTION_OMIDX
# Blackness parameters

View File

@ -93,7 +93,7 @@ if(argv.feature) {
};*/
if(argv.svg) {
function cov(x){ return x.toFixed(4) }
function cov(x){ return Math.round(x * 10000) / 10000 }
function toSVGPath(glyph){
var buf = '';
if(glyph.contours) for(var j = 0; j < glyph.contours.length; j++) {

View File

@ -226,7 +226,7 @@ define [suggestName name] : begin
define [createCircledGlyphs records] : if [not recursive] : begin
local dscale 0.55
local pendingGlyphs : records.map : [record] -> record.1
local miniatureFont : Miniature pendingGlyphs [fallback para.smallCrowd 3.5] 0.65
local miniatureFont : Miniature pendingGlyphs [fallback para.smallCrowd 3.75] 0.65
foreach {unicode glyphid w} [items-of records] : create-glyph [suggestName : 'circle' + glyphid] : glyph-construction
local width : fallback w WIDTH

View File

@ -380,15 +380,17 @@ define [mShoulderSpiro left right top bottom width fine] : glyph-construction
close
define [HBar xleft xright y _fine] : glyph-construction
local fine : [fallback _fine STROKE] / 2
include : dispiro
widths.center (fine * 2)
widths.center [fallback _fine STROKE]
flat xleft y [heading RIGHTWARD]
curl xright y [heading RIGHTWARD]
define [HBarTop xl xr y _fine] : HBar xl xr (y - [fallback _fine STROKE] * 0.5) _fine
define [HBarBottom xl xr y _fine] : HBar xl xr (y + [fallback _fine STROKE] * 0.5) _fine
define [HOverlayBar xleft xright y s] : HBar xleft xright y [fallback s OVERLAYSTROKE]
define [HOverlayBar xleft xright y s] : dispiro
widths.center [fallback s OVERLAYSTROKE]
flat xleft y
curl xright y
define [VBar x ydown yup _fine] : glyph-construction
local fine : fallback _fine STROKE
include : dispiro

View File

@ -9,17 +9,9 @@ symbol-block 'I'
include : VBar MIDDLE 0 CAP
define [ISerifShape top] : glyph-construction
include : dispiro
widths.rhs
flat (MIDDLE - WIDTH * 0.26 - STROKE * globalTransform.yx) top
curl (MIDDLE + WIDTH * 0.26 - STROKE * globalTransform.yx) top
# Bar
include : VBar MIDDLE 0 top
# Bottom serif
include : dispiro
widths.lhs
flat (MIDDLE - WIDTH * 0.26 + STROKE * globalTransform.yx) 0
curl (MIDDLE + WIDTH * 0.26 + STROKE * globalTransform.yx) 0
include : CenterBottomSerif MIDDLE 0 (LONGJUT * 0.8)
include : CenterTopSerif MIDDLE top (LONGJUT * 0.8)
create-glyph 'I.serifed' : glyph-construction
include capitalMarks
@ -483,8 +475,6 @@ define VShape : symbol-block 'V, v and nu'
curl RIGHTSB (XH * 0.9) [heading DOWNWARD]
quadcontrols 0 0.3 6
g4 xmid 0
if SLAB : begin
include : LeftwardTopSerif SB XH SIDEJUT
* VShape
@ -1709,13 +1699,13 @@ symbol-block 'O'
create-glyph 'Obar' : glyph-construction
assign-unicode 0x19F
include glyphs.O AS_BASE
include : HOverlayBar (SB + OX + 1) (RIGHTSB - OX - 1) (CAP * 0.5)
include : HBar (SB + OX + 1) (RIGHTSB - OX - 1) (CAP * 0.5) OVERLAYSTROKE
alias 'cyrOe' 0x4E8 'Obar'
create-glyph 'obar' : glyph-construction
assign-unicode 0x275
include glyphs.o AS_BASE
include : HOverlayBar (SB + OX + 1) (RIGHTSB - OX - 1) (XH * 0.5)
include : HBar (SB + OX + 1) (RIGHTSB - OX - 1) (XH * 0.5) OVERLAYSTROKE
alias 'cyroe' 0x4E9 'obar'
create-glyph 'bulleye' : glyph-construction
@ -2674,7 +2664,7 @@ symbol-block 'S'
set-width WIDTH
assign-unicode 's'
include eMarks
define smooth : adviceSSmooth XH (-1 - globalTransform.yx * (8.5 - (WIDTH / 500) * 5.5))
define smooth : adviceSSmooth XH (-1 - globalTransform.yx * (8.5 - (WIDTH / 500) * 5.5) * [clamp 0 1 : linreg 120 1 130 0.5 STROKE])
include : dispiro
widths.lhs
g4 RIGHTSB (XH - SHOOK)

View File

@ -355,10 +355,10 @@ define {PiShape} : symbol-block 'Pi'
include : VBarRight (RIGHTSB - shrink) bottom (top - fine / 2) fine
if SLAB : begin
include : CenterBottomSerif (SB + shrink + fine * 0.5 * CORRECTION_HX) bottom JUT
include : CenterBottomSerif (RIGHTSB - shrink - fine * 0.5 * CORRECTION_HX) bottom JUT
include : CenterTopSerif (SB + shrink + fine * 0.5 * CORRECTION_HX) top JUT
include : CenterTopSerif (RIGHTSB - shrink - fine * 0.5 * CORRECTION_HX) top JUT
include : CenterBottomSerif (SB + shrink + fine * 0.5 * CORRECTION_HX) bottom JUT fine
include : CenterBottomSerif (RIGHTSB - shrink - fine * 0.5 * CORRECTION_HX) bottom JUT fine
include : CenterTopSerif (SB + shrink + fine * 0.5 * CORRECTION_HX) top JUT fine
include : CenterTopSerif (RIGHTSB - shrink - fine * 0.5 * CORRECTION_HX) top JUT fine
create-glyph 'Pi' : glyph-construction
assign-unicode 0x3A0

View File

@ -286,7 +286,7 @@ symbol-block 'Block Shapes'
### Box drawing glyphs
symbol-block 'Box-Drawing'
local light : adviceBlackness 3.5
local heavy : light * 2
local heavy : Math.max (light * 2) (WIDTH * 0.15)
local width FULLWIDTH
local midx : FULLWIDTH / 2
local midy : mix font.hhea.descent font.hhea.ascent 0.5
@ -302,10 +302,10 @@ symbol-block 'Box-Drawing'
define [dlboxdraw unicode u d l r] : create-glyph ('bd' + [unicode.toString 16 :.toUpperCase]) : glyph-construction
assign-unicode unicode
set-width width
local stopH : ([Math.max u d] - light) / 2
local stopV : ([Math.max l r] - light) / 2
local capH : stopH * heavy / (heavy - light)
local capV : stopV * heavy / (heavy - light)
local stopH : [Math.max u d] - light * 1 - light * 0.5 * CORRECTION_HX
local stopV : [Math.max l r] - light * 1.5
local capH : [Math.max u d] - light * 1
local capV : [Math.max l r] - light * 1
if l : begin
include : HBar 0 (midx - stopH) (midy + (l - light)) light
if (l > light) : include : HBar 0 (midx - stopH) (midy - (l - light)) light
@ -318,8 +318,8 @@ symbol-block 'Box-Drawing'
if u : begin
include : VBar (midx + (u - light)) (midy + stopV) font.hhea.ascent light
if (u > light) : include : VBar (midx - (u - light)) (midy + stopV) font.hhea.ascent light
if (stopH > 0 && [not u]) : include : HBar (midx - stopH - light) (midx + stopH + light) (midy + capV) light
if (stopH > 0 && [not d]) : include : HBar (midx - stopH - light) (midx + stopH + light) (midy - capV) light
if (stopH > 0 && [not u]) : include : HBar (midx - stopH - light * CORRECTION_HX) (midx + stopH + light * CORRECTION_HX) (midy + capV) light
if (stopH > 0 && [not d]) : include : HBar (midx - stopH - light * CORRECTION_HX) (midx + stopH + light * CORRECTION_HX) (midy - capV) light
if (stopV > 0 && [not l]) : include : VBar (midx - capH) (midy - stopV - light) (midy + stopV + light) light
if (stopV > 0 && [not r]) : include : VBar (midx + capH) (midy - stopV - light) (midy + stopV + light) light
define [complexBoxDraw unicodeStart U D L R fn dl] : begin

View File

@ -27,8 +27,8 @@ symbol-block 'Currency'
create-glyph 'euro' : glyph-construction
assign-unicode 0x20AC
include glyphs.C
include : HBar (SB - HALFSTROKE) [mix SB RIGHTSB 0.7] (CAP * 0.4) OVERLAYSTROKE
include : HBar (SB - HALFSTROKE) [mix SB RIGHTSB 0.7] (CAP * 0.6) OVERLAYSTROKE
include : HOverlayBar (SB - HALFSTROKE) [mix SB RIGHTSB 0.7] (CAP * 0.4)
include : HOverlayBar (SB - HALFSTROKE) [mix SB RIGHTSB 0.7] (CAP * 0.6)
create-glyph 'cent' : glyph-construction
assign-unicode 0xA2
@ -45,8 +45,8 @@ symbol-block 'Currency'
create-glyph 'yen' : glyph-construction
assign-unicode 0xA5
include glyphs.Y AS_BASE
include : HBar SB RIGHTSB (CAP * 0.45) OVERLAYSTROKE
include : HBar SB RIGHTSB (CAP * 0.25) OVERLAYSTROKE
include : HOverlayBar SB RIGHTSB (CAP * 0.45)
include : HOverlayBar SB RIGHTSB (CAP * 0.25)
create-glyph 'sterlingbase' : glyph-construction
@ -62,13 +62,13 @@ symbol-block 'Currency'
assign-unicode 0xA3
set-width WIDTH
include glyphs.sterlingbase
include : HBar [mix SB RIGHTSB 0.05] [mix SB RIGHTSB 0.7] (CAP * 0.53)
include : HOverlayBar [mix SB RIGHTSB 0.05] [mix SB RIGHTSB 0.7] (CAP * 0.53)
create-glyph 'liraSymbol' : glyph-construction
assign-unicode 0x20A4
set-width WIDTH
include glyphs.sterlingbase
include : HBar [mix SB RIGHTSB 0.05] [mix SB RIGHTSB 0.7] (CAP * 0.4) OVERLAYSTROKE
include : HBar [mix SB RIGHTSB 0.05] [mix SB RIGHTSB 0.7] (CAP * 0.63) OVERLAYSTROKE
include : HOverlayBar [mix SB RIGHTSB 0.05] [mix SB RIGHTSB 0.7] (CAP * 0.4)
include : HOverlayBar [mix SB RIGHTSB 0.05] [mix SB RIGHTSB 0.7] (CAP * 0.63)
create-glyph 'frenchFranc' : glyph-construction
assign-unicode 0x20A3

View File

@ -46,7 +46,7 @@ rhook = 90
hookx = 170
smooth = 195
smallsmooth = 215
smallsmooth = 220
smoothadjust = 120
tbalance = 50
@ -94,7 +94,7 @@ weight = 200
style = 'Extralight'
stroke = 36
sb = 72
sb = 73
dotsize = 70
periodsize = 77
@ -105,10 +105,10 @@ cthinb = 0.75
weight = 300
style = 'Light'
stroke = 58
sb = 63
dotsize = 95
periodsize = 103
stroke = 56
sb = 66
dotsize = 100
periodsize = 115
[w-book]
isBold = false
@ -125,14 +125,14 @@ weith = 500
style = 'Medium'
sb = 50
stroke = 83
stroke = 90
dotsize = 140
periodsize = 145
essx = 1.07
rbalance = 58
rbalance2 = 19
smooth = 200
rbalance = 55
rbalance2 = 20
smooth = 203
[w-bold]
isBold = true
@ -176,9 +176,6 @@ rbalance2 = 25
rhook = 95
smooth = 215
smallCrowd = 4
smallCrowd2 = 4.25
# Slants
[s-upright]
isItalic = false

View File

@ -6,156 +6,6 @@
html {
font-size: 14px;
}
@font-face {
font-family: IosevkaWEB;
font-weight: 100;
src: url('assets/iosevka-thin.woff') format('woff'), url('assets/iosevka-thin.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 100;
font-style: italic;
src: url('assets/iosevka-thinitalic.woff') format('woff'), url('assets/iosevka-thinitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 200;
src: url('assets/iosevka-extralight.woff') format('woff'), url('assets/iosevka-extralight.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 200;
font-style: italic;
src: url('assets/iosevka-extralightitalic.woff') format('woff'), url('assets/iosevka-extralightitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 300;
src: url('assets/iosevka-light.woff') format('woff'), url('assets/iosevka-light.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 300;
font-style: italic;
src: url('assets/iosevka-lightitalic.woff') format('woff'), url('assets/iosevka-lightitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
src: url('assets/iosevka-regular.woff') format('woff'), url('assets/iosevka-regular.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-style: italic;
src: url('assets/iosevka-italic.woff') format('woff'), url('assets/iosevka-italic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 500;
src: url('assets/iosevka-medium.woff') format('woff'), url('assets/iosevka-medium.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-style: italic;
font-weight: 500;
src: url('assets/iosevka-mediumitalic.woff') format('woff'), url('assets/iosevka-mediumitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 700;
src: url('assets/iosevka-bold.woff') format('woff'), url('assets/iosevka-bold.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-style: italic;
font-weight: 700;
src: url('assets/iosevka-bolditalic.woff') format('woff'), url('assets/iosevka-bolditalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-weight: 900;
src: url('assets/iosevka-heavy.woff') format('woff'), url('assets/iosevka-heavy.ttf') format('truetype');
}
@font-face {
font-family: IosevkaWEB;
font-style: italic;
font-weight: 900;
src: url('assets/iosevka-heavyitalic.woff') format('woff'), url('assets/iosevka-heavyitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 100;
src: url('assets/iosevka-slab-thin.woff') format('woff'), url('assets/iosevka-slab-thin.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 100;
font-style: italic;
src: url('assets/iosevka-slab-thinitalic.woff') format('woff'), url('assets/iosevka-slab-thinitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 200;
src: url('assets/iosevka-slab-extralight.woff') format('woff'), url('assets/iosevka-slab-extralight.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 200;
font-style: italic;
src: url('assets/iosevka-slab-extralightitalic.woff') format('woff'), url('assets/iosevka-slab-extralightitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 300;
src: url('assets/iosevka-slab-light.woff') format('woff'), url('assets/iosevka-slab-light.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 300;
font-style: italic;
src: url('assets/iosevka-slab-lightitalic.woff') format('woff'), url('assets/iosevka-slab-lightitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
src: url('assets/iosevka-slab-regular.woff') format('woff'), url('assets/iosevka-slab-regular.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-style: italic;
src: url('assets/iosevka-slab-italic.woff') format('woff'), url('assets/iosevka-slab-italic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 500;
src: url('assets/iosevka-slab-medium.woff') format('woff'), url('assets/iosevka-slab-medium.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-style: italic;
font-weight: 500;
src: url('assets/iosevka-slab-mediumitalic.woff') format('woff'), url('assets/iosevka-slab-mediumitalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 700;
src: url('assets/iosevka-slab-bold.woff') format('woff'), url('assets/iosevka-slab-bold.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-style: italic;
font-weight: 700;
src: url('assets/iosevka-slab-bolditalic.woff') format('woff'), url('assets/iosevka-slab-bolditalic.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-weight: 900;
src: url('assets/iosevka-slab-heavy.woff') format('woff'), url('assets/iosevka-slab-heavy.ttf') format('truetype');
}
@font-face {
font-family: IosevkaSlabWEB;
font-style: italic;
font-weight: 900;
src: url('assets/iosevka-slab-heavyitalic.woff') format('woff'), url('assets/iosevka-slab-heavyitalic.ttf') format('truetype');
}
a {
color: black;
background-image: linear-gradient(white 50%, #888 50%);