From a92e2039bd87d00d6140f0faefbd4634d0e9f6cf Mon Sep 17 00:00:00 2001 From: be5invis Date: Sun, 23 Aug 2015 06:42:12 +0800 Subject: [PATCH] Rebuilt /Omega, /latinUpsilon2, /latinupsilon2 with spiros. time to merge. --- buildglyphs.patel | 1 + glyphs/autobuilds.patel | 35 +++++++++ glyphs/greek.patel | 26 +++---- glyphs/latin-basic-capital.patel | 22 +++--- glyphs/latin-extend-basis.patel | 106 ++++++++++++++++++++-------- glyphs/latin-extend-decorated.patel | 6 ++ 6 files changed, 144 insertions(+), 52 deletions(-) diff --git a/buildglyphs.patel b/buildglyphs.patel index 4450c9a..8e7104d 100644 --- a/buildglyphs.patel +++ b/buildglyphs.patel @@ -135,6 +135,7 @@ define [buildFont para recursive] : begin { define SMOOTHB : SMOOTH + globalTransform.yx * para.smoothadjust define SMALLSMOOTHA : SMALLSMOOTH - globalTransform.yx * para.smoothadjust define SMALLSMOOTHB : SMALLSMOOTH + globalTransform.yx * para.smoothadjust + define CORRECTION_VX globalTransform.yx define CORRECTION_VS : STROKE * globalTransform.yx define CORRECTION_OMIDX : globalTransform.yx * 1.2 diff --git a/glyphs/autobuilds.patel b/glyphs/autobuilds.patel index 6b39bb9..6329284 100644 --- a/glyphs/autobuilds.patel +++ b/glyphs/autobuilds.patel @@ -469,6 +469,41 @@ createFractions : list { list 0xE0A1 'L' 'N' } +# Ligatures +define [createLigature unicode] : begin { + local ids : ().slice.call arguments 1 + local glyphName : ids.join '_' + create-glyph glyphName : glyph-construction { + if unicode : assign-unicode unicode + set-width : ids.length * WIDTH + foreach id [items-of : ids.reverse] : begin { + apply-transform : Translate WIDTH 0 + include glyphs.(id) + } + } +} +createLigature 0x1C4 'D' 'Zcaron' +createLigature 0x1C5 'D' 'zcaron' +createLigature 0x1C6 'd' 'zcaron' +createLigature 0x1C7 'L' 'J' +createLigature 0x1C8 'L' 'j' +createLigature 0x1C9 'l' 'j' +createLigature 0x1CA 'N' 'J' +createLigature 0x1CB 'N' 'j' +createLigature 0x1CC 'n' 'j' +createLigature 0x2A3 'd' 'z' +createLigature 0x1F1 'D' 'Z' +createLigature 0x1F2 'D' 'z' +createLigature 0x1F3 'd' 'z' +createLigature 0x2A4 'd' 'ezh' +createLigature 0x2A5 'd' 'zcurlytail' +createLigature 0x2A6 't' 's' +createLigature 0x2A7 't' 'esh' +createLigature 0x2A8 't' 'ccurlytail' +createLigature 0x2A9 'f' 'eng' +createLigature 0x2AA 'l' 's' +createLigature 0x2AB 'l' 'z' + # Composite superscripts and subscripts define [doubleSuperscript a b] : glyph-construction { include a diff --git a/glyphs/greek.patel b/glyphs/greek.patel index 7a9b620..87f7220 100644 --- a/glyphs/greek.patel +++ b/glyphs/greek.patel @@ -139,19 +139,19 @@ create-glyph 'Psi' : glyph-construction { } define [OmegaShape top sma smb ssma ssmb] : glyph-construction { local fine : STROKE * 0.4 - include : create-stroke - :.start-from [mix SB RIGHTSB 0.4] STROKE - :.set-width fine 0 - :.heads-to LEFTWARD - :.arc-hv-to [SB + STROKE * CORRECTION_HX] [ssmb - CORRECTION_VS] - :.set-width STROKE 0 - :.line-to [SB + STROKE * CORRECTION_HX] [top - sma - CORRECTION_VS] - :.arc-vh-to [MIDDLE - CORRECTION_OMIDS + CORRECTION_VS][top - STROKE] - :.arc-hv-to [RIGHTSB - STROKE * CORRECTION_HX] [top - smb + CORRECTION_VS] - :.line-to [RIGHTSB - STROKE * CORRECTION_HX] [ssma + CORRECTION_VS] - :.arc-vh-to [mix RIGHTSB SB 0.4] STROKE - :.set-width fine 0 - :.heads-to LEFTWARD + include : spiro { + g4 [mix SB RIGHTSB 0.4] STROKE [widths.heading fine 0 LEFTWARD] + archv + flat SB ssmb [widths 0 STROKE] + curl SB [top - sma] + arcvh + g4 [MIDDLE - CORRECTION_OMIDS] [top - O] + archv + flat RIGHTSB [top - smb] + curl RIGHTSB ssma + arcvh + g4 [mix RIGHTSB SB 0.4] STROKE [widths.heading fine 0 LEFTWARD] + } include : HBar SB [mix SB RIGHTSB 0.4] HALFSTROKE include : HBar [mix RIGHTSB SB 0.4] RIGHTSB HALFSTROKE } diff --git a/glyphs/latin-basic-capital.patel b/glyphs/latin-basic-capital.patel index 772fbe1..ecf532e 100644 --- a/glyphs/latin-basic-capital.patel +++ b/glyphs/latin-basic-capital.patel @@ -288,20 +288,22 @@ create-glyph 'R' : glyph-construction { } ### C G O zero Q U - +define [CShape top bot] : glyph-construction { + include : spiro { + widths.lhs + g4 RIGHTSB [top - HOOK] + hookstart [top - O] + flat SB [top - SMOOTHA] + curl SB [bot + SMOOTHB] + hookend [bot + O] + g4 RIGHTSB [bot + HOOK] + } +} create-glyph 'C' : glyph-construction { set-width WIDTH assign-unicode 'C' include capitalMarks - include : spiro { - widths.lhs - g4 RIGHTSB [CAP - HOOK] - hookstart CAPO - flat SB [CAP - SMOOTHA] - curl SB SMOOTHB - hookend O - g4 RIGHTSB HOOK - } + include : CShape CAP 0 } define [GShape top sma smb] : glyph-construction { include : spiro { diff --git a/glyphs/latin-extend-basis.patel b/glyphs/latin-extend-basis.patel index da80ffb..09d9ac6 100644 --- a/glyphs/latin-extend-basis.patel +++ b/glyphs/latin-extend-basis.patel @@ -424,33 +424,28 @@ create-glyph 'latinupsilon1' : glyph-construction { include : OmegaShape XH SMALLSMOOTHA SMALLSMOOTHB SMALLSMOOTHA SMALLSMOOTHB include : FlipAround MIDDLE [XH / 2] } +define [LatinUpsilon2Shape top sma smb] : glyph-construction { + include : spiro { + widths.lhs + flat SB top [heading DOWNWARD] + curl SB smb + arcvh + g4 [MIDDLE + CORRECTION_OMIDS] O + archv + flat RIGHTSB sma + curl RIGHTSB [top - HOOK - HALFSTROKE] [heading UPWARD] + } + include : VerticalHook [RIGHTSB - HALFSTROKE * CORRECTION_HX] [top - HOOK - HALFSTROKE] [-[RIGHTSB - HALFSTROKE * CORRECTION_HX - MIDDLE]] [-HOOK] +} create-glyph 'latinUpsilon2' : glyph-construction { assign-unicode 0x1B2 include eMarks - include : create-stroke - :.start-from SB CAP - :.heads-to DOWNWARD - :.set-width STROKE 0 - :.line-to SB SMOOTHB - :.arc-vh-to [MIDDLE + CORRECTION_OMIDS] O - :.arc-hv-to RIGHTSB SMOOTHA - :.line-to RIGHTSB [CAP - HOOK - HALFSTROKE] - :.heads-to UPWARD - include : VerticalHook [RIGHTSB - HALFSTROKE * CORRECTION_HX] [CAP - HOOK - HALFSTROKE] [-[RIGHTSB - HALFSTROKE * CORRECTION_HX - MIDDLE]] [-HOOK] + include : LatinUpsilon2Shape CAP SMOOTHA SMOOTHB } create-glyph 'latinupsilon2' : glyph-construction { assign-unicode 0x28B include eMarks - include : create-stroke - :.start-from SB XH - :.heads-to DOWNWARD - :.set-width STROKE 0 - :.line-to SB SMALLSMOOTHB - :.arc-vh-to [MIDDLE + CORRECTION_OMIDS] O - :.arc-hv-to RIGHTSB SMALLSMOOTHA - :.line-to RIGHTSB [XH - HOOK - HALFSTROKE] - :.heads-to UPWARD - include : VerticalHook [RIGHTSB - HALFSTROKE * CORRECTION_HX] [XH - HOOK - HALFSTROKE] [-[RIGHTSB - HALFSTROKE * CORRECTION_HX - MIDDLE]] [-HOOK] + include : LatinUpsilon2Shape XH SMALLSMOOTHA SMALLSMOOTHB } create-glyph 'scriptg' : glyph-construction { assign-unicode 0x261 @@ -501,20 +496,58 @@ create-glyph 'latinIota' : glyph-construction { include capitalMarks include : IotaShape CAP } +create-glyph 'closeomega' : glyph-construction { + assign-unicode 0x277 + include eMarks + local fine : adviceBlackness 3.25 + local x0 : MIDDLE - CORRECTION_OMIDS + local y0 : XH - O + local y1 : mix 0 XH 0.45 + local x1 : SB + O *2 + local y3 : XH / 2 + local y4 : XH * 0.65 + include : spiro { + widths.rhs fine + flat [MIDDLE + fine / 2] y4 [heading DOWNWARD] + curl [MIDDLE + fine / 2] y3 + arcvh 8 + g4 [mix x1 [MIDDLE + fine / 2] 0.5] O [heading LEFTWARD] + archv 8 + g4 x1 y1 + arcvh + g4 x0 y0 + archv + g4 [WIDTH - x1] y1 + arcvh 8 + g4 [mix [WIDTH - x1] [MIDDLE - fine / 2] 0.5] O [heading LEFTWARD] + archv 8 + flat [MIDDLE - fine / 2] y3 + curl [MIDDLE - fine / 2] y4 [heading UPWARD] + } +} +create-glyph 'strenchedC' : glyph-construction { + set-width WIDTH + assign-unicode 0x297 + include pMarks + include : CShape XH DESCENDER +} define [RevSmallEShape top stroke barpos] : glyph-construction { local barbottom [top * [fallback barpos EBARPOS]] local hookx SB local hookmiddle : [mix [RIGHTSB - O] hookx 0.55] + CORRECTION_OMIDS - include : create-stroke - :.start-from [SB + O] barbottom - :.heads-to UPWARD - :.set-width 0 stroke - :.line-to [SB + O] [top - SMALLSMOOTHA] - :.arc-vh-to MIDDLE [top - O] - :.arc-hv-to [RIGHTSB - O] [top - SMALLSMOOTHB] - :.line-to [RIGHTSB - O] SMALLSMOOTHA - include : RevEHookLower 0 SMALLSMOOTHA HOOK + include : spiro { + widths.rhs stroke + flat [SB + O] barbottom [heading UPWARD] + curl [SB + O] [top - SMALLSMOOTHA] + arcvh + g4 MIDDLE [top - O] + archv + flat [RIGHTSB - O] [top - SMALLSMOOTHB] + curl [RIGHTSB - O] SMALLSMOOTHA + hookend O + g4 [SB + O] HOOK + } include : create-stroke :.start-from [SB + [stroke / 2]] barbottom :.set-width stroke 0 @@ -555,6 +588,19 @@ create-glyph 'revglottalstop' : glyph-construction { curl [MIDDLE + HALFSTROKE * CORRECTION_HX] 0 [heading DOWNWARD] } } +create-glyph 'smallglottalstop' : glyph-construction { + assign-unicode 0x242 + include bMarks + include : spiro { + widths.rhs + g4 SB [XH - HOOK] + hookstart XO + g4 RIGHTSB [XH - SMOOTHB] + alsothru 0.5 0.45 [widths HALFSTROKE HALFSTROKE] + flat [MIDDLE - HALFSTROKE * CORRECTION_HX] [XH * 0.15] [widths STROKE 0] + curl [MIDDLE - HALFSTROKE * CORRECTION_HX] 0 [heading DOWNWARD] + } +} create-glyph 'fineglottalstop' : glyph-construction { include bMarks include : spiro { @@ -684,6 +730,8 @@ alias 'alveolarclick' 0x1C3 'exclam' alias 'smcpH' 0x29C 'cyren' alias 'latiniota' 0x269 'iota' alias 'revlatinepsilon' 0x25C 'cyrze' +alias 'lstinSigma' 0x1A9 'Sigma' +alias 'capglottalstop' 0x241 'glottalstop' # Turned glyphs turned nothing 0x2C6F 'A' MIDDLE [CAP / 2] turned nothing 0x250 'a' MIDDLE [XH / 2] diff --git a/glyphs/latin-extend-decorated.patel b/glyphs/latin-extend-decorated.patel index 969bb6d..8105d4c 100644 --- a/glyphs/latin-extend-decorated.patel +++ b/glyphs/latin-extend-decorated.patel @@ -188,6 +188,12 @@ create-glyph 'chooktop' : glyph-construction { include : VBarRight RIGHTSB [XH - HOOK] XH include : VerticalHook [RIGHTSB - HALFSTROKE * CORRECTION_HX] XH HOOKX [-HOOK] } +create-glyph 'Ghooktop' : glyph-construction { + assign-unicode 0x193 + include glyphs.G AS_BASE + include : VBarRight RIGHTSB [CAP - HOOK] CAP + include : VerticalHook [RIGHTSB - HALFSTROKE * CORRECTION_HX] CAP HOOKX [-HOOK] +} create-glyph 'smcpGhooktop' : glyph-construction { assign-unicode 0x29B include glyphs.smcpG AS_BASE