Refinements

This commit is contained in:
be5invis 2023-11-13 02:41:50 -08:00
parent e806120dcb
commit fadc3603b3
9 changed files with 49 additions and 45 deletions

View file

@ -259,6 +259,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
local lf : XLetterForm df top bot stroke1f stroke2 turn tension
sw -- df.mvs
swCursiveEnd -- [AdviceStroke 3 df.div]
swCursiveCoEnd -- df.mvs
swCursiveMid -- df.mvs
include : WithSerifOverflowMask fMaskBase top bot df.leftSB df.rightSB : lf.base fMaskBase
if serifShape : begin

View file

@ -322,7 +322,7 @@ glyph-block Letter-Latin-K : begin
dispiro
flat xDTStart dim.arcTerminalY [widths.center swDiagTailAdj]
curl (xDTEnd + 0.125 * dtInnerRadius) (0.9 * swDiagTail + 0.5 * dtInnerRadius)
DiagonalTailF 1 [DivFrame 1] xDTEnd 0 dtInnerRadius tailAngle (Hook + swDiagTail / 4) swDiagTail
DiagonalTailF 1 xDTEnd 0 dtInnerRadius tailAngle (Hook + swDiagTail / 4) swDiagTail
CursiveLoopT spiro-outline (-O) left right stroke top slabLT slabLegs
define [KHookTopBar slabLegs straightBar] : TopHook.lBarInner

View file

@ -52,7 +52,7 @@ glyph-block Letter-Latin-Lower-F : begin
local xBarMiddle : barLeft + [HSwToV HalfStroke]
return : dispiro
flat xBarMiddle 0.1 [widths.center.heading Stroke Downward]
DiagonalTailL df xBarMiddle Descender [DiagonalTailStdDepth df Stroke] Stroke
DiagonalTailL xBarMiddle Descender [DiagonalTailStdDepth df Stroke] Stroke
glyph-block-export StdSmallFBarLeftPos
define [StdSmallFBarLeftPos barAtCenter] : [mix SB RightSB : if barAtCenter 0.45 0.35] - Stroke * [if barAtCenter 0.45 0.25] * HVContrast

View file

@ -133,7 +133,7 @@ glyph-block Letter-Latin-Lower-I : begin
include : dispiro
widths.center df.mvs
flat xMiddle top [heading Downward]
DiagonalTailR df xMiddle 0 [DiagonalTailStdDepth df df.mvs] df.mvs
DiagonalTailR xMiddle 0 [DiagonalTailStdDepth df df.mvs] df.mvs
export : define [PhoneticLeft df top xMiddle] : glyph-proc
include : dispiro

View file

@ -71,7 +71,7 @@ glyph-block Letter-Latin-Lower-J : begin
include : dispiro
widths.center
flat xMiddle top [heading Downward]
DiagonalTailL df xMiddle Descender [DiagonalTailStdDepth dfHook Stroke] Stroke
DiagonalTailL xMiddle Descender [DiagonalTailStdDepth dfHook Stroke] Stroke
set-base-anchor "trailing" (xMiddle - [HSwToV HalfStroke]) Descender
define Serifs : namespace

View file

@ -22,7 +22,7 @@ glyph-block Letter-Latin-Lower-Q : begin
local xMid : x0 - [HSwToV HalfStroke]
return : dispiro
flat xMid yt [widths.center.heading Stroke Downward]
DiagonalTailR df xMid yb (0.875 * Hook - Stroke * 0.375) Stroke
DiagonalTailR xMid yb (0.875 * Hook - Stroke * 0.375) Stroke
define [EaredBody terminal top bottom] : glyph-proc
set-base-anchor 'trailing' (RightSB - markHalfStroke) Descender

View file

@ -85,7 +85,7 @@ glyph-block Letter-Latin-Lower-T : begin
local hookDepth : [if (sym === SYM-LEFT) 1.375 1] * [DiagonalTailStdDepth [DivFrame : Math.sqrt df.div] sw] - [HSwToV HalfStroke]
return : dispiro
flat xMid top [widths.center.heading sw Downward]
DiagonalTailR df xMid bot hookDepth sw
DiagonalTailR xMid bot hookDepth sw
###########################################################################################

View file

