From 85890f1be1b31d878da5d39b421542014a20af37 Mon Sep 17 00:00:00 2001 From: Belleve Invis Date: Wed, 29 Jul 2015 06:56:01 +0800 Subject: [PATCH] Added proper italic for several cyrillic characters. --- .gitignore | 3 ++ glyphs/autobuilds.patel | 8 ++++ glyphs/cyrillic-basic.patel | 70 ++++++++++++++++++++++++-------- glyphs/greek.patel | 4 +- glyphs/latin-basic-capital.patel | 4 +- 5 files changed, 68 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 94b78f1..41d3b26 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,9 @@ build/Release # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git node_modules + +.settings + # Special *.ttf *.7z diff --git a/glyphs/autobuilds.patel b/glyphs/autobuilds.patel index f58356d..6058542 100644 --- a/glyphs/autobuilds.patel +++ b/glyphs/autobuilds.patel @@ -275,6 +275,14 @@ define customDecompositions ( ."\u013C" "l\u0326" ."\u0122" "G\u0326" ."\u0123" "g\u0312" + + # Cyrillic composite characters + ."\u0498" "\u0417\u0327" + ."\u0499" "\u0437\u0327" + ."\u04AA" "\u0421\u0327" + ."\u04AB" "\u0441\u0327" + + # Spacing modifers ."\u1FED" " \u0308\u0300" ."\u1FEE" " \u0308\u0301" ."\u1FEF" " \u0300" diff --git a/glyphs/cyrillic-basic.patel b/glyphs/cyrillic-basic.patel index eaa1579..aa88744 100644 --- a/glyphs/cyrillic-basic.patel +++ b/glyphs/cyrillic-basic.patel @@ -121,24 +121,51 @@ create-glyph 'cyrU' : glyph-construction { create-glyph 'be' : glyph-construction { assign-unicode 0x431 include bMarks - include glyphs.o + include : smallo [CAP * 0.7] 0 SB RIGHTSB include : create-stroke :.start-from [SB + O] SMALLSMOOTHB :.set-width 0 STROKE :.line-to [SB + O] [XH - SMALLSMOOTHA] :.cubic-to [SB + O] [mix XH CAP 1.2] [mix SB RIGHTSB 0.4] [mix XH CAP 0.5] [RIGHTSB - HALFSTROKE * ITALICCOR] CAP } -create-glyph 've' : glyph-construction { - assign-unicode 0x432 +create-glyph 've.italic' : glyph-construction { + include eMarks + + local mid : mix RIGHTSB SB 0.65 + include : create-stroke + :.start-from mid [XH / 2 - HALFSTROKE] + :.heads-to RIGHTWARD + :.set-width STROKE 0 + :.line-to MIDDLE [XH / 2 - HALFSTROKE] + :.arc-hv-to [RIGHTSB + O] [XH - SMOOTHB * 0.87] KAPPA + :.arc-vh-to MIDDLE XO + :.heads-to LEFTWARD + :.arc-hv-to [SB + O] [XH - SMALLSMOOTHA] + :.line-to [SB + O] SMALLSMOOTHB + :.arc-vh-to MIDDLE O + :.heads-to RIGHTWARD + :.arc-hv-to [RIGHTSB - O] [SMOOTHA * 0.87] + :.arc-vh-to MIDDLE [XH / 2 + HALFSTROKE] KAPPA + :.line-to mid [XH / 2 + HALFSTROKE] + :.heads-to LEFTWARD +} +create-glyph 've.upright' : glyph-construction { include eMarks include : BShape XH } -create-glyph 'ghe' : glyph-construction { - assign-unicode 0x433 +italic-variant 've' 0x432 +create-glyph 'ghe.upright' : glyph-construction { include eMarks include : LShape XH include : FlipAround MIDDLE [XH / 2] 1 [-1] } +create-glyph 'ghe.italic' : glyph-construction { + include eMarks + include : twoHookUpper XH [SMOOTHB * 0.87] SHOOK + include : XSHookLower 0 [RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx] MIDDLE SB [SMOOTHB * 0.87] [SHOOK - TAILADJY * globalTransform.yx] + include : sStrand [SMOOTHB * 0.87] [XH - [SMOOTHB * 0.87]] 0.2 0.45 +} +italic-variant 'ghe' 0x433 define [DeShape top] : glyph-construction { local cutleft : mix SB RIGHTSB 0.2 local cutright : mix SB RIGHTSB 0.92 @@ -154,21 +181,30 @@ create-glyph 'De' : glyph-construction { include ifMarks include : DeShape CAP } -create-glyph 'de' : glyph-construction { - assign-unicode 0x434 - include pMarks +create-glyph 'de.upright' : glyph-construction { + include eMarks include : DeShape XH } +create-glyph 'de.italic' : glyph-construction { + include bMarks + include : smallo [CAP * 0.7] 0 SB RIGHTSB + local ymiddlea : [XH + SMALLSMOOTHA - SMALLSMOOTHB] / 2 + include : create-stroke + :.start-from [RIGHTSB - O] ymiddlea + :.set-width STROKE 0 + :.curve-to [RIGHTSB - O] [mix ymiddlea CAP 0.8] [SB + STROKE * 1.1] CAP +} +italic-variant 'de' 0x434 define [ZheShape top] : glyph-construction { local fine : adviceBlackness 3.75 local midx : mix SB MIDDLE 0.3 define [AngleShape] : glyph-construction { local cor 1 - start-from [SB + O] 0 - line-to [SB + fine * cor + O] 0 + start-from [SB + O * 2] 0 + line-to [SB + fine * cor + O * 2] 0 line-to [midx + fine * cor] [top / 2] - line-to [SB + fine * cor + O] top - line-to [SB + O] top + line-to [SB + fine * cor + O * 2] top + line-to [SB + O * 2] top line-to midx [top / 2] reverse-last } @@ -315,8 +351,8 @@ create-glyph 'shcha' : glyph-construction { include : ShchaShape XH } define [YerShape top] : glyph-construction { - include : YeriShape top [mix SB RIGHTSB 0.2] RIGHTSB - include : HBarTop SB [STROKE * 0.1 + [mix SB RIGHTSB 0.2]] top + include : YeriShape top [mix SB RIGHTSB 0.1] RIGHTSB + include : HBarTop [mix 0 SB 0.6] [STROKE * 0.1 + [mix SB RIGHTSB 0.1]] top } create-glyph 'Yer' : glyph-construction { assign-unicode 0x42A @@ -359,9 +395,9 @@ create-glyph 'cyre' : glyph-construction { } define [YuShape top sma smb] : glyph-construction { local fine : adviceBlackness 3.5 - include : VBarLeft SB 0 top fine - include : smallo top 0 [mix [SB + fine * ITALICCOR] RIGHTSB 0.2] RIGHTSB fine [sma * 0.8] [smb * 0.8] - include : HBar [SB + fine * 0.1] [mix [SB + fine * ITALICCOR] RIGHTSB 0.2] [top / 2] + include : VBarLeft [SB + O] 0 top fine + include : smallo top 0 [mix [SB + fine * ITALICCOR] RIGHTSB 0.15] RIGHTSB fine [sma * 0.8] [smb * 0.8] + include : HBar [SB + fine * 0.1] [mix [SB + fine * ITALICCOR] RIGHTSB 0.15] [top / 2] } create-glyph 'Yu' : glyph-construction { assign-unicode 0x42E diff --git a/glyphs/greek.patel b/glyphs/greek.patel index 346d1d6..75123ad 100644 --- a/glyphs/greek.patel +++ b/glyphs/greek.patel @@ -310,8 +310,8 @@ create-glyph 'delta' : glyph-construction { :.line-to [RIGHTSB - STROKE * ITALICCOR - O] SMALLSMOOTHA :.arc-vh-to MIDDLE [STROKE + O] :.heads-to LEFTWARD - :.arc-hv-to [SB + STROKE * ITALICCOR + O] SMALLSMOOTHB - :.line-to [SB + STROKE * ITALICCOR + O] [bar - SMALLSMOOTHA] + :.arc-hv-to [SB + STROKE * ITALICCOR] SMALLSMOOTHB + :.line-to [SB + STROKE * ITALICCOR] [bar - SMALLSMOOTHA] :.arc-vh-to xOTLeft [bar - STROKE] :.set-width fine 0 } diff --git a/glyphs/latin-basic-capital.patel b/glyphs/latin-basic-capital.patel index ddfd349..ab3d428 100644 --- a/glyphs/latin-basic-capital.patel +++ b/glyphs/latin-basic-capital.patel @@ -260,7 +260,7 @@ create-glyph 'P' : glyph-construction { include capitalMarks local bowlTop [CAP * 1] - local bowlBottom [CAP * 0.5 - HALFSTROKE] + local bowlBottom [[CAP - STROKE] * 0.5 - HALFSTROKE] local bkappa [COKAPPA - 0.2] local turn : mix bowlTop bowlBottom 0.5 @@ -294,7 +294,7 @@ create-glyph 'R' : glyph-construction { :.start-from [right - HALFSTROKE] 0 :.heads-to UPWARD :.set-width HALFSTROKE HALFSTROKE - :.curve-to [right - HALFSTROKE] [TURN + 0.2 * [XH - TURN]] MIDDLE CAPMIDDLE + :.curve-to [right - HALFSTROKE] [TURN + 0.2 * [XH - TURN]] MIDDLE [[CAP - STROKE] / 2] } ### C G O zero Q U