Fix incorrect serif shape for motion-serifed m under semi-proportional subfamilies.

This commit is contained in:
be5invis 2021-03-08 21:32:51 -08:00
parent ffd6151eb0
commit ae374c3ff8
6 changed files with 64 additions and 44 deletions

1
changes/5.0.6.md Normal file
View file

@ -0,0 +1 @@
* Fix incorrect serif shape for motion-serifed `m` under semi-proportional subfamilies.

View file

@ -182,7 +182,7 @@ glyph-block Letter-Latin-K : begin
then : dispiro then : dispiro
flat xDTStart dim.arcTerminalY [widths.center swDiagTailAdj] flat xDTStart dim.arcTerminalY [widths.center swDiagTailAdj]
curl (xDTEnd + 0.125 * [DiagonalTailInnerRadius]) (0.9 * swDiagTail + 0.5 *[DiagonalTailInnerRadius]) curl (xDTEnd + 0.125 * [DiagonalTailInnerRadius]) (0.9 * swDiagTail + 0.5 *[DiagonalTailInnerRadius])
DiagonalTailF 1 [DivFrame 1] xDTEnd 0 (Hook - swDiagTail * 0.375) swDiagTail DiagonalTailF 1 [DivFrame 1] xDTEnd 0 50 (Hook) swDiagTail
else : intersection else : intersection
Rect XH 0 0 [if slab (dim.slabStartX + SideJut) (Width * 2)] Rect XH 0 0 [if slab (dim.slabStartX + SideJut) (Width * 2)]
dispiro dispiro

View file

@ -93,11 +93,7 @@ glyph-block Letter-Latin-Lower-M : begin
include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs
define [SmallMBottomMotionRightSerif df top rbot] : glyph-proc define [SmallMBottomMotionRightSerif df top rbot] : glyph-proc
if (df.width > para.refJut * 7) : begin include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs
include : tagged 'serifRB' : begin
CenterBottomSerif (df.rightSB - 0.5 * df.mvs * HVContrast) rbot Jut df.mvs
: else : begin
include : tagged 'serifRB' : RightwardBottomSerif df.rightSB rbot SideJut df.mvs
define [SmallMSerifs df top lbot mbot rbot tailed earless] : glyph-proc define [SmallMSerifs df top lbot mbot rbot tailed earless] : glyph-proc
if [not earless] : include : SmallMTopLeftSerif df top lbot if [not earless] : include : SmallMTopLeftSerif df top lbot

View file

@ -117,36 +117,48 @@ glyph-block Letter-Latin-V : begin
flat xBar top [heading Downward] flat xBar top [heading Downward]
curl xBar ((sw + rInY) * (1 + TanSlope)) curl xBar ((sw + rInY) * (1 + TanSlope))
arcvh arcvh
g2 (xBar + sw * HVContrast + rInY * HVContrast + TanSlope * sw) O g2.right.mid (xBar + sw * HVContrast + rInY * HVContrast + TanSlope * sw) O
archv.superness 2 archv.superness 2
g4 xArcRight yArcRight g4 xArcRight yArcRight
g4 xArcEnd yArcEnd g4 xArcEnd yArcEnd
create-glyph : glyph-proc create-glyph 'V.straight' : glyph-proc
include : MarkSet.capital include : MarkSet.capital
create-derived 'V.straight' : VShape [DivFrame 1] CAP Stroke true include : VShape [DivFrame 1] CAP Stroke true
create-derived 'V.curly' : VShape [DivFrame 1] CAP Stroke false create-glyph 'V.curly' : glyph-proc
create-derived 'V.straightMotionSerifed' : composite-proc include : MarkSet.capital
VShape [DivFrame 1] CAP Stroke true (slab -- false) include : VShape [DivFrame 1] CAP Stroke false
LeftwardTopSerif SB CAP SideJut create-glyph 'V.straightMotionSerifed' : glyph-proc
create-derived 'V.curlyMotionSerifed' : composite-proc include : MarkSet.capital
VShape [DivFrame 1] CAP Stroke false (slab -- false) include : VShape [DivFrame 1] CAP Stroke true (slab -- false)
LeftwardTopSerif SB CAP SideJut include : LeftwardTopSerif SB CAP SideJut
create-glyph 'V.curlyMotionSerifed' : glyph-proc
include : MarkSet.capital
include : VShape [DivFrame 1] CAP Stroke false (slab -- false)
include : LeftwardTopSerif SB CAP SideJut
create-glyph : glyph-proc create-glyph 'v.straight' : glyph-proc
include : MarkSet.e include : MarkSet.e
create-derived 'v.straight' : VShape [DivFrame 1] XH Stroke true include : VShape [DivFrame 1] XH Stroke true
create-derived 'v.curly' : VShape [DivFrame 1] XH Stroke false create-glyph 'v.curly' : glyph-proc
create-derived 'v.cursive' : VCursiveShape 0 XH Stroke include : MarkSet.e
create-derived 'v.straightMotionSerifed' : composite-proc include : VShape [DivFrame 1] XH Stroke false
VShape [DivFrame 1] XH Stroke true (slab -- false) create-glyph 'v.cursive' : glyph-proc
LeftwardTopSerif SB XH SideJut include : MarkSet.e
create-derived 'v.curlyMotionSerifed' : composite-proc include : VCursiveShape 0 XH Stroke
VShape [DivFrame 1] XH Stroke false (slab -- false) create-glyph 'v.straightMotionSerifed' : glyph-proc
LeftwardTopSerif SB XH SideJut include : MarkSet.e
create-derived 'v.cursiveMotionSerifed' : composite-proc include : VShape [DivFrame 1] XH Stroke true (slab -- false)
VCursiveShape (1 / 32) XH Stroke include : LeftwardTopSerif SB XH SideJut
LeftwardTopSerif [VCursiveShapeBarPos (1 / 32)] XH (SideJut + [VCursiveShapeBarPos (1 / 32)] - SB) create-glyph 'v.curlyMotionSerifed' : glyph-proc
include : MarkSet.e
include : VShape [DivFrame 1] XH Stroke false (slab -- false)
include : LeftwardTopSerif SB XH SideJut
create-glyph 'v.cursiveMotionSerifed' : glyph-proc
local pxBar : 1 / 16
include : MarkSet.e
include : VCursiveShape pxBar XH Stroke
include : LeftwardTopSerif [VCursiveShapeBarPos pxBar] XH (SideJut + [VCursiveShapeBarPos pxBar] - SB)
define [VHooktopShape df barStraight top] : glyph-proc define [VHooktopShape df barStraight top] : glyph-proc

View file

@ -299,6 +299,8 @@ glyph-block Letter-Shared-Shapes : begin
VBarRight cx (cy - hookY + O * 2) cy sw VBarRight cx (cy - hookY + O * 2) cy sw
VerticalHook (cx - sw / 2 * HVContrast) cy hookX (-hookY) sw VerticalHook (cx - sw / 2 * HVContrast) cy hookX (-hookY) sw
define DiagTailDefaultAngle 40
glyph-block-export DiagonalTailStdDepth glyph-block-export DiagonalTailStdDepth
define [DiagonalTailStdDepth df sw] : Math.max (0.5 * sw) define [DiagonalTailStdDepth df sw] : Math.max (0.5 * sw)
df.div * [Math.hypot HookX Hook] - 0.25 * sw df.div * [Math.hypot HookX Hook] - 0.25 * sw
@ -307,30 +309,38 @@ glyph-block Letter-Shared-Shapes : begin
define [DiagonalTailInnerRadius] : Math.max (XH / 32) (0.5 * [AdviceStroke2 24 32 XH]) define [DiagonalTailInnerRadius] : Math.max (XH / 32) (0.5 * [AdviceStroke2 24 32 XH])
glyph-block-export DiagonalTailF glyph-block-export DiagonalTailF
define [DiagonalTailF sign df cx cy depth sw] : begin define [DiagonalTailF sign df cx cy angle depth sw] : begin
define tailAngle : angle / 180 * Math.PI
define sinAngle : Math.sin tailAngle
define cosAngle : Math.cos tailAngle
define mocFine : [AdviceStroke 3] / Stroke * sw define mocFine : [AdviceStroke 3] / Stroke * sw
define mocSwMid : mix sw mocFine (2 / 3) define mocSwMid : mix sw mocFine (2 / 3)
define fine : mocFine / [mix 1 HVContrast 0.375] define fine : mocFine / [mix 1 HVContrast 0.375]
define swMid : mix sw fine 0.7 define swMid : mix sw fine 0.7
define rInY : DiagonalTailInnerRadius define rIn : DiagonalTailInnerRadius
define rInX : 1 * rInY define rTurn : rIn + 0.5 * mocFine * cosAngle * HVContrast
define InvSqrt2 : 1 / [Math.sqrt 2]
define dxTurn : 0.5 * sw * HVContrast + rInX * df.div define dxTurn : 0.5 * sw * HVContrast + rIn * df.div
define dxTurnObl : if (sign > 0) (-0.75 * TanSlope * rInY) 0 define dxTurnObl : if (sign > 0) (-0.75 * TanSlope * rIn) 0
define dyTurn : 0.5 * mocSwMid define dyTurn : 0.5 * mocSwMid
define dxTailStart : dxTurn + InvSqrt2 * rInX + InvSqrt2 * 0.5 * mocFine * HVContrast define dxTailStart : dxTurn + sinAngle * rTurn
define dyTailStart : dyTurn + (1 - InvSqrt2 + [if (sign > 0) 0 (TanSlope)]) * (0.5 * mocFine + rInY) define dyTailStart : dyTurn + (1 - cosAngle + [if (sign > 0) 0 (TanSlope)]) * rTurn
define dxyDepth : (depth - 0.5 * sw) * InvSqrt2 define dxDepth : (depth - 0.5 * sw) * cosAngle
define dyDepth : (depth - 0.5 * sw) * sinAngle
return : list return : list
g2 g2.[if (sign > 0) "right" "left"].mid
cx + sign * dxTurn + dxTurnObl cx + sign * dxTurn + dxTurnObl
cy + O + dyTurn cy + O + dyTurn
if (sign > 0) if (sign > 0)
widths.center.heading swMid Rightward widths.center.heading swMid Rightward
widths.center.heading swMid Leftward widths.center.heading swMid Leftward
if (sign > 0) [alsoThru.g2 0.541 (1 - 0.76) [widths.center : mix swMid fine 0.52]] {} if (sign <= 0) {} : alsoThru.g2
[Math.sin (tailAngle / 2)] / [Math.sin tailAngle]
(1 - [Math.cos (tailAngle / 2)]) / (1 - [Math.cos tailAngle])
widths.center : mix swMid fine (1 / 2)
flat (cx + sign * dxTailStart) (cy + O + dyTailStart) [widths.center fine] flat (cx + sign * dxTailStart) (cy + O + dyTailStart) [widths.center fine]
curl (cx + sign * dxTailStart + sign * dxyDepth) (cy + O + dyTailStart + dxyDepth) curl (cx + sign * dxTailStart + sign * dxDepth) (cy + O + dyTailStart + dyDepth)
glyph-block-export DiagonalTailR glyph-block-export DiagonalTailR
define [DiagonalTailR df cx cy depth sw] : begin define [DiagonalTailR df cx cy depth sw] : begin
@ -338,7 +348,7 @@ glyph-block Letter-Shared-Shapes : begin
return : list return : list
curl cx (cy + sw + rInY) curl cx (cy + sw + rInY)
arcvh 8 arcvh 8
DiagonalTailF (+1) df cx cy depth sw DiagonalTailF (+1) df cx cy DiagTailDefaultAngle depth sw
glyph-block-export DiagonalTailL glyph-block-export DiagonalTailL
define [DiagonalTailL df cx cy depth sw] : begin define [DiagonalTailL df cx cy depth sw] : begin
@ -346,4 +356,4 @@ glyph-block Letter-Shared-Shapes : begin
return : list return : list
curl cx (cy + sw + rInY) curl cx (cy + sw + rInY)
arcvh 8 arcvh 8
DiagonalTailF (-1) df cx cy depth sw DiagonalTailF (-1) df cx cy DiagTailDefaultAngle depth sw

View file

@ -75,7 +75,8 @@ const RawPlans = computed(`metadata:raw-plans`, async target => {
if (fs.existsSync(PRIVATE_BUILD_PLANS)) { if (fs.existsSync(PRIVATE_BUILD_PLANS)) {
const privateBP = await tryParseToml(PRIVATE_BUILD_PLANS); const privateBP = await tryParseToml(PRIVATE_BUILD_PLANS);
Object.assign(bp.buildPlans, privateBP.buildPlans); Object.assign(bp.buildPlans, privateBP.buildPlans || {});
Object.assign(bp.collectPlans, privateBP.collectPlans || {});
Object.assign(bp.buildOptions, privateBP.buildOptions || {}); Object.assign(bp.buildOptions, privateBP.buildOptions || {});
} }
return bp; return bp;