@ -76,45 +76,46 @@ glyph-block Letter-Latin-X : begin
glyph-block-export XCursiveHalfShape
define [XCursiveHalfShape] : with-params [
top bottom left right
[sw Stroke] [swEnd : AdviceStroke 2.75] [swMid : AdviceStroke 3]
[kThin 0.55] [setMark false] [flatTail false]
[swMid : AdviceStroke 2.75]
[swEnd : AdviceStroke 3]
[swCoEnd : AdviceStroke 2]
[setMark false] [flatTail false]
] : glyph-proc
local ada : ArchDepthAOf (ArchDepth * 0.8) (Width / 2)
local adb : ArchDepthBOf (ArchDepth * 0.8) (Width / 2)
local div : (right - left) / (RightSB - Middle)
local divHook : Math.min div 1
define xCenterRight : left + [HSwToV swMid] / 2
define xTurn : mix (right - [HSwToV swEnd]) xCenterRight 0.5
define hook1Depth : Math.max (sw * 2) (div * (Hook + sw * 0.125))
define hook1StraightDepth : Math.min
hook1Depth - swEnd * 1.125
Math.max 1 : hook1Depth / 5 - swEnd / 4
define fineMid : swMid * kThin
define rIn : Math.max (0.4 * (right - left) - [HSwToV : 0.7 * sw]) [AdviceStroke 16]
define flatHookDepth : 1.4 * (right - left) - swEnd - 1.5 * rIn
define upperHalf : include : dispiro
flat (xCenterRight - [HSwToV fineMid]) ([mix bottom top 0.5] + O) [widths.rhs.heading fineMid Upward]
curl (xCenterRight - [HSwToV fineMid]) (top - ada)
local fineMid : 0.55 * swMid
local xMidBarRightEdge : left + [HSwToV swMid] / 2
local xUpperTurn : mix (right - [HSwToV swEnd]) xMidBarRightEdge 0.5
local upperHookDepth : Math.max (swEnd * 2) ([Math.sqrt divHook] * (Hook + swEnd * 0.125))
local upperHookStraightDepth : Math.min
upperHookDepth - swEnd * 1.125
Math.max 1 : upperHookDepth / 5 - swEnd / 4
local upperHalf : include : dispiro
flat (xMidBarRightEdge - [HSwToV fineMid]) ([mix bottom top 0.5] + O) [widths.rhs.heading fineMid Upward]
curl (xMidBarRightEdge - [HSwToV fineMid]) (top - ada)
arcvh
ShoulderMidKnotRhs xTurn (top - O) fineMid swEnd (+1) (-1)
ShoulderMidKnotRhs xUpperTurn (top - O) fineMid swEnd (+1) (-1)
archv
flat (right - OX) (top - hook1Depth + hook1StraightDepth) [heading Downward]
curl (right - OX) (top - hook1Depth) [heading Downward]
flat (right - OX) (top - upperHookDepth + upperHookStraightDepth) [heading Downward]
curl (right - OX) (top - upperHookDepth) [heading Downward]
define lowerHalf : include : if flatTail
local rIn : Math.max [AdviceStroke 16] (0.4 * (right - left) - [HSwToV : 0.5 * swMid])
local flatHookDepth : 1.3 * (right - left) - (0.5 - TanSlope) * swEnd - 1.5 * (rIn + 0.5 * swMid)
local lowerHalf : include : if flatTail
dispiro
flat (xCenterRight - [HSwToV fineMid]) ([mix bottom top 0.5] - O) [widths.lhs fineMid]
curl (xCenterRight - [HSwToV fineMid]) (bottom + [Math.min adb (swMid + rIn)])
flat (xMidBarRightEdge - [HSwToV fineMid]) ([mix bottom top 0.5] - O) [widths.lhs fineMid]
curl (xMidBarRightEdge - [HSwToV fineMid]) (bottom + [Math.min adb (swMid + rIn)])
arcvh
flat (xCenterRight + div * (0.5 * swMid + rIn) + 0.25 * TanSlope * (0.5 * swMid + rIn)) bottom [widths.lhs.heading sw Rightward]
flat (xMidBarRightEdge + div * (0.5 * swMid + rIn) + 0.25 * TanSlope * (0.5 * swMid + rIn)) bottom [widths.lhs.heading swCoEnd Rightward]
curl right bottom
dispiro
flat (xCenterRight - [HSwToV : 0.5 * fineMid]) ([mix bottom top 0.5] - O) [widths.center fineMid]
curl (xCenterRight - [HSwToV : 0.5 * fineMid]) (bottom + [Math.min adb (swMid + rIn)])
flat (xMidBarRightEdge - [HSwToV : 0.5 * fineMid]) ([mix bottom top 0.5] - O) [widths.center fineMid]
curl (xMidBarRightEdge - [HSwToV : 0.5 * fineMid]) (bottom + [Math.min adb (swMid + rIn)])
arcvh 16
DiagonalTailF 1 [DivFrame div] (xCenterRight - [HSwToV : 0.5 * sw] + TanSlope * rIn) bottom rIn 50 flatHookDepth sw
DiagonalTailF 1 (xMidBarRightEdge - [HSwToV : 0.5 * swCoEnd] + TanSlope * rIn) bottom rIn 50 flatHookDepth swCoEnd
if setMark : begin
define lowerHalfLastKnot lowerHalf.rhsKnots.(lowerHalf.rhsKnots.length - 1)
@ -132,8 +133,9 @@ glyph-block Letter-Latin-X : begin
stroke1 stroke2
turn tension
[sw df.mvs]
[swCursiveEnd : (sw / Stroke) * [AdviceStroke 2.75]]
[swCursiveMid : (sw / Stroke) * [AdviceStroke 3]]
[swCursiveMid : (sw / Stroke) * [AdviceStroke 2.75]]
[swCursiveEnd : (sw / Stroke) * [AdviceStroke 3]]
[swCursiveCoEnd : (sw / Stroke) * [AdviceStroke 2]]
] : namespace
local sw df.mvs
export : define [base fSlab] : union
@ -143,7 +145,7 @@ glyph-block Letter-Latin-X : begin
[Just STROKE-CHANCERY] : XChanceryStrand (-1) df.leftSB bot df.rightSB top false sw
([Just STROKE-CURSIVE] || [Just STROKE-CURSIVE-FLAT]) : composite-proc
XCursiveHalfShape top bot df.middle df.rightSB
sw -- sw
swCoEnd -- swCursiveCoEnd
swEnd -- swCursiveEnd
swMid -- swCursiveMid
flatTail -- (stroke1 === STROKE-CURSIVE-FLAT)
@ -154,7 +156,7 @@ glyph-block Letter-Latin-X : begin
[Just STROKE-CURLY] : XStrand false fSlab df.leftSB top df.rightSB bot turn 0.4 tension sw
[Just STROKE-CHANCERY] : XChanceryStrand (+1) df.leftSB top df.rightSB bot false sw
[Just STROKE-CURSIVE] : XCursiveHalfShape top bot df.middle df.rightSB
sw -- sw
swCoEnd -- swCursiveCoEnd
swEnd -- swCursiveEnd
swMid -- swCursiveMid
setMark -- true
@ -174,7 +176,7 @@ glyph-block Letter-Latin-X : begin
[Just STROKE-CURLY] : HalfXStrand false fSlab df.rightSB bot df.middle midy turn 0.4 tension sw
[Just STROKE-CHANCERY] : XChanceryStrand (+1) df.leftSB top df.rightSB bot true sw
[Just STROKE-CURSIVE] : XCursiveHalfShape top bot df.middle df.rightSB
sw -- sw
swCoEnd -- swCursiveCoEnd
swEnd -- swCursiveEnd
swMid -- swCursiveMid
setMark -- true

