Coward glyphs in bold weight now looks more "dark".

This commit is contained in:
be5invis 2015-08-20 22:49:34 +08:00
parent 2331b20db1
commit 1e2bf7458b
8 changed files with 60 additions and 59 deletions

View File

@ -148,10 +148,10 @@ define [buildFont para recursive] : 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 * 2.5] * [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 [[RIGHTSB - SB] * [1 - WHITENESS] / crowdedness] define [adviceBlackness crowdedness] : Math.min STROKE [[RIGHTSB - SB] * [1 - WHITENESS] / crowdedness]
define MVERTSTROKE : adviceBlackness [3 + 1 / 3]
define OPERATORSTROKE : adviceBlackness 3.25 define OPERATORSTROKE : adviceBlackness 3.4
# Anchor parameters # Anchor parameters
define BASE 'base' define BASE 'base'
@ -283,7 +283,7 @@ define [buildFont para recursive] : begin {
define [create-glyph name actions] : piecewise { define [create-glyph name actions] : piecewise {
[name && actions] : begin { [name && actions] : begin {
if [pickHash && [not pickHash.(name)]] : return nothing if [pickHash && [not pickHash.(name)]] : return nothing
process.stderr.write : "Building /" + name + [if recursive " (recursive)" ""] + " for " + para.family + ' ' + para.style + "\n" # process.stderr.write : "Building /" + name + [if recursive " (recursive)" ""] + " for " + para.family + ' ' + para.style + "\n"
set dependencyProfile`name () set dependencyProfile`name ()
define glyphObject [new Glyph name] define glyphObject [new Glyph name]
glyphObject.set-width WIDTH glyphObject.set-width WIDTH

View File

@ -210,7 +210,7 @@ create-glyph 'cyrde.italic' : glyph-construction {
} }
italic-variant 'cyrde' 0x434 italic-variant 'cyrde' 0x434
define [CyrZheShape top] : glyph-construction { define [CyrZheShape top] : glyph-construction {
local fine : adviceBlackness 3.5 local fine : adviceBlackness 3.3
local midx : mix SB MIDDLE 0.3 local midx : mix SB MIDDLE 0.3
define [CyrAngleShape] : glyph-construction { define [CyrAngleShape] : glyph-construction {
local cor 1 local cor 1
@ -339,11 +339,10 @@ create-glyph 'cyrche' : glyph-construction {
include : CyrCheShape XH include : CyrCheShape XH
} }
define [CyrShaShape top] : glyph-construction { define [CyrShaShape top] : glyph-construction {
local fine : adviceBlackness 3.5
include : HBarBottom SB RIGHTSB 0 include : HBarBottom SB RIGHTSB 0
include : VBarLeft SB 0 top fine include : VBarLeft SB 0 top MVERTSTROKE
include : VBarRight RIGHTSB 0 top fine include : VBarRight RIGHTSB 0 top MVERTSTROKE
include : VBar MIDDLE 0 top fine include : VBar MIDDLE 0 top MVERTSTROKE
} }
create-glyph 'cyrSha' : glyph-construction { create-glyph 'cyrSha' : glyph-construction {
assign-unicode 0x428 assign-unicode 0x428
@ -384,9 +383,8 @@ create-glyph 'cyryer' : glyph-construction {
include : CyrYerShape XH include : CyrYerShape XH
} }
define [CyrYeryShape top] : glyph-construction { define [CyrYeryShape top] : glyph-construction {
local fine : adviceBlackness 3.5 include : CyrYeriShape top [SB + O] [mix [RIGHTSB - MVERTSTROKE * CORRECTION_HX] [MIDDLE + MVERTSTROKE / 2 * CORRECTION_HX] 0.5] MVERTSTROKE
include : CyrYeriShape top SB [mix [RIGHTSB - fine * CORRECTION_HX] [MIDDLE + fine / 2 * CORRECTION_HX] 0.5] fine include : VBarRight [RIGHTSB - O] 0 top MVERTSTROKE
include : VBarRight RIGHTSB 0 top fine
} }
create-glyph 'cyrYery' : glyph-construction { create-glyph 'cyrYery' : glyph-construction {
assign-unicode 0x42B assign-unicode 0x42B
@ -413,10 +411,9 @@ create-glyph 'cyre' : glyph-construction {
include : HBar [mix SB RIGHTSB 0.25] RIGHTSB [XH / 2] include : HBar [mix SB RIGHTSB 0.25] RIGHTSB [XH / 2]
} }
define [CyrYuShape top sma smb] : glyph-construction { define [CyrYuShape top sma smb] : glyph-construction {
local fine : adviceBlackness 3.5 include : VBarLeft [SB + O] 0 top MVERTSTROKE
include : VBarLeft [SB + O] 0 top fine include : smallo top 0 [mix [SB + MVERTSTROKE * CORRECTION_HX] RIGHTSB 0.15] [RIGHTSB - O] MVERTSTROKE [sma * 0.8] [smb * 0.8]
include : smallo top 0 [mix [SB + fine * CORRECTION_HX] RIGHTSB 0.15] [RIGHTSB - O] fine [sma * 0.8] [smb * 0.8] include : HBar [SB + MVERTSTROKE * 0.1] [mix [SB + MVERTSTROKE * CORRECTION_HX] RIGHTSB 0.15] [top / 2]
include : HBar [SB + fine * 0.1] [mix [SB + fine * CORRECTION_HX] RIGHTSB 0.15] [top / 2]
} }
create-glyph 'cyrYu' : glyph-construction { create-glyph 'cyrYu' : glyph-construction {
assign-unicode 0x42E assign-unicode 0x42E

View File

@ -29,10 +29,9 @@ create-glyph 'cyrdzhe' : glyph-construction {
include : CyrDzheShape XH include : CyrDzheShape XH
} }
define [CyrLjeShape top] : glyph-construction { define [CyrLjeShape top] : glyph-construction {
local fine : adviceBlackness 3.5
local xlefttop : mix SB RIGHTSB 0.075 local xlefttop : mix SB RIGHTSB 0.075
include : LegShape xlefttop [mix SB RIGHTSB 0.025] [mix SB 0 0.5] top 0 fine include : LegShape xlefttop [mix SB RIGHTSB 0.025] [mix SB 0 0.5] top 0 MVERTSTROKE
include : CyrYeriShape top [MIDDLE - fine / 2 * CORRECTION_HX] [RIGHTSB - O] fine include : CyrYeriShape top [MIDDLE - MVERTSTROKE / 2 * CORRECTION_HX] [RIGHTSB - O] MVERTSTROKE
include : HBarTop xlefttop MIDDLE top include : HBarTop xlefttop MIDDLE top
} }
create-glyph 'cyrLje' : glyph-construction { create-glyph 'cyrLje' : glyph-construction {
@ -46,11 +45,10 @@ create-glyph 'cyrlje' : glyph-construction {
include : CyrLjeShape XH include : CyrLjeShape XH
} }
define [CyrNjeShape top] : glyph-construction { define [CyrNjeShape top] : glyph-construction {
local fine : adviceBlackness 3.5
local xlefttop : mix SB RIGHTSB 0.075 local xlefttop : mix SB RIGHTSB 0.075
include : VBarLeft SB 0 top fine include : VBarLeft SB 0 top MVERTSTROKE
include : CyrYeriShape top [MIDDLE - fine / 2 * CORRECTION_HX] [RIGHTSB - O] fine include : CyrYeriShape top [MIDDLE - MVERTSTROKE / 2 * CORRECTION_HX] [RIGHTSB - O] MVERTSTROKE
include : HBar [SB + fine * 0.1] MIDDLE [top / 2] include : HBar [SB + MVERTSTROKE * 0.1] MIDDLE [top / 2]
} }
create-glyph 'cyrNje' : glyph-construction { create-glyph 'cyrNje' : glyph-construction {
assign-unicode 0x40A assign-unicode 0x40A

View File

@ -113,21 +113,19 @@ create-glyph 'pi' : glyph-construction {
create-glyph 'Phi' : glyph-construction { create-glyph 'Phi' : glyph-construction {
assign-unicode 0x3A6 assign-unicode 0x3A6
include capitalMarks include capitalMarks
local fine : adviceBlackness 3.5
local y1 : CAP * 0.125 local y1 : CAP * 0.125
local y2 : CAP * 0.875 local y2 : CAP * 0.875
include : VBar MIDDLE 0 [y1 + HALFSTROKE] include : VBar MIDDLE 0 [y1 + HALFSTROKE]
include : smallo y2 y1 SB RIGHTSB fine SMOOTHA SMOOTHB include : smallo y2 y1 SB RIGHTSB MVERTSTROKE SMOOTHA SMOOTHB
include : VBar MIDDLE y1 y2 fine include : VBar MIDDLE y1 y2 MVERTSTROKE
include : VBar MIDDLE [y2 - HALFSTROKE] CAP include : VBar MIDDLE [y2 - HALFSTROKE] CAP
} }
create-glyph 'Psi' : glyph-construction { create-glyph 'Psi' : glyph-construction {
assign-unicode 0x3A8 assign-unicode 0x3A8
include capitalMarks include capitalMarks
local fine : adviceBlackness 3.5
local y : CAP * 0.25 local y : CAP * 0.25
include : spiro { include : spiro {
widths.lhs fine widths.lhs MVERTSTROKE
flat SB CAP [heading DOWNWARD] flat SB CAP [heading DOWNWARD]
curl SB [y + SMOOTHB] curl SB [y + SMOOTHB]
arcvh arcvh
@ -136,7 +134,7 @@ create-glyph 'Psi' : glyph-construction {
flat RIGHTSB [y + SMOOTHA] flat RIGHTSB [y + SMOOTHA]
curl RIGHTSB CAP [heading UPWARD] curl RIGHTSB CAP [heading UPWARD]
} }
include : VBar MIDDLE y CAP fine include : VBar MIDDLE y CAP MVERTSTROKE
include : VBar MIDDLE 0 [y + HALFSTROKE] include : VBar MIDDLE 0 [y + HALFSTROKE]
} }
define [OmegaShape top sma smb ssma ssmb] : glyph-construction { define [OmegaShape top sma smb ssma ssmb] : glyph-construction {
@ -544,25 +542,23 @@ create-glyph 'omega' : glyph-construction {
create-glyph 'varphi' : glyph-construction { create-glyph 'varphi' : glyph-construction {
assign-unicode 0x3D5 assign-unicode 0x3D5
include ifMarks include ifMarks
local fine : adviceBlackness 3.5
local y1 0 local y1 0
local y2 XH local y2 XH
include : VBar MIDDLE DESCENDER [y1 + HALFSTROKE] include : VBar MIDDLE DESCENDER [y1 + HALFSTROKE]
include : smallo y2 y1 SB RIGHTSB fine include : smallo y2 y1 SB RIGHTSB MVERTSTROKE
include : VBar MIDDLE y1 y2 fine include : VBar MIDDLE y1 y2 MVERTSTROKE
include : VBar MIDDLE [y2 - HALFSTROKE] CAP include : VBar MIDDLE [y2 - HALFSTROKE] CAP
} }
create-glyph 'phi' : glyph-construction { create-glyph 'phi' : glyph-construction {
assign-unicode 0x3C6 assign-unicode 0x3C6
include pMarks include pMarks
local fine : adviceBlackness 3.25
local x0 : mix SB RIGHTSB 0.1 local x0 : mix SB RIGHTSB 0.1
local y1 : mix 0 XH 0.75 local y1 : mix 0 XH 0.75
local x1 : SB + O * 2 local x1 : SB + O * 2
local y3 : XH * 0.66 local y3 : XH * 0.66
local y4 : XH * 0.65 local y4 : XH * 0.65
include : spiro { include : spiro {
widths.lhs fine widths.lhs MVERTSTROKE
g4 x0 XH g4 x0 XH
g4 x1 [XH / 2] g4 x1 [XH / 2]
arcvh arcvh
@ -570,12 +566,12 @@ create-glyph 'phi' : glyph-construction {
archv archv
g4 [WIDTH - x1] [XH / 2] g4 [WIDTH - x1] [XH / 2]
arcvh 8 arcvh 8
g4 [mix [WIDTH - x1] [MIDDLE - fine / 2] 0.6] XH [heading (.x 0.1 .y [-1])] g4 [mix [WIDTH - x1] [MIDDLE - MVERTSTROKE / 2] 0.6] XH [heading (.x 0.1 .y [-1])]
archv archv
flat [MIDDLE - fine / 2] y3 flat [MIDDLE - MVERTSTROKE / 2] y3
curl [MIDDLE - fine / 2] 0 curl [MIDDLE - MVERTSTROKE / 2] 0
} }
include : VBar MIDDLE DESCENDER [fine * 0.2] include : VBar MIDDLE DESCENDER [MVERTSTROKE * 0.2]
} }
create-glyph 'psi' : glyph-construction { create-glyph 'psi' : glyph-construction {

View File

@ -302,15 +302,14 @@ create-glyph 'm' : glyph-construction {
assign-unicode 'm' assign-unicode 'm'
include eMarks include eMarks
local sw : adviceBlackness 3.5 local m1 : mix [SB + O] [MIDDLE + MVERTSTROKE / 2 * CORRECTION_HX] 0.5
local m1 : mix [SB + O] [MIDDLE + sw / 2 * CORRECTION_HX] 0.5 local m2 : mix [RIGHTSB - O] [MIDDLE - MVERTSTROKE / 2 * CORRECTION_HX] 0.5
local m2 : mix [RIGHTSB - O] [MIDDLE - sw / 2 * CORRECTION_HX] 0.5 include : mShoulderSpiro [SB + O + MVERTSTROKE] [MIDDLE + MVERTSTROKE / 2 * CORRECTION_HX] XH 0 MVERTSTROKE [MVERTSTROKE * 0.4]
include : mShoulderSpiro [SB + O + sw] [MIDDLE + sw / 2 * CORRECTION_HX] XH 0 sw [sw * 0.4] include : mShoulderSpiro [MIDDLE + MVERTSTROKE * 0.48 * CORRECTION_HX] [RIGHTSB - O] XH 0 MVERTSTROKE [MVERTSTROKE * 0.8]
include : mShoulderSpiro [MIDDLE + sw * 0.48 * CORRECTION_HX] [RIGHTSB - O] XH 0 sw [sw * 0.8]
include : create-stroke include : create-stroke
:.start-from [SB + O] 0 :.start-from [SB + O] 0
:.heads-to UPWARD :.heads-to UPWARD
:.set-width 0 sw :.set-width 0 MVERTSTROKE
:.line-to [SB + O] XH :.line-to [SB + O] XH
:.heads-to UPWARD :.heads-to UPWARD
} }

View File

@ -322,12 +322,12 @@ create-glyph 'eszet' : glyph-construction {
set-width WIDTH set-width WIDTH
assign-unicode 0xDF assign-unicode 0xDF
include ifMarks include ifMarks
local l : SB * 1.175 local l : SB * 1
include : spiro { include : spiro {
widths.lhs widths.lhs
g4 [l + HOOKX + HALFSTROKE] CAP [heading LEFTWARD] g4 [l + HOOKX + HALFSTROKE] CAP [heading LEFTWARD]
archv archv
flat l [CAP - HOOK] flat l XH
curl l 0 [heading DOWNWARD] curl l 0 [heading DOWNWARD]
} }
local t : mix 0 CAP 0.7 local t : mix 0 CAP 0.7

View File

@ -2,7 +2,7 @@
### Combining marks ### Combining marks
local markExtend [ACCENTX * 0.5] local markExtend [ACCENTX * 0.5]
local markStress : 0.5 * [adviceBlackness 3.25] local markStress : 0.5 * [adviceBlackness 3.3]
local markFine : markStress * 0.8 local markFine : markStress * 0.8
local markHalfStroke : mix markFine markStress 0.5 local markHalfStroke : mix markFine markStress 0.5
local markMiddle [-MIDDLE] local markMiddle [-MIDDLE]
@ -305,9 +305,20 @@ create-glyph 'barAbove' : glyph-construction {
create-glyph 'candrabinduAbove' : glyph-construction { create-glyph 'candrabinduAbove' : glyph-construction {
set-width 0 set-width 0
assign-unicode 0x310 assign-unicode 0x310
include glyphs.breveAbove local fine : adviceBlackness 6.5
include : list : DotAt markMiddle aboveMarkTop [markExtend - markHalfStroke] local yc : XH + ACCENT
local radius : fine * 1.35
include : create-stroke
:.start-from [markMiddle - radius] yc
:.heads-to DOWNWARD
:.set-width 0 [fine * 1.25]
:.arc-vh-to markMiddle [yc - radius]
:.arc-hv-to [markMiddle + radius] yc
:.heads-to UPWARD
include : list : DotAt markMiddle [XH + ACCENT] fine
apply-transform : Upright
apply-transform : Translate 0 [fine * 0.5]
apply-transform : Italify
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
} }

View File

@ -213,14 +213,14 @@
} }
var BLOCKSIZE = 16 * 4; var BLOCKSIZE = 16 * 4;
var fonts = [ var fonts = [
{name: 'iosevka-regular', cls: ''}, {name: 'iosevka-regular', cls: '', display: 'Regular'},
{name: 'iosevka-bold', cls: 'bold'}, {name: 'iosevka-bold', cls: 'bold', display: 'Bold'},
{name: 'iosevka-italic', cls:'italic'}, {name: 'iosevka-italic', cls:'italic', display: 'Italic'},
{name: 'iosevka-bolditalic', cls:'bold italic'}, {name: 'iosevka-bolditalic', cls:'bold italic', display: 'Bolditalic'},
{name: 'iosevkacc-regular', cls: 'cc'}, {name: 'iosevkacc-regular', cls: 'cc', display: 'CC-Regular'},
{name: 'iosevkacc-bold', cls: 'cc bold'}, {name: 'iosevkacc-bold', cls: 'cc bold', display: 'CC-Bold'},
{name: 'iosevkacc-italic', cls:'cc italic'}, {name: 'iosevkacc-italic', cls:'cc italic', display: 'CC-Italic'},
{name: 'iosevkacc-bolditalic', cls:'cc bold italic'} {name: 'iosevkacc-bolditalic', cls:'cc bold italic', display: 'CC-Bolditalic'}
]; ];
var sampleSentences = [ var sampleSentences = [
@ -299,7 +299,7 @@
divs.push(div); divs.push(div);
$('body').append(div); $('body').append(div);
var a = $('<a>').attr('href', '#').append(font.name); var a = $('<a>').attr('href', '#').append(font.display);
a.on('click', Click(fontindex)); a.on('click', Click(fontindex));
links.push(a) links.push(a)
$('#links').append(a); $('#links').append(a);