Added below marks /dotBelow; Added above mark /dieresisAbove and /caronAbove
This commit is contained in:
parent
a64f51c74d
commit
9b50c251e7
8 changed files with 2305 additions and 4434 deletions
|
@ -102,10 +102,10 @@ define [tm anchor] : return (
|
||||||
.type anchor.type
|
.type anchor.type
|
||||||
)
|
)
|
||||||
|
|
||||||
define markAboveLower (.anchors (.above [tm (.x MIDDLE .y XH .type BASE)]))
|
define markAboveLower (.anchors (.above [tm (.x MIDDLE .y XH .type BASE)]))
|
||||||
define markAboveCap (.anchors (.above [tm (.x MIDDLE .y CAP .type BASE)]))
|
define markAboveCap (.anchors (.above [tm (.x MIDDLE .y [CAP * 0.97] .type BASE)]))
|
||||||
define markBelowLower (.anchors (.below [tm (.x MIDDLE .y DESCENDER .type BASE)]))
|
define markBelowLower (.anchors (.below [tm (.x MIDDLE .y DESCENDER .type BASE)]))
|
||||||
define markBelowZero (.anchors (.below [tm (.x MIDDLE .y 0 .type BASE)]))
|
define markBelowZero (.anchors (.below [tm (.x MIDDLE .y 0 .type BASE)]))
|
||||||
|
|
||||||
define capitalMarks (.anchors (.above markAboveCap.anchors.above .below markBelowZero.anchors.below))
|
define capitalMarks (.anchors (.above markAboveCap.anchors.above .below markBelowZero.anchors.below))
|
||||||
define bMarks (.anchors (.above markAboveCap.anchors.above .below markBelowZero.anchors.below))
|
define bMarks (.anchors (.above markAboveCap.anchors.above .below markBelowZero.anchors.below))
|
||||||
|
|
6618
buildglyphs.js
6618
buildglyphs.js
File diff suppressed because it is too large
Load diff
2
final.pe
2
final.pe
|
@ -10,7 +10,7 @@ ClearTable('maxp');
|
||||||
Print("Outline Cleanup...");
|
Print("Outline Cleanup...");
|
||||||
AddExtrema();
|
AddExtrema();
|
||||||
RemoveOverlap();
|
RemoveOverlap();
|
||||||
ReplaceWithReference(2, 1);
|
ReplaceWithReference(3, 1);
|
||||||
Simplify(0, 1);
|
Simplify(0, 1);
|
||||||
RoundToInt()
|
RoundToInt()
|
||||||
RemoveOverlap();
|
RemoveOverlap();
|
||||||
|
|
|
@ -5,17 +5,24 @@ define [isAboveMark mark] : mark && mark.anchors && mark.anchors.above && mark.a
|
||||||
foreach code [range 0x00A0 0xFFFF] : if [not unicodeGlyphs`code] : begin {
|
foreach code [range 0x00A0 0xFFFF] : if [not unicodeGlyphs`code] : begin {
|
||||||
local str : String.fromCharCode code
|
local str : String.fromCharCode code
|
||||||
local nfd : str.normalize 'NFD'
|
local nfd : str.normalize 'NFD'
|
||||||
if [nfd.length === 2] : begin {
|
if [nfd.length > 1] : begin {
|
||||||
local base unicodeGlyphs`[nfd.charCodeAt 0]
|
local parts ()
|
||||||
local mark unicodeGlyphs`[nfd.charCodeAt 1]
|
local allFound true
|
||||||
|
local hasMarkAbove false
|
||||||
if [base === glyphs.i && [isAboveMark mark]] : base = glyphs.dotlessi
|
foreach j [range 0 nfd.length] : begin {
|
||||||
if [base === glyphs.j && [isAboveMark mark]] : base = glyphs.dotlessj
|
set parts`j unicodeGlyphs`[nfd.charCodeAt j]
|
||||||
|
if [not parts`j] : set allFound false
|
||||||
if [base && mark] : create-glyph [base.name + '_' + mark.name] : glyph-construction {
|
if [isAboveMark parts`j] : set hasMarkAbove true
|
||||||
assign-unicode code
|
}
|
||||||
include base true
|
if allFound : begin {
|
||||||
include mark
|
if [parts.0 === glyphs.i && hasMarkAbove] : parts.0 = glyphs.dotlessi
|
||||||
|
if [parts.0 === glyphs.j && hasMarkAbove] : parts.0 = glyphs.dotlessj
|
||||||
|
|
||||||
|
create-glyph [parts.map [[part] -> part.name] :.join '_'] : glyph-construction {
|
||||||
|
assign-unicode code
|
||||||
|
include parts.0 BASE
|
||||||
|
foreach part [items-of : parts.slice 1] : include part
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,20 @@
|
||||||
### Combining marks
|
### Combining marks
|
||||||
|
|
||||||
local markExtend [ACCENTX * 0.5]
|
local markExtend [ACCENTX * 0.5]
|
||||||
local markHalfStroke : 0.5 * [Math.min STROKE [ACCENT * 0.6]]
|
local markStress : 0.5 * [Math.min STROKE [ACCENT * 0.6]]
|
||||||
local markFine : markHalfStroke * 0.8
|
local markFine : markStress * 0.8
|
||||||
|
local markHalfStroke : mix markFine markStress 0.5
|
||||||
local markMiddle [-MIDDLE]
|
local markMiddle [-MIDDLE]
|
||||||
local markDotsRadius : DOTRADIUS * markHalfStroke / HALFSTROKE
|
local markDotsRadius : DOTRADIUS * markStress / HALFSTROKE
|
||||||
|
|
||||||
local aboveMarkTop [XH + ACCENT * 1.6 - HALFSTROKE]
|
local aboveMarkTop [XH + ACCENT * 1.375]
|
||||||
local aboveMarkBot [XH + ACCENT - STROKE]
|
local aboveMarkBot [XH + ACCENT * 0.35]
|
||||||
|
|
||||||
|
local belowMarkBot [0 - ACCENT * 1.375]
|
||||||
|
local belowMarkTop [0 - ACCENT * 0.35]
|
||||||
|
|
||||||
|
|
||||||
|
### Above marks
|
||||||
|
|
||||||
create-glyph 'dotAbove' : glyph-construction {
|
create-glyph 'dotAbove' : glyph-construction {
|
||||||
set-width 0
|
set-width 0
|
||||||
|
@ -46,10 +53,10 @@ create-glyph 'graveAbove' : glyph-construction {
|
||||||
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
|
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
|
||||||
|
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
:.start-from [markMiddle + markHalfStroke] aboveMarkBot
|
:.start-from [markMiddle + markStress] aboveMarkBot
|
||||||
:.set-width markFine markFine
|
:.set-width markFine markFine
|
||||||
:.line-to [markMiddle - markExtend] aboveMarkTop
|
:.line-to [markMiddle - markExtend] aboveMarkTop
|
||||||
:.set-width markHalfStroke markHalfStroke
|
:.set-width markStress markStress
|
||||||
:.to-outline
|
:.to-outline
|
||||||
}
|
}
|
||||||
create-glyph 'acuteAbove' : glyph-construction {
|
create-glyph 'acuteAbove' : glyph-construction {
|
||||||
|
@ -58,10 +65,10 @@ create-glyph 'acuteAbove' : glyph-construction {
|
||||||
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
|
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
|
||||||
|
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
:.start-from [markMiddle - markHalfStroke] aboveMarkBot
|
:.start-from [markMiddle - markStress] aboveMarkBot
|
||||||
:.set-width markFine markFine
|
:.set-width markFine markFine
|
||||||
:.line-to [markMiddle + markExtend] aboveMarkTop
|
:.line-to [markMiddle + markExtend] aboveMarkTop
|
||||||
:.set-width markHalfStroke markHalfStroke
|
:.set-width markStress markStress
|
||||||
:.to-outline
|
:.to-outline
|
||||||
}
|
}
|
||||||
create-glyph 'circumflexAbove' : glyph-construction {
|
create-glyph 'circumflexAbove' : glyph-construction {
|
||||||
|
@ -70,18 +77,37 @@ create-glyph 'circumflexAbove' : glyph-construction {
|
||||||
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
|
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
|
||||||
|
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
:.start-from [markMiddle - markExtend - markHalfStroke] aboveMarkBot
|
:.start-from [markMiddle - markExtend - markStress] [aboveMarkBot + markStress - markFine]
|
||||||
:.set-width markHalfStroke markHalfStroke
|
:.set-width markStress markStress
|
||||||
:.line-to markMiddle [aboveMarkTop + markFine * 0.7]
|
:.line-to markMiddle [aboveMarkTop + markFine * 0.7]
|
||||||
:.heads-to UPWARD
|
:.heads-to UPWARD
|
||||||
:.to-outline
|
:.to-outline 0 0 1
|
||||||
|
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
:.start-from [markMiddle + markExtend + markHalfStroke] aboveMarkBot
|
:.start-from [markMiddle + markExtend + markStress] [aboveMarkBot + markStress - markFine]
|
||||||
:.set-width markHalfStroke markHalfStroke
|
:.set-width markStress markStress
|
||||||
:.line-to markMiddle [aboveMarkTop + markFine * 0.7]
|
:.line-to markMiddle [aboveMarkTop + markFine * 0.7]
|
||||||
:.heads-to UPWARD
|
:.heads-to UPWARD
|
||||||
:.to-outline
|
:.to-outline 0 0 1
|
||||||
|
}
|
||||||
|
create-glyph 'caronAbove' : glyph-construction {
|
||||||
|
set-width 0
|
||||||
|
assign-unicode 0x30c
|
||||||
|
set-anchor 'above' MARK markMiddle XH markMiddle aboveMarkTop
|
||||||
|
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from [markMiddle - markExtend - markStress] aboveMarkTop
|
||||||
|
:.set-width markStress markStress
|
||||||
|
:.line-to markMiddle [aboveMarkBot - markFine * 1.7 + markStress]
|
||||||
|
:.heads-to DOWNWARD
|
||||||
|
:.to-outline 0 0 1
|
||||||
|
|
||||||
|
put-shapes : create-stroke
|
||||||
|
:.start-from [markMiddle + markExtend + markStress] aboveMarkTop
|
||||||
|
:.set-width markStress markStress
|
||||||
|
:.line-to markMiddle [aboveMarkBot - markFine * 1.7 + markStress]
|
||||||
|
:.heads-to DOWNWARD
|
||||||
|
:.to-outline 0 0 1
|
||||||
}
|
}
|
||||||
create-glyph 'tildeAbove' : glyph-construction {
|
create-glyph 'tildeAbove' : glyph-construction {
|
||||||
set-width 0
|
set-width 0
|
||||||
|
@ -96,13 +122,13 @@ create-glyph 'tildeAbove' : glyph-construction {
|
||||||
local top : ttop + [markFine * 2]
|
local top : ttop + [markFine * 2]
|
||||||
local bot : tbot - [markFine * 2]
|
local bot : tbot - [markFine * 2]
|
||||||
|
|
||||||
local tildeWave [linreg 40 1.45 52 1.33 markHalfStroke]
|
local tildeWave [linreg 40 1.52 52 1.33 markStress]
|
||||||
local tildeWaveX 0.52
|
local tildeWaveX 0.52
|
||||||
local tildeWaveEnd 0
|
local tildeWaveEnd 0
|
||||||
|
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
:.start-from leftEnd [mix tbot ttop tildeWaveEnd]
|
:.start-from leftEnd [mix tbot ttop tildeWaveEnd]
|
||||||
:.set-width markHalfStroke markHalfStroke
|
:.set-width markStress markStress
|
||||||
:.cubic-to [mix leftEnd rightEnd tildeWaveX] [mix bot top tildeWave] [mix leftEnd rightEnd [1 - tildeWaveX]] [mix bot top [1 - tildeWave]] rightEnd [mix tbot ttop [1 - tildeWaveEnd]]
|
:.cubic-to [mix leftEnd rightEnd tildeWaveX] [mix bot top tildeWave] [mix leftEnd rightEnd [1 - tildeWaveX]] [mix bot top [1 - tildeWave]] rightEnd [mix tbot ttop [1 - tildeWaveEnd]]
|
||||||
:.to-outline 0 0 11
|
:.to-outline 0 0 11
|
||||||
}
|
}
|
||||||
|
@ -115,10 +141,21 @@ create-glyph 'macronAbove' : glyph-construction {
|
||||||
local rightEnd [markMiddle + markExtend * 1.5]
|
local rightEnd [markMiddle + markExtend * 1.5]
|
||||||
|
|
||||||
put-shapes : create-stroke
|
put-shapes : create-stroke
|
||||||
:.start-from leftEnd [mix aboveMarkTop aboveMarkBot 0.5]
|
:.start-from leftEnd [aboveMarkTop - DOTRADIUS]
|
||||||
:.set-width markHalfStroke markHalfStroke
|
:.set-width markHalfStroke markHalfStroke
|
||||||
:.heads-to RIGHTWARD
|
:.heads-to RIGHTWARD
|
||||||
:.line-to rightEnd [mix aboveMarkTop aboveMarkBot 0.5]
|
:.line-to rightEnd [aboveMarkTop - DOTRADIUS]
|
||||||
:.heads-to RIGHTWARD
|
:.heads-to RIGHTWARD
|
||||||
:.to-outline
|
:.to-outline
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### Below marks
|
||||||
|
create-glyph 'dotBelow' : glyph-construction {
|
||||||
|
set-width 0
|
||||||
|
assign-unicode 0x323
|
||||||
|
set-anchor 'below' MARK markMiddle 0 markMiddle belowMarkBot
|
||||||
|
put-shapes : list {
|
||||||
|
Ring [0 - ACCENT + DOTRADIUS] [0 - ACCENT - DOTRADIUS] [markMiddle - DOTRADIUS] [markMiddle + DOTRADIUS]
|
||||||
|
}
|
||||||
}
|
}
|
2
makefile
2
makefile
|
@ -33,7 +33,7 @@ $(SUPPORT_FILES) :
|
||||||
.buildglyphs.all.patel : buildglyphs-intro.patel $(GLYPH_SEGMENTS) buildglyphs-final.patel
|
.buildglyphs.all.patel : buildglyphs-intro.patel $(GLYPH_SEGMENTS) buildglyphs-final.patel
|
||||||
cat $^ > .buildglyphs.all.patel
|
cat $^ > .buildglyphs.all.patel
|
||||||
buildglyphs.js : .buildglyphs.all.patel
|
buildglyphs.js : .buildglyphs.all.patel
|
||||||
patel-c --strict -o $@ $^
|
patel-c --strict $^ | uglifyjs -c -b -o $@
|
||||||
support/glyph.js : support/glyph.patel
|
support/glyph.js : support/glyph.patel
|
||||||
support/stroke.js : support/stroke.patel
|
support/stroke.js : support/stroke.patel
|
||||||
parameters.js : parameters.patel
|
parameters.js : parameters.patel
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
'kappa': 0.515,
|
'kappa': 0.515,
|
||||||
'italicangle': 0,
|
'italicangle': 0,
|
||||||
'longjut': 175,
|
'longjut': 175,
|
||||||
'accent': 175,
|
'accent': 160,
|
||||||
'accentx': 200,
|
'accentx': 200,
|
||||||
'tbalance': 70,
|
'tbalance': 70,
|
||||||
'tbalance2': 30,
|
'tbalance2': 30,
|
||||||
|
|
|
@ -25,8 +25,9 @@ define regular (
|
||||||
.kappa 0.515
|
.kappa 0.515
|
||||||
.italicangle 0
|
.italicangle 0
|
||||||
.longjut 175
|
.longjut 175
|
||||||
.accent 175
|
.accent 160
|
||||||
.accentx 200
|
.accentx 200
|
||||||
|
|
||||||
.tbalance 70
|
.tbalance 70
|
||||||
.tbalance2 30
|
.tbalance2 30
|
||||||
.rbalance 25
|
.rbalance 25
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue