parent
8f86b934a8
commit
3178076c3d
16 changed files with 136 additions and 118 deletions
|
@ -2,3 +2,4 @@
|
|||
* Fix shape of W-hooktop (#1511).
|
||||
* Fix shape artifacts in G with HookTop (#1512).
|
||||
* Fix serifs of Cyrillic Omega under Slab (#1514).
|
||||
* Fix shape artifacts of Ka, Zhe with descender (#1518, #1521).
|
||||
|
|
|
@ -3,7 +3,7 @@ import zlib from "zlib";
|
|||
|
||||
import { encode, decode } from "@msgpack/msgpack";
|
||||
|
||||
const Edition = 22;
|
||||
const Edition = 23;
|
||||
const MAX_AGE = 16;
|
||||
class GfEntry {
|
||||
constructor(age, value) {
|
||||
|
|
|
@ -142,8 +142,7 @@ class QuadifySink {
|
|||
beginShape() {}
|
||||
endShape() {
|
||||
if (this.lastContour.length > 2) {
|
||||
// TT use CW for outline, being different from Clipper
|
||||
let c = this.lastContour.reverse();
|
||||
let c = this.lastContour;
|
||||
c = this.alignHVKnots(c);
|
||||
c = this.cleanupOccurrentKnots1(c);
|
||||
c = this.cleanupOccurrentKnots2(c);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [OffsetCurve BezToContoursSink GEOMETRY_PRECISION] from"../../support/geometry/curve-util.mjs"
|
||||
import [mix linreg clamp fallback] from"../../support/utils.mjs"
|
||||
import [DesignParameters] from"../../meta/aesthetics.mjs"
|
||||
import [TieMark TieGlyph] from"../../support/gr.mjs"
|
||||
|
|
|
@ -30,6 +30,15 @@ glyph-block Letter-Cyrillic-Zhe : begin
|
|||
include : HSerif.rt (df.rightSB - fine * fineK) top SideJut
|
||||
include : HSerif.rb (df.rightSB - fine * fineK) bot SideJut
|
||||
|
||||
export : define [Descender df] : begin
|
||||
define sw : ZheSw df
|
||||
define fineK 0.1
|
||||
return : CyrDescender.rSideJut
|
||||
x -- df.rightSB - fineK * sw
|
||||
y -- 0
|
||||
refSw -- sw
|
||||
sideJut -- SideJut
|
||||
|
||||
export : define [StraightLegs fSlab df bot top] : begin
|
||||
define fine : ZheSw df
|
||||
define overshoot : ZheOvershoot fSlab df
|
||||
|
@ -135,13 +144,10 @@ glyph-block Letter-Cyrillic-Zhe : begin
|
|||
include : df.markSet.capital
|
||||
include : Zhe.Shape legShape fSlab df 0 CAP CAP
|
||||
|
||||
create-glyph "cyrl/ZheDescender.\(suffix)" : composite-proc
|
||||
refer-glyph "cyrl/Zhe.\(suffix)"
|
||||
create-glyph "cyrl/ZheDescender.\(suffix)" : glyph-proc
|
||||
local df : DivFrame para.diversityM 3
|
||||
CyrDescender.r
|
||||
xLink -- df.rightSB - 0.5 * HVContrast * df.mvs
|
||||
x -- df.rightSB + SideJut
|
||||
y -- 0
|
||||
include [refer-glyph "cyrl/Zhe.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : Zhe.Descender df
|
||||
|
||||
create-glyph "cyrl/zhe.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
|
@ -149,13 +155,10 @@ glyph-block Letter-Cyrillic-Zhe : begin
|
|||
include : df.markSet.e
|
||||
include : Zhe.Shape legShape fSlab df 0 XH XH
|
||||
|
||||
create-glyph "cyrl/zheDescender.\(suffix)" : composite-proc
|
||||
refer-glyph "cyrl/zhe.\(suffix)"
|
||||
create-glyph "cyrl/zheDescender.\(suffix)" : glyph-proc
|
||||
local df : DivFrame para.diversityM 3
|
||||
CyrDescender.r
|
||||
xLink -- df.rightSB - 0.5 * HVContrast * df.mvs
|
||||
x -- df.rightSB + SideJut
|
||||
y -- 0
|
||||
include [refer-glyph "cyrl/zhe.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
include : Zhe.Descender df
|
||||
|
||||
create-glyph "cyrl/zhe.BGR.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3
|
||||
|
|
|
@ -12,28 +12,34 @@ glyph-block Letter-Latin-K : begin
|
|||
glyph-block-import Letter-Shared-Shapes : DiagonalTailInnerRadius DiagonalTailF CyrDescender
|
||||
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay PalatalHook HooktopLeftBar
|
||||
|
||||
local [KBalance slab straightBar] : if slab (Width / 16) : if straightBar (Width / 32) 0
|
||||
local [KBalanceRight slab straightBar] : if slab 0 : if straightBar (Width / 32) 0
|
||||
local [KBalanceRightCursive slab straightBar] : if slab (Width / 32) : if straightBar (Width / 32) 0
|
||||
local [KO slab straightBar top stroke] : if straightBar (([if slab (0) (-4)] * OX - stroke / 3) * (XH / top)) 0
|
||||
local [KBalance slabLegs straightBar] : if slabLegs (Width / 16) : if straightBar (Width / 32) 0
|
||||
local [KBalanceRight slabLegs straightBar] : if slabLegs 0 : if straightBar (Width / 32) 0
|
||||
local [KBalanceRightCursive slabLegs straightBar] : if slabLegs (Width / 32) : if straightBar (Width / 32) 0
|
||||
local [KO slabLegs straightBar top stroke] : if straightBar (([if slabLegs (0) (-4)] * OX - stroke / 3) * (XH / top)) 0
|
||||
|
||||
define [KSlabs mode top left right stroke straightBar mask] : glyph-proc
|
||||
define [KAttachment shape mode top left right stroke straightBar] : begin
|
||||
if [not shape] : return [no-shape]
|
||||
local Ok : KO mode true top stroke
|
||||
local kshRight : right + [KBalanceRight true straightBar]
|
||||
local serifLengthAdj : Ok + stroke * HVContrast
|
||||
return : shape.rSideJut
|
||||
x -- kshRight - serifLengthAdj
|
||||
y -- 0
|
||||
jut -- Jut + serifLengthAdj
|
||||
|
||||
define [KSlabs mode top left right stroke straightBar] : glyph-proc
|
||||
local Ok : KO mode true top stroke
|
||||
local kshRight : right + [KBalanceRight true straightBar]
|
||||
local serifLengthAdj : Ok + stroke * HVContrast
|
||||
|
||||
if [maskBit mode 1] : include : tagged 'serifRT' : difference
|
||||
HSerif.rt (kshRight - serifLengthAdj) top (SideJut + serifLengthAdj)
|
||||
if mask mask [glyph-proc]
|
||||
if [maskBit mode 0] : include : tagged 'serifRB' : difference
|
||||
HSerif.rb (kshRight - serifLengthAdj) 0 (SideJut + serifLengthAdj)
|
||||
if mask mask [glyph-proc]
|
||||
include : tagged 'serifRT' : if [maskBit mode 1] [HSerif.rt (kshRight - serifLengthAdj) top (SideJut + serifLengthAdj)] [no-shape]
|
||||
include : tagged 'serifRB' : if [maskBit mode 0] [HSerif.rb (kshRight - serifLengthAdj) 0 (SideJut + serifLengthAdj)] [no-shape]
|
||||
|
||||
define [KStraightLegShapeImpl fHookTop left right stroke top slabLeft slab] : glyph-proc
|
||||
define [KStraightLegShapeImpl fHookTop left right stroke top slabLeft slabLegs attachment] : glyph-proc
|
||||
local fine : AdviceStroke 3.5
|
||||
local Ok : KO slab true top stroke
|
||||
local Ok : KO slabLegs true top stroke
|
||||
local kshLeft : left + [KBalance slabLeft true]
|
||||
local kshRightBot : right + [KBalanceRight slab true]
|
||||
local kshRightBot : right + [KBalanceRight slabLegs true]
|
||||
local kshRightTop : if fHookTop (kshRightBot - HookX * 0.5 + 0.5 * stroke * HVContrast) kshRightBot
|
||||
|
||||
local attach (top * 0.42 - stroke)
|
||||
|
@ -41,7 +47,7 @@ glyph-block Letter-Latin-K : begin
|
|||
|
||||
set-base-anchor 'trailing' (kshRightBot - Ok) 0
|
||||
|
||||
define [TopStrokeMask offset] : Rect top 0 kshLeft [if [maskBit slab 1] (kshRightTop + offset) (2 * Width)]
|
||||
define [TopStrokeMask offset] : Rect top 0 kshLeft [if [maskBit slabLegs 1] (kshRightTop + offset) (2 * Width)]
|
||||
if [not fHookTop] : include : intersection
|
||||
TopStrokeMask 0
|
||||
dispiro
|
||||
|
@ -52,7 +58,7 @@ glyph-block Letter-Latin-K : begin
|
|||
define kHookTopMix 0.5
|
||||
if fHookTop : include : dispiro
|
||||
widths.rhs stroke
|
||||
straight.left.start (kshRightBot + [if [maskBit slab 1] SideJut 0] - TanSlope * stroke) (top - stroke)
|
||||
straight.left.start (kshRightBot + [if [maskBit slabLegs 1] SideJut 0] - TanSlope * stroke) (top - stroke)
|
||||
flat [mix (kshRightTop - Ok) (kshLeft + stroke) kHookTopMix] [mix top attach kHookTopMix] [widths.rhs : mix stroke fine kHookTopMix]
|
||||
curl (kshLeft + stroke) attach [widths.rhs fine]
|
||||
|
||||
|
@ -68,18 +74,22 @@ glyph-block Letter-Latin-K : begin
|
|||
flat (kshRightBot - Ok) 0
|
||||
curl (kshLeft + stroke) attach2
|
||||
|
||||
include : KSlabs slab top left right stroke true : union
|
||||
include : difference
|
||||
union
|
||||
KSlabs slabLegs top left right stroke true
|
||||
KAttachment attachment slabLegs top left right stroke true
|
||||
union
|
||||
HalfRectTriangle (kshRightBot - Ok - 0.1) 0 (kshLeft + stroke - 0.1) attach2
|
||||
intersection
|
||||
TopStrokeMask (-0.1)
|
||||
HalfRectTriangle (kshRightTop - Ok - 0.1) top (kshLeft + stroke - 0.1) attach
|
||||
|
||||
define [KSymmetricLegsImpl leadGap hookDepth] : function [fHookTop left right stroke top slabLeft slab] : glyph-proc
|
||||
define [KSymmetricLegsImpl leadGap hookDepth] : function [fHookTop left right stroke top slabLeft slabLegs attachment] : glyph-proc
|
||||
local fine : AdviceStroke [if leadGap 3.5 3]
|
||||
local Ok : KO slab true top stroke
|
||||
local Ok : KO slabLegs true top stroke
|
||||
|
||||
local kshLeft : left + [KBalance slabLeft true]
|
||||
local kshRight : right + [KBalanceRight slab true]
|
||||
local kshRight : right + [KBalanceRight slabLegs true]
|
||||
|
||||
local xAttach : kshLeft + stroke * HVContrast + (leadGap || fine)
|
||||
local yAttach : top * [if leadGap 0.42 0.49] - stroke * [if leadGap 1 (-0.1)]
|
||||
|
@ -87,7 +97,7 @@ glyph-block Letter-Latin-K : begin
|
|||
|
||||
if [not hookDepth] : set-base-anchor 'trailing' (kshRight - Ok) 0
|
||||
|
||||
define [StrokeMask t b offset] : Rect t b kshLeft [if [maskBit slab 1] (kshRight + offset) (2 * Width)]
|
||||
define [StrokeMask t b offset] : Rect t b kshLeft [if [maskBit slabLegs 1] (kshRight + offset) (2 * Width)]
|
||||
if [not fHookTop] : include : tagged 'strokeRT' : intersection
|
||||
StrokeMask top (0.5 * top) 0
|
||||
dispiro
|
||||
|
@ -101,7 +111,7 @@ glyph-block Letter-Latin-K : begin
|
|||
Rect top (0.5 * top) kshLeft (2 * Width)
|
||||
dispiro
|
||||
widths.rhs stroke
|
||||
straight.left.start (kshRight + [if [maskBit slab 1] SideJut 0] - TanSlope * stroke) (top - stroke)
|
||||
straight.left.start (kshRight + [if [maskBit slabLegs 1] SideJut 0] - TanSlope * stroke) (top - stroke)
|
||||
flat [mix (kshRightHookTop - Ok) xAttach kHookTopMix] [mix top yAttach kHookTopMix] [widths.rhs : mix stroke fine kHookTopMix]
|
||||
curl [mix (kshRightHookTop - Ok) xAttach 2] [mix top yAttach 2] [widths.rhs fine]
|
||||
|
||||
|
@ -133,7 +143,11 @@ glyph-block Letter-Latin-K : begin
|
|||
arcvh
|
||||
straight.left.end (right - HookX - 0.5 * stroke * HVContrast) hookDepth
|
||||
|
||||
include : KSlabs slab top left right stroke true : union
|
||||
include : difference
|
||||
union
|
||||
KSlabs slabLegs top left right stroke true
|
||||
KAttachment attachment slabLegs top left right stroke true
|
||||
union
|
||||
intersection
|
||||
StrokeMask top (0.5 * top) (-0.1)
|
||||
HalfRectTriangle (kshRight - Ok - 0.1) top ([mix (kshRight - Ok) xAttach 2] - 0.1) [mix top yAttach 2]
|
||||
|
@ -141,11 +155,11 @@ glyph-block Letter-Latin-K : begin
|
|||
StrokeMask (0.5 * top) 0 (-0.1)
|
||||
HalfRectTriangle (kshRight - Ok - 0.1) 0 ([mix (kshRight - Ok) xAttach 2] - 0.1) [mix 0 coYAttach 2]
|
||||
|
||||
define [KCurlyLegShapeImpl fHookTop left right stroke top slabLeft slab] : glyph-proc
|
||||
define [KCurlyLegShapeImpl fHookTop left right stroke top slabLeft slabLegs attachment] : glyph-proc
|
||||
local turn : top * 0.99
|
||||
local fine : AdviceStroke 3.5
|
||||
local kshLeft : left + [KBalance slabLeft false]
|
||||
local kshRight : right + [KBalanceRight slab false]
|
||||
local kshRight : right + [KBalanceRight slabLegs false]
|
||||
|
||||
set-base-anchor 'trailing' (kshRight - O) 0
|
||||
|
||||
|
@ -155,7 +169,7 @@ glyph-block Letter-Latin-K : begin
|
|||
define [lowerCurvature] : quadControls 0 0.3 8
|
||||
|
||||
local xAttach1 : kshLeft + stroke * HVContrast
|
||||
local yAttach1 : top * [if slab 0.325 0.375]
|
||||
local yAttach1 : top * [if slabLegs 0.325 0.375]
|
||||
local xAttach2 : kshLeft + stroke * HVContrast
|
||||
local yAttach2 : top * 0.75
|
||||
local kDiag : mix 1 [DiagCorDs (top - yAttach1) (kshRight - kshLeft) stroke] 0.5
|
||||
|
@ -163,7 +177,7 @@ glyph-block Letter-Latin-K : begin
|
|||
Rect top 0 kshLeft (2 * Width)
|
||||
if fHookTop
|
||||
dispiro
|
||||
straight.left.start (kshRight + [if [maskBit slab 1] SideJut 0] - TanSlope * stroke) (top - stroke) [widths.rhs stroke]
|
||||
straight.left.start (kshRight + [if [maskBit slabLegs 1] SideJut 0] - TanSlope * stroke) (top - stroke) [widths.rhs stroke]
|
||||
upperCurvatureHT
|
||||
g4 xAttach1 yAttach1 [widths.rhs fine]
|
||||
dispiro
|
||||
|
@ -177,7 +191,7 @@ glyph-block Letter-Latin-K : begin
|
|||
g4 xAttach2 yAttach2 [widths.center fine]
|
||||
if fHookTop
|
||||
spiro-outline
|
||||
straight.left.start (kshRight + [if [maskBit slab 1] SideJut 0] - TanSlope * stroke) (top - stroke + 0.1)
|
||||
straight.left.start (kshRight + [if [maskBit slabLegs 1] SideJut 0] - TanSlope * stroke) (top - stroke + 0.1)
|
||||
upperCurvatureHT
|
||||
corner (xAttach1 - 0.1) yAttach1
|
||||
corner (-Width) yAttach1
|
||||
|
@ -190,14 +204,17 @@ glyph-block Letter-Latin-K : begin
|
|||
corner (kshLeft + stroke) (yAttach1 + 0.1)
|
||||
corner kshLeft 0
|
||||
corner kshLeft top
|
||||
|
||||
include : KSlabs slab top left right stroke false : union
|
||||
include : difference
|
||||
union
|
||||
KSlabs slabLegs top left right stroke false
|
||||
KAttachment attachment slabLegs top left right stroke false
|
||||
union
|
||||
HalfRectTriangle kshRight top xAttach1 yAttach1
|
||||
HalfRectTriangle (kshRight - O - stroke / 2 * HVContrast) 0 xAttach2 yAttach2
|
||||
|
||||
define [KCursiveLoopAndLegDimen top straightBar slabLeft slab] : begin
|
||||
define [KCursiveLoopAndLegDimen top straightBar slabLeft slabLegs] : begin
|
||||
define kshLeft : SB + [KBalance slabLeft straightBar]
|
||||
define kshRight : RightSB + [KBalanceRightCursive slab straightBar] + 0.2 * Stroke
|
||||
define kshRight : RightSB + [KBalanceRightCursive slabLegs straightBar] + 0.2 * Stroke
|
||||
|
||||
define arcFine : Stroke * CThin
|
||||
define arcStroke : AdviceStroke2 2 3 top
|
||||
|
@ -230,8 +247,8 @@ glyph-block Letter-Latin-K : begin
|
|||
|
||||
return : object arcStartX arcStartY arcFine arcRightX arcRightY arcRightSlope arcTopX arcTopY arcStroke arcTopSkew arcBottomX arcBottomY arcTerminalX arcTerminalY arcTerminalFine kshLeft kshRight slabStartX
|
||||
|
||||
define [KCursiveLoopAndLegShapeImpl tailed] : function [fHookTop left right stroke top slabLeft slab] : glyph-proc
|
||||
define dim : KCursiveLoopAndLegDimen top true slabLeft slab
|
||||
define [KCursiveLoopAndLegShapeImpl tailed] : function [fHookTop left right stroke top slabLeft slabLegs attachment] : glyph-proc
|
||||
define dim : KCursiveLoopAndLegDimen top true slabLeft slabLegs
|
||||
include : dispiro
|
||||
g4.up.start dim.arcStartX dim.arcStartY [widths.heading 0 dim.arcFine Upward]
|
||||
arcvh 8 2.0
|
||||
|
@ -259,7 +276,7 @@ glyph-block Letter-Latin-K : begin
|
|||
curl (xDTEnd + 0.125 * dtInnerRadius) (0.9 * swDiagTail + 0.5 * dtInnerRadius)
|
||||
DiagonalTailF 1 [DivFrame 1] xDTEnd 0 dtInnerRadius tailAngle (Hook + swDiagTail / 4) swDiagTail
|
||||
else : intersection
|
||||
Rect XH 0 0 [if slab (dim.slabStartX + SideJut) (Width * 2)]
|
||||
Rect XH 0 0 [if slabLegs (dim.slabStartX + SideJut) (Width * 2)]
|
||||
dispiro
|
||||
flat dim.arcTerminalX dim.arcTerminalY [widths.lhs]
|
||||
curl dim.kshRight 0 [widths.rhs]
|
||||
|
@ -273,21 +290,14 @@ glyph-block Letter-Latin-K : begin
|
|||
g4 dim.arcBottomX (dim.arcBottomY - dim.arcStroke - O)
|
||||
g4 dim.arcStartX (dim.arcTerminalY - dim.arcStroke - O)
|
||||
|
||||
if (slab && !tailed) : include : HSerif.rb dim.slabStartX 0 SideJut
|
||||
|
||||
define [KDescender shape top straightBar slabLeft slab] : begin
|
||||
local xPos : RightSB + [KBalanceRight slab straightBar] - [KO slab straightBar top Stroke]
|
||||
return : shape.r
|
||||
x -- xPos + SideJut
|
||||
if (slabLegs && !tailed) : include : HSerif.rb dim.slabStartX 0 SideJut
|
||||
if attachment : include : attachment.rSideJut
|
||||
x -- dim.slabStartX
|
||||
jut -- Jut
|
||||
y -- 0
|
||||
xLink -- xPos - [if straightBar 1 0.1] * HVContrast * Stroke
|
||||
define [KCyrlNormalDescender top straightBar slabLeft slab] : begin
|
||||
return : KDescender CyrDescender top straightBar slabLeft slab
|
||||
define [KPalatalHook top straightBar slabLeft slab] : begin
|
||||
return : KDescender PalatalHook top straightBar slabLeft slab
|
||||
|
||||
define [KHookTopBar slab straightBar] : HooktopLeftBar.inner
|
||||
x -- SB + [KBalance slab straightBar]
|
||||
define [KHookTopBar slabLegs straightBar] : HooktopLeftBar.inner
|
||||
x -- SB + [KBalance slabLegs straightBar]
|
||||
|
||||
define CyrlVbGap : (RightSB - SB) * 0.375
|
||||
define [CyrlVbLength top] : top * 0.375 + Stroke
|
||||
|
@ -387,16 +397,19 @@ glyph-block Letter-Latin-K : begin
|
|||
foreach { suffix { LegsImpl slabTop slabBot slabLegs slabKS } } [Object.entries UpperKConfig] : do
|
||||
local straightBar : LegsImpl !== KCurlyLegShapeImpl
|
||||
|
||||
define [KBaseShape sw top] : glyph-proc
|
||||
define [KBaseShape sw top attachment] : glyph-proc
|
||||
include : VBar.l (SB + [KBalance slabTop straightBar]) 0 top sw
|
||||
include : LegsImpl false SB RightSB sw top slabTop slabLegs
|
||||
include : LegsImpl false SB RightSB sw top slabTop slabLegs attachment
|
||||
if slabTop : include : UpperKLTSerif top sw slabTop straightBar
|
||||
if slabBot : include : UpperKLBSerif top sw slabTop straightBar
|
||||
|
||||
create-glyph "K.\(suffix)" : glyph-proc
|
||||
include : MarkSet.capital
|
||||
include : KBaseShape Stroke CAP
|
||||
create-forked-glyph "KDescender.\(suffix)" : KCyrlNormalDescender CAP straightBar slabTop slabLegs
|
||||
|
||||
create-glyph "KDescender.\(suffix)" : glyph-proc
|
||||
include : MarkSet.capital
|
||||
include : KBaseShape Stroke CAP CyrDescender
|
||||
|
||||
create-glyph "KBar.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "K.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
|
@ -426,7 +439,10 @@ glyph-block Letter-Latin-K : begin
|
|||
create-glyph "smcpK.\(suffix)" : glyph-proc
|
||||
include : MarkSet.e
|
||||
include : KBaseShape Stroke XH
|
||||
create-forked-glyph "cyrl/kaDescender.\(suffix)" : KCyrlNormalDescender XH straightBar slabTop slabLegs
|
||||
|
||||
create-glyph "smcpKDescender.\(suffix)" : glyph-proc
|
||||
include : MarkSet.e
|
||||
include : KBaseShape Stroke XH CyrDescender
|
||||
|
||||
create-glyph "smcpKVBar.\(suffix)" : glyph-proc
|
||||
include : MarkSet.e
|
||||
|
@ -501,15 +517,24 @@ glyph-block Letter-Latin-K : begin
|
|||
foreach { suffix { LegsImpl slabTop slabBot slabLegs } } [Object.entries LowerKConfig] : do
|
||||
local straightBar : LegsImpl !== KCurlyLegShapeImpl
|
||||
|
||||
create-glyph "k.\(suffix)" : glyph-proc
|
||||
include : MarkSet.b
|
||||
define [kBaseShape attachment] : glyph-proc
|
||||
include : VBar.l (SB + [KBalance slabTop straightBar]) 0 Ascender
|
||||
include : LegsImpl false SB RightSB Stroke XH slabTop slabLegs
|
||||
include : LegsImpl false SB RightSB Stroke XH slabTop slabLegs attachment
|
||||
if slabTop : include : HSerif.lt (SB + [KBalance slabTop straightBar]) Ascender SideJut
|
||||
if slabBot : include : tagged 'serifLB'
|
||||
HSerif.mb (SB + [KBalance slabTop straightBar] + HalfStroke * HVContrast) 0 Jut
|
||||
create-forked-glyph "kDescender.\(suffix)" : KCyrlNormalDescender XH straightBar slabTop slabLegs
|
||||
create-forked-glyph "kPalatalHook.\(suffix)" : KPalatalHook XH straightBar slabTop slabLegs
|
||||
|
||||
create-glyph "k.\(suffix)" : glyph-proc
|
||||
include : MarkSet.b
|
||||
include : kBaseShape
|
||||
|
||||
create-glyph "kDescender.\(suffix)" : glyph-proc
|
||||
include : MarkSet.b
|
||||
include : kBaseShape CyrDescender
|
||||
|
||||
create-glyph "kPalatalHook.\(suffix)" : glyph-proc
|
||||
include : MarkSet.b
|
||||
include : kBaseShape PalatalHook
|
||||
|
||||
create-glyph "kBar.\(suffix)" : glyph-proc
|
||||
include [refer-glyph "k.\(suffix)"] AS_BASE ALSO_METRICS
|
||||
|
@ -550,7 +575,7 @@ glyph-block Letter-Latin-K : begin
|
|||
select-variant 'smcpK' 0x1D0B (follow -- 'K')
|
||||
alias 'latinkappa' 0x138 'smcpK'
|
||||
select-variant 'cyrl/ka' 0x43A (shapeFrom -- 'smcpK')
|
||||
select-variant 'cyrl/kaDescender' 0x49B
|
||||
select-variant 'cyrl/kaDescender' 0x49B (shapeFrom -- 'smcpKDescender')
|
||||
select-variant 'cyrl/ka.BGR' (shapeFrom -- 'k') (follow -- 'cyrl/ka')
|
||||
select-variant 'cyrl/kaVBar' 0x49D (shapeFrom -- 'smcpKVBar') (follow -- 'cyrl/kaVBar')
|
||||
select-variant 'cyrl/kaHook' 0x4C4 (shapeFrom -- 'smcpK') (follow -- 'cyrl/kaHook')
|
||||
|
|
|
@ -680,15 +680,19 @@ glyph-block Letter-Shared-Shapes : begin
|
|||
local sw : Sw refSw
|
||||
return : Impl (x - 0.5 * sw * HVContrast) y xLink yAttach yOverflow sw maskOut
|
||||
|
||||
export : define [lSideJut] : params [x y [yOverflow 0] [refSw Stroke] [jut Jut]] : begin
|
||||
export : define [lSideJut] : params [x y [yOverflow 0] [refSw Stroke] [jut Jut] [sideJut nothing]] : begin
|
||||
local sj : fallback sideJut (jut - 0.5 * HVContrast * refSw)
|
||||
local sw : Sw refSw
|
||||
local xPos : x + 0.5 * HVContrast * (refSw + sw) - jut - sw * TanSlope
|
||||
return : Impl xPos y x y yOverflow sw
|
||||
local xLink : x + 0.5 * HVContrast * refSw - TanSlope * sw
|
||||
local xPos : x + 0.5 * HVContrast * sw - sj + sw * TanSlope * (DesignParameters.serifShiftX - 1)
|
||||
return : Impl xPos y xLink y yOverflow sw
|
||||
|
||||
export : define [rSideJut] : params [x y [yOverflow 0] [refSw Stroke] [jut Jut]] : begin
|
||||
export : define [rSideJut] : params [x y [yOverflow 0] [refSw Stroke] [jut Jut] [sideJut nothing]] : begin
|
||||
local sj : fallback sideJut (jut - 0.5 * HVContrast * refSw)
|
||||
local sw : Sw refSw
|
||||
local xPos : x - 0.5 * HVContrast * (refSw + sw) + jut + sw * TanSlope
|
||||
return : Impl xPos y x y yOverflow sw
|
||||
local xLink : x - 0.5 * HVContrast * refSw
|
||||
local xPos : x - 0.5 * HVContrast * sw + sj + sw * TanSlope * (DesignParameters.serifShiftX + 1)
|
||||
return : Impl xPos y xLink y yOverflow sw
|
||||
|
||||
# Descender of cyrillics
|
||||
glyph-block-export CyrDescender
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [OffsetCurve BezToContoursSink GEOMETRY_PRECISION] from"../../support/geometry/curve-util.mjs"
|
||||
import [mix linreg clamp fallback] from"../../support/utils.mjs"
|
||||
import [DesignParameters] from"../../meta/aesthetics.mjs"
|
||||
import [TieMark TieGlyph] from"../../support/gr.mjs"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [OffsetCurve BezToContoursSink GEOMETRY_PRECISION] from"../../support/geometry/curve-util.mjs"
|
||||
import [mix linreg clamp fallback] from"../../support/utils.mjs"
|
||||
import [DesignParameters] from"../../meta/aesthetics.mjs"
|
||||
import [TieMark TieGlyph] from"../../support/gr.mjs"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [OffsetCurve BezToContoursSink GEOMETRY_PRECISION] from"../../support/geometry/curve-util.mjs"
|
||||
import [mix linreg clamp fallback] from"../../support/utils.mjs"
|
||||
import [DesignParameters] from"../../meta/aesthetics.mjs"
|
||||
import [TieMark TieGlyph] from"../../support/gr.mjs"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [OffsetCurve BezToContoursSink GEOMETRY_PRECISION] from"../../support/geometry/curve-util.mjs"
|
||||
import [mix linreg clamp fallback] from"../../support/utils.mjs"
|
||||
import [DesignParameters] from"../../meta/aesthetics.mjs"
|
||||
import [TieMark TieGlyph] from"../../support/gr.mjs"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [OffsetCurve BezToContoursSink GEOMETRY_PRECISION] from"../../support/geometry/curve-util.mjs"
|
||||
import [mix linreg clamp fallback] from"../../support/utils.mjs"
|
||||
import [DesignParameters] from"../../meta/aesthetics.mjs"
|
||||
import [TieMark TieGlyph] from"../../support/gr.mjs"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$$include '../../meta/macros.ptl'
|
||||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [OffsetCurve BezToContoursSink GEOMETRY_PRECISION] from"../../support/geometry/curve-util.mjs"
|
||||
import [mix linreg clamp fallback] from"../../support/utils.mjs"
|
||||
import [DesignParameters] from"../../meta/aesthetics.mjs"
|
||||
import [TieMark TieGlyph] from"../../support/gr.mjs"
|
||||
|
|
|
@ -404,13 +404,6 @@ export class BooleanGeometry extends GeometryBase {
|
|||
asContoursImpl() {
|
||||
if (this.m_operands.length === 0) return [];
|
||||
let arcs = CurveUtil.convertShapeToArcs(this.m_operands[0].asContours());
|
||||
if (this.m_operands.length === 1) {
|
||||
arcs = TypoGeom.Boolean.removeOverlap(
|
||||
arcs,
|
||||
TypoGeom.Boolean.PolyFillType.pftNonZero,
|
||||
CurveUtil.BOOLE_RESOLUTION
|
||||
);
|
||||
}
|
||||
for (let j = 1; j < this.m_operands.length; j++) {
|
||||
arcs = TypoGeom.Boolean.combine(
|
||||
this.m_operator,
|
||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -16,7 +16,7 @@
|
|||
"semver": "^7.3.8",
|
||||
"spiro": "^3.0.0",
|
||||
"toposort": "^2.0.2",
|
||||
"typo-geom": "^0.12.1",
|
||||
"typo-geom": "^0.13.0",
|
||||
"uuid": "^9.0.0",
|
||||
"wawoff2": "^2.0.1"
|
||||
},
|
||||
|
@ -3347,9 +3347,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/typo-geom": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/typo-geom/-/typo-geom-0.12.1.tgz",
|
||||
"integrity": "sha512-W20RYp2OCEGMhEYayR0cAP67AUWiGRUufMs6Clul7MAmu5SpLuOG/RWk7+LkL65wsugcfhPQlFEJ231C2xHNQg==",
|
||||
"version": "0.13.0",
|
||||
"resolved": "https://registry.npmjs.org/typo-geom/-/typo-geom-0.13.0.tgz",
|
||||
"integrity": "sha512-s7BV1wSA+kcv2kNjJXrXgl9By8BGqwRu1llbxfkv45McR/ZyxWOFXUgTMUZdUFn79UQuVc0yzKisrj8XzkR27A==",
|
||||
"dependencies": {
|
||||
"clipper-lib": "^6.4.2",
|
||||
"tslib": "^2.0.1"
|
||||
|
@ -6227,9 +6227,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"typo-geom": {
|
||||
"version": "0.12.1",
|
||||
"resolved": "https://registry.npmjs.org/typo-geom/-/typo-geom-0.12.1.tgz",
|
||||
"integrity": "sha512-W20RYp2OCEGMhEYayR0cAP67AUWiGRUufMs6Clul7MAmu5SpLuOG/RWk7+LkL65wsugcfhPQlFEJ231C2xHNQg==",
|
||||
"version": "0.13.0",
|
||||
"resolved": "https://registry.npmjs.org/typo-geom/-/typo-geom-0.13.0.tgz",
|
||||
"integrity": "sha512-s7BV1wSA+kcv2kNjJXrXgl9By8BGqwRu1llbxfkv45McR/ZyxWOFXUgTMUZdUFn79UQuVc0yzKisrj8XzkR27A==",
|
||||
"requires": {
|
||||
"clipper-lib": "^6.4.2",
|
||||
"tslib": "^2.0.1"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"semver": "^7.3.8",
|
||||
"spiro": "^3.0.0",
|
||||
"toposort": "^2.0.2",
|
||||
"typo-geom": "^0.12.1",
|
||||
"typo-geom": "^0.13.0",
|
||||
"uuid": "^9.0.0",
|
||||
"wawoff2": "^2.0.1",
|
||||
"deep-equal": "^2.1.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue