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 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

View File

@ -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

View File

@ -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
}

View File

@ -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 {

View File

@ -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]

View File

@ -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