View file

@ -613,7 +613,7 @@ glyph-block Letter-Shared-Shapes : begin
define [DiagonalTailInnerRadius] : Math.max (XH / 32) (0.5 * [AdviceStroke2 24 32 XH])
glyph-block-export DiagonalTailF
define [DiagonalTailF sign df cx cy rIn angle depth sw] : begin
define [DiagonalTailF sign cx cy rIn angle depth sw] : begin
define tailAngle : angle / 180 * Math.PI
define sinAngle : Math.sin tailAngle
define cosAngle : Math.cos tailAngle
@ -623,7 +623,7 @@ glyph-block Letter-Shared-Shapes : begin
define fine : mocFine / [mix 1 HVContrast 0.375]
define swMid : mix sw fine 0.7
define dxTurn : [HSwToV : 0.5 * sw] + rIn * df.div
define dxTurn : [HSwToV : 0.5 * sw] + rIn
define dxTurnObl : 0.75 * TanSlope * rIn
define dyTurn : 0.5 * mocSwMid
define dxTailStart : dxTurn + sinAngle * (rIn + 0.5 * mocFine * [mix 1 HVContrast sinAngle])
@ -648,26 +648,27 @@ glyph-block Letter-Shared-Shapes : begin
# widths.center : mix swMid fine (1 / 2)
flat (cx + sign * dxTailStart) (cy + O + dyTailStart) [widths.center fine]
curl (cx + sign * dxTailStart + sign * dxDepth) (cy + O + dyTailStart + dyDepth)
define [DiagonalTailFArc2K tailAngle t] : list
[Math.sin (t * tailAngle)] / [Math.sin tailAngle]
(1 - [Math.cos (t * tailAngle)]) / (1 - [Math.cos tailAngle])
begin t
glyph-block-export DiagonalTailR
define [DiagonalTailR df cx cy depth sw] : begin
define [DiagonalTailR cx cy depth sw] : begin
define rInY : DiagonalTailInnerRadius
return : list
curl cx (cy + sw + rInY)
arcvh 8
DiagonalTailF (+1) df cx cy rInY DiagTailDefaultAngle depth sw
DiagonalTailF (+1) cx cy rInY DiagTailDefaultAngle depth sw
glyph-block-export DiagonalTailL
define [DiagonalTailL df cx cy depth sw] : begin
define [DiagonalTailL cx cy depth sw] : begin
define rInY : DiagonalTailInnerRadius
return : list
curl cx (cy + sw + rInY)
arcvh 8
DiagonalTailF (-1) df cx cy rInY DiagTailDefaultAngle depth sw
DiagonalTailF (-1) cx cy rInY DiagTailDefaultAngle depth sw
define [JutIn left right jut swRef hSplit] : begin
local ink : HSwToV swRef