Rebuilt /Omega, /latinUpsilon2, /latinupsilon2 with spiros. time to merge.

This commit is contained in:
be5invis 2015-08-23 06:42:12 +08:00
parent 02d84bc010
commit a92e2039bd
6 changed files with 144 additions and 52 deletions

View file

@ -135,6 +135,7 @@ define [buildFont para recursive] : begin {
define SMOOTHB : SMOOTH + globalTransform.yx * para.smoothadjust define SMOOTHB : SMOOTH + globalTransform.yx * para.smoothadjust
define SMALLSMOOTHA : SMALLSMOOTH - globalTransform.yx * para.smoothadjust define SMALLSMOOTHA : SMALLSMOOTH - globalTransform.yx * para.smoothadjust
define SMALLSMOOTHB : 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_VS : STROKE * globalTransform.yx
define CORRECTION_OMIDX : globalTransform.yx * 1.2 define CORRECTION_OMIDX : globalTransform.yx * 1.2

View file

@ -469,6 +469,41 @@ createFractions : list {
list 0xE0A1 'L' 'N' 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 # Composite superscripts and subscripts
define [doubleSuperscript a b] : glyph-construction { define [doubleSuperscript a b] : glyph-construction {
include a include a

View file

@ -139,19 +139,19 @@ create-glyph 'Psi' : glyph-construction {
} }
define [OmegaShape top sma smb ssma ssmb] : glyph-construction { define [OmegaShape top sma smb ssma ssmb] : glyph-construction {
local fine : STROKE * 0.4 local fine : STROKE * 0.4
include : create-stroke include : spiro {
:.start-from [mix SB RIGHTSB 0.4] STROKE g4 [mix SB RIGHTSB 0.4] STROKE [widths.heading fine 0 LEFTWARD]
:.set-width fine 0 archv
:.heads-to LEFTWARD flat SB ssmb [widths 0 STROKE]
:.arc-hv-to [SB + STROKE * CORRECTION_HX] [ssmb - CORRECTION_VS] curl SB [top - sma]
:.set-width STROKE 0 arcvh
:.line-to [SB + STROKE * CORRECTION_HX] [top - sma - CORRECTION_VS] g4 [MIDDLE - CORRECTION_OMIDS] [top - O]
:.arc-vh-to [MIDDLE - CORRECTION_OMIDS + CORRECTION_VS][top - STROKE] archv
:.arc-hv-to [RIGHTSB - STROKE * CORRECTION_HX] [top - smb + CORRECTION_VS] flat RIGHTSB [top - smb]
:.line-to [RIGHTSB - STROKE * CORRECTION_HX] [ssma + CORRECTION_VS] curl RIGHTSB ssma
:.arc-vh-to [mix RIGHTSB SB 0.4] STROKE arcvh
:.set-width fine 0 g4 [mix RIGHTSB SB 0.4] STROKE [widths.heading fine 0 LEFTWARD]
:.heads-to LEFTWARD }
include : HBar SB [mix SB RIGHTSB 0.4] HALFSTROKE include : HBar SB [mix SB RIGHTSB 0.4] HALFSTROKE
include : HBar [mix RIGHTSB SB 0.4] RIGHTSB HALFSTROKE include : HBar [mix RIGHTSB SB 0.4] RIGHTSB HALFSTROKE
} }

View file

@ -288,20 +288,22 @@ create-glyph 'R' : glyph-construction {
} }
### C G O zero Q U ### 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 { create-glyph 'C' : glyph-construction {
set-width WIDTH set-width WIDTH
assign-unicode 'C' assign-unicode 'C'
include capitalMarks include capitalMarks
include : spiro { include : CShape CAP 0
widths.lhs
g4 RIGHTSB [CAP - HOOK]
hookstart CAPO
flat SB [CAP - SMOOTHA]
curl SB SMOOTHB
hookend O
g4 RIGHTSB HOOK
}
} }
define [GShape top sma smb] : glyph-construction { define [GShape top sma smb] : glyph-construction {
include : spiro { include : spiro {

View file

@ -424,33 +424,28 @@ create-glyph 'latinupsilon1' : glyph-construction {
include : OmegaShape XH SMALLSMOOTHA SMALLSMOOTHB SMALLSMOOTHA SMALLSMOOTHB include : OmegaShape XH SMALLSMOOTHA SMALLSMOOTHB SMALLSMOOTHA SMALLSMOOTHB
include : FlipAround MIDDLE [XH / 2] 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 { create-glyph 'latinUpsilon2' : glyph-construction {
assign-unicode 0x1B2 assign-unicode 0x1B2
include eMarks include eMarks
include : create-stroke include : LatinUpsilon2Shape CAP SMOOTHA SMOOTHB
:.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]
} }
create-glyph 'latinupsilon2' : glyph-construction { create-glyph 'latinupsilon2' : glyph-construction {
assign-unicode 0x28B assign-unicode 0x28B
include eMarks include eMarks
include : create-stroke include : LatinUpsilon2Shape XH SMALLSMOOTHA SMALLSMOOTHB
:.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]
} }
create-glyph 'scriptg' : glyph-construction { create-glyph 'scriptg' : glyph-construction {
assign-unicode 0x261 assign-unicode 0x261
@ -501,20 +496,58 @@ create-glyph 'latinIota' : glyph-construction {
include capitalMarks include capitalMarks
include : IotaShape CAP 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 { define [RevSmallEShape top stroke barpos] : glyph-construction {
local barbottom [top * [fallback barpos EBARPOS]] local barbottom [top * [fallback barpos EBARPOS]]
local hookx SB local hookx SB
local hookmiddle : [mix [RIGHTSB - O] hookx 0.55] + CORRECTION_OMIDS local hookmiddle : [mix [RIGHTSB - O] hookx 0.55] + CORRECTION_OMIDS
include : create-stroke include : spiro {
:.start-from [SB + O] barbottom widths.rhs stroke
:.heads-to UPWARD flat [SB + O] barbottom [heading UPWARD]
:.set-width 0 stroke curl [SB + O] [top - SMALLSMOOTHA]
:.line-to [SB + O] [top - SMALLSMOOTHA] arcvh
:.arc-vh-to MIDDLE [top - O] g4 MIDDLE [top - O]
:.arc-hv-to [RIGHTSB - O] [top - SMALLSMOOTHB] archv
:.line-to [RIGHTSB - O] SMALLSMOOTHA flat [RIGHTSB - O] [top - SMALLSMOOTHB]
include : RevEHookLower 0 SMALLSMOOTHA HOOK curl [RIGHTSB - O] SMALLSMOOTHA
hookend O
g4 [SB + O] HOOK
}
include : create-stroke include : create-stroke
:.start-from [SB + [stroke / 2]] barbottom :.start-from [SB + [stroke / 2]] barbottom
:.set-width stroke 0 :.set-width stroke 0
@ -555,6 +588,19 @@ create-glyph 'revglottalstop' : glyph-construction {
curl [MIDDLE + HALFSTROKE * CORRECTION_HX] 0 [heading DOWNWARD] 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 { create-glyph 'fineglottalstop' : glyph-construction {
include bMarks include bMarks
include : spiro { include : spiro {
@ -684,6 +730,8 @@ alias 'alveolarclick' 0x1C3 'exclam'
alias 'smcpH' 0x29C 'cyren' alias 'smcpH' 0x29C 'cyren'
alias 'latiniota' 0x269 'iota' alias 'latiniota' 0x269 'iota'
alias 'revlatinepsilon' 0x25C 'cyrze' alias 'revlatinepsilon' 0x25C 'cyrze'
alias 'lstinSigma' 0x1A9 'Sigma'
alias 'capglottalstop' 0x241 'glottalstop'
# Turned glyphs # Turned glyphs
turned nothing 0x2C6F 'A' MIDDLE [CAP / 2] turned nothing 0x2C6F 'A' MIDDLE [CAP / 2]
turned nothing 0x250 'a' MIDDLE [XH / 2] turned nothing 0x250 'a' MIDDLE [XH / 2]

View file

@ -188,6 +188,12 @@ create-glyph 'chooktop' : glyph-construction {
include : VBarRight RIGHTSB [XH - HOOK] XH include : VBarRight RIGHTSB [XH - HOOK] XH
include : VerticalHook [RIGHTSB - HALFSTROKE * CORRECTION_HX] XH HOOKX [-HOOK] 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 { create-glyph 'smcpGhooktop' : glyph-construction {
assign-unicode 0x29B assign-unicode 0x29B
include glyphs.smcpG AS_BASE include glyphs.smcpG AS_BASE