From 1e2bf7458b511aedb8faf1ecdf62c3f6e76d01ce Mon Sep 17 00:00:00 2001 From: be5invis Date: Thu, 20 Aug 2015 22:49:34 +0800 Subject: [PATCH] Coward glyphs in bold weight now looks more "dark". --- buildglyphs.patel | 8 ++++---- glyphs/cyrillic-basic.patel | 21 +++++++++------------ glyphs/cyrillic-extended.patel | 12 +++++------- glyphs/greek.patel | 26 +++++++++++--------------- glyphs/latin-basic-lower.patel | 11 +++++------ glyphs/latin-extend-basis.patel | 4 ++-- glyphs/overmarks.patel | 19 +++++++++++++++---- testdrive/index.html | 18 +++++++++--------- 8 files changed, 60 insertions(+), 59 deletions(-) diff --git a/buildglyphs.patel b/buildglyphs.patel index aa935e87a..bdf5c7371 100644 --- a/buildglyphs.patel +++ b/buildglyphs.patel @@ -148,10 +148,10 @@ define [buildFont para recursive] : begin { # Blackness parameters # 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 OPERATORSTROKE : adviceBlackness 3.25 + define MVERTSTROKE : adviceBlackness [3 + 1 / 3] + define OPERATORSTROKE : adviceBlackness 3.4 # Anchor parameters define BASE 'base' @@ -283,7 +283,7 @@ define [buildFont para recursive] : begin { define [create-glyph name actions] : piecewise { [name && actions] : begin { 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 () define glyphObject [new Glyph name] glyphObject.set-width WIDTH diff --git a/glyphs/cyrillic-basic.patel b/glyphs/cyrillic-basic.patel index 0a6b8c25e..00ca10cf6 100644 --- a/glyphs/cyrillic-basic.patel +++ b/glyphs/cyrillic-basic.patel @@ -210,7 +210,7 @@ create-glyph 'cyrde.italic' : glyph-construction { } italic-variant 'cyrde' 0x434 define [CyrZheShape top] : glyph-construction { - local fine : adviceBlackness 3.5 + local fine : adviceBlackness 3.3 local midx : mix SB MIDDLE 0.3 define [CyrAngleShape] : glyph-construction { local cor 1 @@ -339,11 +339,10 @@ create-glyph 'cyrche' : glyph-construction { include : CyrCheShape XH } define [CyrShaShape top] : glyph-construction { - local fine : adviceBlackness 3.5 include : HBarBottom SB RIGHTSB 0 - include : VBarLeft SB 0 top fine - include : VBarRight RIGHTSB 0 top fine - include : VBar MIDDLE 0 top fine + include : VBarLeft SB 0 top MVERTSTROKE + include : VBarRight RIGHTSB 0 top MVERTSTROKE + include : VBar MIDDLE 0 top MVERTSTROKE } create-glyph 'cyrSha' : glyph-construction { assign-unicode 0x428 @@ -384,9 +383,8 @@ create-glyph 'cyryer' : glyph-construction { include : CyrYerShape XH } define [CyrYeryShape top] : glyph-construction { - local fine : adviceBlackness 3.5 - include : CyrYeriShape top SB [mix [RIGHTSB - fine * CORRECTION_HX] [MIDDLE + fine / 2 * CORRECTION_HX] 0.5] fine - include : VBarRight RIGHTSB 0 top fine + include : CyrYeriShape top [SB + O] [mix [RIGHTSB - MVERTSTROKE * CORRECTION_HX] [MIDDLE + MVERTSTROKE / 2 * CORRECTION_HX] 0.5] MVERTSTROKE + include : VBarRight [RIGHTSB - O] 0 top MVERTSTROKE } create-glyph 'cyrYery' : glyph-construction { assign-unicode 0x42B @@ -413,10 +411,9 @@ create-glyph 'cyre' : glyph-construction { include : HBar [mix SB RIGHTSB 0.25] RIGHTSB [XH / 2] } define [CyrYuShape top sma smb] : glyph-construction { - local fine : adviceBlackness 3.5 - include : VBarLeft [SB + O] 0 top fine - include : smallo top 0 [mix [SB + fine * CORRECTION_HX] RIGHTSB 0.15] [RIGHTSB - O] fine [sma * 0.8] [smb * 0.8] - include : HBar [SB + fine * 0.1] [mix [SB + fine * CORRECTION_HX] RIGHTSB 0.15] [top / 2] + include : VBarLeft [SB + O] 0 top MVERTSTROKE + include : smallo top 0 [mix [SB + MVERTSTROKE * CORRECTION_HX] RIGHTSB 0.15] [RIGHTSB - O] MVERTSTROKE [sma * 0.8] [smb * 0.8] + include : HBar [SB + MVERTSTROKE * 0.1] [mix [SB + MVERTSTROKE * CORRECTION_HX] RIGHTSB 0.15] [top / 2] } create-glyph 'cyrYu' : glyph-construction { assign-unicode 0x42E diff --git a/glyphs/cyrillic-extended.patel b/glyphs/cyrillic-extended.patel index cda923e7f..d22b76058 100644 --- a/glyphs/cyrillic-extended.patel +++ b/glyphs/cyrillic-extended.patel @@ -29,10 +29,9 @@ create-glyph 'cyrdzhe' : glyph-construction { include : CyrDzheShape XH } define [CyrLjeShape top] : glyph-construction { - local fine : adviceBlackness 3.5 local xlefttop : mix SB RIGHTSB 0.075 - include : LegShape xlefttop [mix SB RIGHTSB 0.025] [mix SB 0 0.5] top 0 fine - include : CyrYeriShape top [MIDDLE - fine / 2 * CORRECTION_HX] [RIGHTSB - O] fine + include : LegShape xlefttop [mix SB RIGHTSB 0.025] [mix SB 0 0.5] top 0 MVERTSTROKE + include : CyrYeriShape top [MIDDLE - MVERTSTROKE / 2 * CORRECTION_HX] [RIGHTSB - O] MVERTSTROKE include : HBarTop xlefttop MIDDLE top } create-glyph 'cyrLje' : glyph-construction { @@ -46,11 +45,10 @@ create-glyph 'cyrlje' : glyph-construction { include : CyrLjeShape XH } define [CyrNjeShape top] : glyph-construction { - local fine : adviceBlackness 3.5 local xlefttop : mix SB RIGHTSB 0.075 - include : VBarLeft SB 0 top fine - include : CyrYeriShape top [MIDDLE - fine / 2 * CORRECTION_HX] [RIGHTSB - O] fine - include : HBar [SB + fine * 0.1] MIDDLE [top / 2] + include : VBarLeft SB 0 top MVERTSTROKE + include : CyrYeriShape top [MIDDLE - MVERTSTROKE / 2 * CORRECTION_HX] [RIGHTSB - O] MVERTSTROKE + include : HBar [SB + MVERTSTROKE * 0.1] MIDDLE [top / 2] } create-glyph 'cyrNje' : glyph-construction { assign-unicode 0x40A diff --git a/glyphs/greek.patel b/glyphs/greek.patel index 9fd049266..7a9b6205c 100644 --- a/glyphs/greek.patel +++ b/glyphs/greek.patel @@ -113,21 +113,19 @@ create-glyph 'pi' : glyph-construction { create-glyph 'Phi' : glyph-construction { assign-unicode 0x3A6 include capitalMarks - local fine : adviceBlackness 3.5 local y1 : CAP * 0.125 local y2 : CAP * 0.875 include : VBar MIDDLE 0 [y1 + HALFSTROKE] - include : smallo y2 y1 SB RIGHTSB fine SMOOTHA SMOOTHB - include : VBar MIDDLE y1 y2 fine + include : smallo y2 y1 SB RIGHTSB MVERTSTROKE SMOOTHA SMOOTHB + include : VBar MIDDLE y1 y2 MVERTSTROKE include : VBar MIDDLE [y2 - HALFSTROKE] CAP } create-glyph 'Psi' : glyph-construction { assign-unicode 0x3A8 include capitalMarks - local fine : adviceBlackness 3.5 local y : CAP * 0.25 include : spiro { - widths.lhs fine + widths.lhs MVERTSTROKE flat SB CAP [heading DOWNWARD] curl SB [y + SMOOTHB] arcvh @@ -136,7 +134,7 @@ create-glyph 'Psi' : glyph-construction { flat RIGHTSB [y + SMOOTHA] curl RIGHTSB CAP [heading UPWARD] } - include : VBar MIDDLE y CAP fine + include : VBar MIDDLE y CAP MVERTSTROKE include : VBar MIDDLE 0 [y + HALFSTROKE] } define [OmegaShape top sma smb ssma ssmb] : glyph-construction { @@ -544,25 +542,23 @@ create-glyph 'omega' : glyph-construction { create-glyph 'varphi' : glyph-construction { assign-unicode 0x3D5 include ifMarks - local fine : adviceBlackness 3.5 local y1 0 local y2 XH include : VBar MIDDLE DESCENDER [y1 + HALFSTROKE] - include : smallo y2 y1 SB RIGHTSB fine - include : VBar MIDDLE y1 y2 fine + include : smallo y2 y1 SB RIGHTSB MVERTSTROKE + include : VBar MIDDLE y1 y2 MVERTSTROKE include : VBar MIDDLE [y2 - HALFSTROKE] CAP } create-glyph 'phi' : glyph-construction { assign-unicode 0x3C6 include pMarks - local fine : adviceBlackness 3.25 local x0 : mix SB RIGHTSB 0.1 local y1 : mix 0 XH 0.75 local x1 : SB + O * 2 local y3 : XH * 0.66 local y4 : XH * 0.65 include : spiro { - widths.lhs fine + widths.lhs MVERTSTROKE g4 x0 XH g4 x1 [XH / 2] arcvh @@ -570,12 +566,12 @@ create-glyph 'phi' : glyph-construction { archv g4 [WIDTH - x1] [XH / 2] 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 - flat [MIDDLE - fine / 2] y3 - curl [MIDDLE - fine / 2] 0 + flat [MIDDLE - MVERTSTROKE / 2] y3 + curl [MIDDLE - MVERTSTROKE / 2] 0 } - include : VBar MIDDLE DESCENDER [fine * 0.2] + include : VBar MIDDLE DESCENDER [MVERTSTROKE * 0.2] } create-glyph 'psi' : glyph-construction { diff --git a/glyphs/latin-basic-lower.patel b/glyphs/latin-basic-lower.patel index 98e183b8f..8940bd731 100644 --- a/glyphs/latin-basic-lower.patel +++ b/glyphs/latin-basic-lower.patel @@ -302,15 +302,14 @@ create-glyph 'm' : glyph-construction { assign-unicode 'm' include eMarks - local sw : adviceBlackness 3.5 - local m1 : mix [SB + O] [MIDDLE + sw / 2 * CORRECTION_HX] 0.5 - local m2 : mix [RIGHTSB - O] [MIDDLE - sw / 2 * CORRECTION_HX] 0.5 - include : mShoulderSpiro [SB + O + sw] [MIDDLE + sw / 2 * CORRECTION_HX] XH 0 sw [sw * 0.4] - include : mShoulderSpiro [MIDDLE + sw * 0.48 * CORRECTION_HX] [RIGHTSB - O] XH 0 sw [sw * 0.8] + local m1 : mix [SB + O] [MIDDLE + MVERTSTROKE / 2 * CORRECTION_HX] 0.5 + local m2 : mix [RIGHTSB - O] [MIDDLE - MVERTSTROKE / 2 * CORRECTION_HX] 0.5 + include : mShoulderSpiro [SB + O + MVERTSTROKE] [MIDDLE + MVERTSTROKE / 2 * CORRECTION_HX] XH 0 MVERTSTROKE [MVERTSTROKE * 0.4] + include : mShoulderSpiro [MIDDLE + MVERTSTROKE * 0.48 * CORRECTION_HX] [RIGHTSB - O] XH 0 MVERTSTROKE [MVERTSTROKE * 0.8] include : create-stroke :.start-from [SB + O] 0 :.heads-to UPWARD - :.set-width 0 sw + :.set-width 0 MVERTSTROKE :.line-to [SB + O] XH :.heads-to UPWARD } diff --git a/glyphs/latin-extend-basis.patel b/glyphs/latin-extend-basis.patel index 76b13a55e..56dc6a393 100644 --- a/glyphs/latin-extend-basis.patel +++ b/glyphs/latin-extend-basis.patel @@ -322,12 +322,12 @@ create-glyph 'eszet' : glyph-construction { set-width WIDTH assign-unicode 0xDF include ifMarks - local l : SB * 1.175 + local l : SB * 1 include : spiro { widths.lhs g4 [l + HOOKX + HALFSTROKE] CAP [heading LEFTWARD] archv - flat l [CAP - HOOK] + flat l XH curl l 0 [heading DOWNWARD] } local t : mix 0 CAP 0.7 diff --git a/glyphs/overmarks.patel b/glyphs/overmarks.patel index 8f5435670..f0da3769a 100644 --- a/glyphs/overmarks.patel +++ b/glyphs/overmarks.patel @@ -2,7 +2,7 @@ ### Combining marks 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 markHalfStroke : mix markFine markStress 0.5 local markMiddle [-MIDDLE] @@ -305,9 +305,20 @@ create-glyph 'barAbove' : glyph-construction { create-glyph 'candrabinduAbove' : glyph-construction { set-width 0 assign-unicode 0x310 - include glyphs.breveAbove - include : list : DotAt markMiddle aboveMarkTop [markExtend - markHalfStroke] - + local fine : adviceBlackness 6.5 + 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 } diff --git a/testdrive/index.html b/testdrive/index.html index 42d86377f..cd72c961a 100644 --- a/testdrive/index.html +++ b/testdrive/index.html @@ -213,14 +213,14 @@ } var BLOCKSIZE = 16 * 4; var fonts = [ - {name: 'iosevka-regular', cls: ''}, - {name: 'iosevka-bold', cls: 'bold'}, - {name: 'iosevka-italic', cls:'italic'}, - {name: 'iosevka-bolditalic', cls:'bold italic'}, - {name: 'iosevkacc-regular', cls: 'cc'}, - {name: 'iosevkacc-bold', cls: 'cc bold'}, - {name: 'iosevkacc-italic', cls:'cc italic'}, - {name: 'iosevkacc-bolditalic', cls:'cc bold italic'} + {name: 'iosevka-regular', cls: '', display: 'Regular'}, + {name: 'iosevka-bold', cls: 'bold', display: 'Bold'}, + {name: 'iosevka-italic', cls:'italic', display: 'Italic'}, + {name: 'iosevka-bolditalic', cls:'bold italic', display: 'Bolditalic'}, + {name: 'iosevkacc-regular', cls: 'cc', display: 'CC-Regular'}, + {name: 'iosevkacc-bold', cls: 'cc bold', display: 'CC-Bold'}, + {name: 'iosevkacc-italic', cls:'cc italic', display: 'CC-Italic'}, + {name: 'iosevkacc-bolditalic', cls:'cc bold italic', display: 'CC-Bolditalic'} ]; var sampleSentences = [ @@ -299,7 +299,7 @@ divs.push(div); $('body').append(div); - var a = $('').attr('href', '#').append(font.name); + var a = $('').attr('href', '#').append(font.display); a.on('click', Click(fontindex)); links.push(a) $('#links').append(a);