Optimize inner stroke width under monospace.

This commit is contained in:
John McWilliams 2025-04-08 08:38:52 -04:00
parent b7e186ec78
commit 7e2470a055

View file

@ -20,6 +20,7 @@ glyph-block Letter-Armenian-To : begin
local df : include : DivFrame para.advanceScaleT local df : include : DivFrame para.advanceScaleT
include : df.markSet.capital include : df.markSet.capital
local fine : df.adviceStroke2 3 3 XH local fine : df.adviceStroke2 3 3 XH
local cofine : Math.min fine : VSwToH : (df.rightSB - df.leftSB) / 2 - [HSwToV df.mvs]
local barPosT : barPos + fine / 2 local barPosT : barPos + fine / 2
include : dispiro include : dispiro
widths.rhs df.mvs widths.rhs df.mvs
@ -27,10 +28,10 @@ glyph-block Letter-Armenian-To : begin
curl df.leftSB [if (df.archDepthA + df.archDepthB < CAP) (CAP - df.archDepthA) : mix CAP 0 (df.archDepthA / (df.archDepthA + df.archDepthB))] curl df.leftSB [if (df.archDepthA + df.archDepthB < CAP) (CAP - df.archDepthA) : mix CAP 0 (df.archDepthA / (df.archDepthA + df.archDepthB))]
arch.rhs CAP (sw -- df.mvs) arch.rhs CAP (sw -- df.mvs)
flatside.rd df.rightSB 0 CAP df.archDepthA df.archDepthB 0 flatside.rd df.rightSB 0 CAP df.archDepthA df.archDepthB 0
arch.rhs 0 (sw -- df.mvs) (swAfter -- fine) arch.rhs 0 (sw -- df.mvs) (swAfter -- cofine)
g4 (df.middle - [HSwToV : 0.5 * fine]) [mix 0 barPosT (df.archDepthB / (df.archDepthA + df.archDepthB))] [widths.rhs fine] g4 (df.middle - [HSwToV : 0.5 * cofine]) [mix 0 barPosT (df.archDepthB / (df.archDepthA + df.archDepthB))] [widths.rhs cofine]
arcvh arcvh
flat [mix (df.middle - [HSwToV : 0.5 * fine]) df.rightSB 0.5] barPosT flat [mix (df.middle - [HSwToV : 0.5 * cofine]) df.rightSB 0.5] barPosT [widths.rhs fine]
curl (df.rightSB + jut * [if SLAB 1.5 1] - [HSwToV : 0.5 * df.mvs]) barPosT [heading Rightward] curl (df.rightSB + jut * [if SLAB 1.5 1] - [HSwToV : 0.5 * df.mvs]) barPosT [heading Rightward]
if SLAB : begin if SLAB : begin
local sf : SerifFrame.fromDf df CAP 0 local sf : SerifFrame.fromDf df CAP 0
@ -40,6 +41,7 @@ glyph-block Letter-Armenian-To : begin
local df : include : DivFrame para.advanceScaleT local df : include : DivFrame para.advanceScaleT
include : df.markSet.p include : df.markSet.p
local fine : df.adviceStroke2 3 3 XH local fine : df.adviceStroke2 3 3 XH
local cofine : Math.min fine : VSwToH : (df.rightSB - df.leftSB) / 2 - [HSwToV df.mvs]
local barPosT : barPos + fine / 2 local barPosT : barPos + fine / 2
include : VBar.l df.leftSB Descender XH df.mvs include : VBar.l df.leftSB Descender XH df.mvs
include : dispiro include : dispiro
@ -47,10 +49,10 @@ glyph-block Letter-Armenian-To : begin
straight.up.start (df.leftSB + [HSwToV : df.mvs - df.shoulderFine]) [if (df.smallArchDepthA + df.smallArchDepthB < XH) (XH - df.smallArchDepthA) : mix XH 0 (df.smallArchDepthA / (df.smallArchDepthA + df.smallArchDepthB))] [heading Upward] straight.up.start (df.leftSB + [HSwToV : df.mvs - df.shoulderFine]) [if (df.smallArchDepthA + df.smallArchDepthB < XH) (XH - df.smallArchDepthA) : mix XH 0 (df.smallArchDepthA / (df.smallArchDepthA + df.smallArchDepthB))] [heading Upward]
arch.rhs XH (sw -- df.mvs) (swBefore -- df.shoulderFine) arch.rhs XH (sw -- df.mvs) (swBefore -- df.shoulderFine)
flatside.rd df.rightSB 0 XH df.smallArchDepthA df.smallArchDepthB 0 [widths.rhs df.mvs] flatside.rd df.rightSB 0 XH df.smallArchDepthA df.smallArchDepthB 0 [widths.rhs df.mvs]
arch.rhs 0 (sw -- df.mvs) (swAfter -- fine) arch.rhs 0 (sw -- df.mvs) (swAfter -- cofine)
g4 (df.middle - [HSwToV : 0.5 * fine]) [mix 0 barPosT (df.smallArchDepthB / (df.smallArchDepthA + df.smallArchDepthB))] [widths.rhs fine] g4 (df.middle - [HSwToV : 0.5 * cofine]) [mix 0 barPosT (df.smallArchDepthB / (df.smallArchDepthA + df.smallArchDepthB))] [widths.rhs cofine]
arcvh arcvh
flat [mix (df.middle - [HSwToV : 0.5 * fine]) df.rightSB 0.5] barPosT flat [mix (df.middle - [HSwToV : 0.5 * cofine]) df.rightSB 0.5] barPosT [widths.rhs fine]
curl (df.rightSB + jut * [if SLAB 1.5 1] - [HSwToV : 0.5 * df.mvs]) barPosT [heading Rightward] curl (df.rightSB + jut * [if SLAB 1.5 1] - [HSwToV : 0.5 * df.mvs]) barPosT [heading Rightward]
if SLAB : begin if SLAB : begin
local sf : SerifFrame.fromDf df XH Descender local sf : SerifFrame.fromDf df XH Descender