Improve Cedilla placement and connection in T-Cedilla (#737).

This commit is contained in:
be5invis 2020-11-15 11:01:22 -08:00
parent 515a3d25af
commit 1425bc750e
3 changed files with 48 additions and 12 deletions

View file

@ -158,6 +158,21 @@ glyph-block Letter-Shared-Shapes : begin
define [FlatHookDepthImpl sHook sStroke] : begin
return : Math.max (sHook * Hook) (sStroke * Stroke * 1.375) : Math.min (sHook * Hook) (sStroke * Stroke * 1.75)
glyph-block-export ConnectedCedilla
define [ConnectedCedilla src sel] : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
include : difference
new-glyph : glyph-proc
include [refer-glyph src] AS_BASE ALSO_METRICS
currentGlyph.clearGeometry
include : refer-glyph 'cedillaExtShapeBelow'
WithTransform [Translate (Stroke * 0.25 * TanSlope) (Stroke * 0.25)] [refer-glyph src]
WithTransform [Translate (Stroke * 0.50 * TanSlope) (Stroke * 0.50)] [refer-glyph src]
WithTransform [Translate (Stroke * 0.75 * TanSlope) (Stroke * 0.75)] [refer-glyph src]
WithTransform [Translate (Stroke * 1.00 * TanSlope) (Stroke * 1.00)] [refer-glyph src]
WithTransform [Translate (Stroke * 1.25 * TanSlope) (Stroke * 1.25)] [refer-glyph src]
include : refer-glyph 'blankBelow'
glyph-block Letter-Latin-Upper-I : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
@ -6305,7 +6320,7 @@ glyph-block Letter-Latin-Lower-T : begin
glyph-block-import CommonShapes
glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared : CreateCommaCaronComposition
glyph-block-import Letter-Shared-Shapes : CurlyTail FlatHookDepth
glyph-block-import Letter-Shared-Shapes : CurlyTail FlatHookDepth ConnectedCedilla
define xSmallTBarLeft : Middle - TBalance - Stroke * 0.5 * HVContrast
define [SmallTHookShapeT sink offset top bot sw] : begin
@ -6369,6 +6384,7 @@ glyph-block Letter-Latin-Lower-T : begin
curl xBarLeft top [heading Upward]
set-base-anchor 'topright' xCrossRight CAP
set-base-anchor 'overlay' (xBarLeft + 0.625 * Stroke * HVContrast) (XH * 0.6)
set-base-anchor 'below' (HalfStroke * HVContrast + [Math.min (xBarLeft + hd.x / 2) (xCrossRight - 1)]) 0
create-glyph 't.flatHook' : glyph-proc
include : MarkSet.b
@ -6415,6 +6431,7 @@ glyph-block Letter-Latin-Lower-T : begin
include : VBarLeft xSmallTBarLeft 0 CAP
include : HCrossBar.top xSmallTBarLeft (Middle + LongJut) XH
set-base-anchor 'overlay' (xSmallTBarLeft + 0.625 * Stroke * HVContrast) (XH * 0.6)
set-base-anchor 'below' (xSmallTBarLeft + HalfStroke * HVContrast) 0
select-variant 't' 't'
@ -6429,6 +6446,8 @@ glyph-block Letter-Latin-Lower-T : begin
CreateCommaCaronComposition 't' 'tcaron' 0x165
with-related-glyphs 't' 'tCedilla' 0x163 ConnectedCedilla
create-glyph 'tltail' 0x1AB : glyph-proc
include : MarkSet.if
include : refer-glyph 't.standard'

View file

@ -742,16 +742,18 @@ glyph-block Marks : begin
g4 (right - braceDepth) aboveMarkBot
### Below marks
create-glyph 'cedillaBelow' 0x327 : glyph-proc
create-glyph 'blankBelow' : glyph-proc
set-width 0
set-mark-anchor 'below' markMiddle 0 markMiddle belowMarkBot
set-base-anchor 'belowBrace' markMiddle belowMarkMid
define [CedillaShape ext] : begin
local fine : Math.min markHalfStroke ((belowMarkTop - belowMarkBot) * 0.25)
local cedillaTop (belowMarkTop + fine * 0.85)
local cedillaBot belowMarkBot
include : dispiro
return : union
VBar markMiddle ext (cedillaTop - fine) (fine * 2)
dispiro
flat (markMiddle - fine * HVContrast) cedillaTop [widths.heading 0 (fine * 2) Rightward]
curl markMiddle cedillaTop [heading Rightward]
archv
@ -759,7 +761,18 @@ glyph-block Marks : begin
arcvh
flat markMiddle cedillaBot [heading Leftward]
curl (markMiddle - markExtend) cedillaBot [heading Leftward]
include : VBar markMiddle 0 (cedillaTop - fine) (fine * 2)
create-glyph 'cedillaExtShapeBelow' : glyph-proc
set-width 0
set-mark-anchor 'below' markMiddle 0 markMiddle belowMarkBot
set-base-anchor 'belowBrace' markMiddle belowMarkMid
include : CedillaShape Stroke
create-glyph 'cedillaBelow' 0x327 : glyph-proc
set-width 0
set-mark-anchor 'below' markMiddle 0 markMiddle belowMarkBot
set-base-anchor 'belowBrace' markMiddle belowMarkMid
include : CedillaShape 0
define [OgonekBelowShape] : glyph-proc
local fine : markHalfStroke * [linreg 16 1 90 0.25 (markHalfStroke * 2)]

View file

@ -229,6 +229,10 @@ module.exports = class Glyph {
];
rankSet.add(this);
}
clearGeometry() {
this.contours = [];
this.semanticInclusions = [];
}
// Anchors
setBaseAnchor(id, x, y) {