* Add characters:
- LATIN CAPITAL LETTER AU (`U+A736`) (#1689). - LATIN SMALL LETTER AU (`U+A737`) (#1689).
This commit is contained in:
parent
43f247fbac
commit
65547da947
12 changed files with 254 additions and 124 deletions
|
@ -2,7 +2,6 @@ $$include '../meta/macros.ptl'
|
|||
|
||||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [mix linreg clamp fallback] from "@iosevka/util"
|
||||
import [Box] from "@iosevka/geometry/box"
|
||||
import [TieMark AnyDerivingCv ScheduleLeaningMark LeaningMark LeaningMarkSpacer] from "@iosevka/glyph/relation"
|
||||
|
||||
import [DesignParameters] from "../meta/aesthetics.mjs"
|
||||
|
|
|
@ -133,31 +133,35 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
|
|||
include : InvEShape 1 df revbody
|
||||
|
||||
do "u subglyphs"
|
||||
define [ueUPart df fSlab] : new-glyph : glyph-proc
|
||||
local { subDf } : SubDfAndShift 0 df 0
|
||||
local ada : subDf.archDepthA SmallArchDepth df.mvs
|
||||
local adb : subDf.archDepthB SmallArchDepth df.mvs
|
||||
glyph-block-import Letter-Latin-U : UShapeGroup SmallUConfigT
|
||||
|
||||
local abarRight : df.middle + [HSwToV : 0.5 * df.mvs]
|
||||
include : nShoulder
|
||||
left -- abarRight
|
||||
right -- (df.rightSB - OX)
|
||||
stroke -- df.mvs
|
||||
ada -- adb
|
||||
adb -- adb
|
||||
include : FlipAround df.middle (XH / 2)
|
||||
if fSlab : include : HSerif.lt df.leftSB XH SideJut
|
||||
define df : DivFrame para.diversityM 3
|
||||
define { subDf shift } : SubDfAndShift 1 df 0
|
||||
local ada : subDf.archDepthA SmallArchDepth df.mvs
|
||||
local adb : subDf.archDepthB SmallArchDepth df.mvs
|
||||
define sg : UShapeGroup ada adb
|
||||
|
||||
define Config : object
|
||||
"serifed" { true }
|
||||
"serifless" { false }
|
||||
|
||||
foreach { suffix { fSlab } } [Object.entries Config] : do
|
||||
foreach { suffix { Base Slabs } } [Object.entries : SmallUConfigT sg] : do
|
||||
create-glyph "ue/u.\(suffix)" : glyph-proc
|
||||
local df : include : DivFrame para.diversityM 3
|
||||
include df
|
||||
include : df.markSet.e
|
||||
set-base-anchor 'cvDecompose' 0 0
|
||||
include : ueUPart df fSlab
|
||||
include : Base subDf XH df.mvs
|
||||
include : Slabs subDf XH
|
||||
|
||||
eject-contour 'strokeR'
|
||||
eject-contour 'serifRT'
|
||||
eject-contour 'serifRB'
|
||||
|
||||
create-glyph "au/u.\(suffix)" : glyph-proc
|
||||
set-width 0
|
||||
set-mark-anchor 'cvDecompose' 0 0
|
||||
include : difference
|
||||
Base subDf XH df.mvs
|
||||
intersection [MaskLeft subDf.middle] [MaskAbove (XH - adb)]
|
||||
include : Slabs subDf XH
|
||||
include : ApparentTranslate shift 0
|
||||
eject-contour 'serifLT'
|
||||
|
||||
do "c subglyphs"
|
||||
glyph-block-import Letter-Latin-C : CLetterForm CConfig
|
||||
|
@ -378,6 +382,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
|
|||
select-variant "ae/e" (follow -- 'e')
|
||||
select-variant "aeInvE/right" (follow -- 'e')
|
||||
select-variant "ue/u"
|
||||
select-variant "au/u"
|
||||
select-variant "oeOpenO/left" (follow -- 'c')
|
||||
select-variant "cyrl/yae/left"
|
||||
select-variant "cyrl/rha/left" (follow -- 'cyrl/er')
|
||||
|
@ -389,6 +394,7 @@ glyph-block Letter-Latin-Lower-AE-OE : begin
|
|||
derive-composites 'oe' 0x153 'oe/o' 'ae/e'
|
||||
derive-composites 'ue' 0x1D6B 'ue/u' 'ae/e'
|
||||
derive-composites 'ao' 0xA735 'ae/a' 'ao/o'
|
||||
derive-composites 'au' 0xA737 'ae/a' 'au/u'
|
||||
derive-composites 'oo' 0xA74F 'oe/o' 'ao/o'
|
||||
derive-composites 'uo' 0xAB63 'ue/u' 'ao/o'
|
||||
derive-composites 'oeOpenO' 0xAB62 'oeOpenO/left' 'ae/e'
|
||||
|
|
|
@ -12,6 +12,7 @@ glyph-block Letter-Latin-Upper-AA-AO : begin
|
|||
|
||||
do "A glyphs"
|
||||
glyph-block-import Letter-Latin-Upper-A : AConfig AMaskShape ALetterShape
|
||||
glyph-block-import Letter-Latin-Upper-A : ABottomRightRemoved ABarPosition
|
||||
|
||||
define [AHalfShape pShift df top fStraightBar slabKind] : begin
|
||||
local { subDf shift } : SubDfAndShift pShift df
|
||||
|
@ -63,6 +64,18 @@ glyph-block Letter-Latin-Upper-AA-AO : begin
|
|||
set-mark-anchor 'cvDecompose' 0 0 0 0
|
||||
include : AHalfShapeMask 1 df height fStraightBar skRight
|
||||
|
||||
create-glyph "\(prefix)/AU/Left.\(suffix)" : glyph-proc
|
||||
define df : include : DivFrame para.diversityM 3.5
|
||||
local { subDf shift } : SubDfAndShift 1 df
|
||||
include : ABottomRightRemoved subDf fStraightBar slabKind CAP df.mvs
|
||||
create-glyph "\(prefix)/AU/LeftMask.\(suffix)" : glyph-proc
|
||||
define df : include : DivFrame para.diversityM 3.5
|
||||
local { subDf shift } : SubDfAndShift 1 df
|
||||
include : union
|
||||
MaskAbove : [ABarPosition slabKind CAP] - df.mvs
|
||||
MaskLeft : subDf.width / 2
|
||||
include : ABottomRightRemoved subDf fStraightBar slabKind CAP df.mvs
|
||||
|
||||
select-variant "\(prefix)/Left" (follow -- 'A')
|
||||
select-variant "\(prefix)/LeftMask" (follow -- 'A')
|
||||
select-variant "\(prefix)/Right" (follow -- 'A')
|
||||
|
@ -94,6 +107,30 @@ glyph-block Letter-Latin-Upper-AA-AO : begin
|
|||
include [refer-glyph left] AS_BASE ALSO_METRICS
|
||||
include : difference [refer-glyph right] [refer-glyph leftMask]
|
||||
|
||||
do "U subglyphs"
|
||||
glyph-block-import Letter-Latin-U : CapitalUConfig
|
||||
foreach { suffix { Base {Slabs fLTSlab} } } [Object.entries CapitalUConfig] : do
|
||||
create-glyph "AU/Right.\(suffix)" : glyph-proc
|
||||
define df : DivFrame para.diversityM 3.5
|
||||
local { subDf shift } : SubDfAndShift 1 df
|
||||
include : with-transform [ApparentTranslate shift 0]
|
||||
union [Base subDf CAP df.mvs] [Slabs subDf CAP]
|
||||
|
||||
select-variant "AU/Right" (follow -- 'U/noTopLeftSerif')
|
||||
|
||||
do "AU"
|
||||
select-variant 'AA/AU/Left' (follow -- 'A')
|
||||
select-variant 'AA/AU/LeftMask' (follow -- 'A')
|
||||
derive-multi-part-glyphs 'AU' 0xA736 {'AA/AU/Left' 'AA/AU/LeftMask' 'AU/Right'}
|
||||
function [srcs gr] : glyph-proc
|
||||
define df : include : DivFrame para.diversityM 3.5
|
||||
local { subDf shift } : SubDfAndShift 1 df
|
||||
include : df.markSet.capital
|
||||
define { left mask right } srcs
|
||||
include [refer-glyph left]
|
||||
include : difference [refer-glyph right]
|
||||
intersection [refer-glyph mask] [MaskLeft (subDf.width / 2 + shift)]
|
||||
|
||||
do "RHA"
|
||||
glyph-block-import Letter-Shared-Shapes : SerifFrame WithSerifOverflowMask
|
||||
glyph-block-import Letter-Latin-Upper-P : PShape PConfig
|
||||
|
|
|
@ -36,70 +36,67 @@ glyph-block Letter-Latin-U : begin
|
|||
adb -- adb
|
||||
offset -- offset
|
||||
|
||||
define [UToothed df top fHookLeft] : glyph-proc
|
||||
set-base-anchor 'trailing' df.rightSB 0
|
||||
include : nShoulder
|
||||
top -- top
|
||||
bottom -- [if fHookLeft (TailY + HalfStroke) 0]
|
||||
left -- (df.leftSB + [HSwToV Stroke])
|
||||
right -- df.rightSB
|
||||
fine -- ShoulderFine
|
||||
if fHookLeft : include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke)
|
||||
include : FlipAround df.middle (top / 2)
|
||||
include : VBar.r df.rightSB 0 top
|
||||
glyph-block-export UShapeGroup
|
||||
define [UShapeGroup ada adb] : namespace
|
||||
export : define [Toothed df top sw fHookLeft] : glyph-proc
|
||||
set-base-anchor 'trailing' df.rightSB 0
|
||||
include : nShoulder
|
||||
top -- top
|
||||
bottom -- [if fHookLeft (TailY + HalfStroke) 0]
|
||||
left -- (df.leftSB + [HSwToV sw])
|
||||
right -- df.rightSB
|
||||
stroke -- sw
|
||||
fine -- ShoulderFine
|
||||
ada -- ada
|
||||
adb -- adb
|
||||
if fHookLeft : include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke) (sw -- sw)
|
||||
include : FlipAround df.middle (top / 2)
|
||||
include : tagged 'strokeR' : VBar.r df.rightSB 0 top sw
|
||||
|
||||
define [UTailed df top fHookLeft] : glyph-proc
|
||||
set-base-anchor 'trailing' (df.rightSB + SideJut) 0
|
||||
include : nShoulder
|
||||
top -- top
|
||||
bottom -- [if fHookLeft (TailY + HalfStroke) 0]
|
||||
left -- (df.leftSB + [HSwToV Stroke])
|
||||
right -- df.rightSB
|
||||
fine -- ShoulderFine
|
||||
if fHookLeft : include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke)
|
||||
include : FlipAround df.middle (top / 2)
|
||||
include : RightwardTailedBar df.rightSB 0 top
|
||||
export : define [Tailed df top sw fHookLeft] : glyph-proc
|
||||
set-base-anchor 'trailing' (df.rightSB + SideJut) 0
|
||||
include : nShoulder
|
||||
top -- top
|
||||
bottom -- [if fHookLeft (TailY + HalfStroke) 0]
|
||||
left -- (df.leftSB + [HSwToV sw])
|
||||
right -- df.rightSB
|
||||
stroke -- sw
|
||||
fine -- ShoulderFine
|
||||
ada -- ada
|
||||
adb -- adb
|
||||
if fHookLeft : include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke) (sw -- sw)
|
||||
include : FlipAround df.middle (top / 2)
|
||||
include : tagged 'strokeR' : RightwardTailedBar df.rightSB 0 top (sw -- sw)
|
||||
|
||||
define [UToothlessRounded df top] : glyph-proc
|
||||
include : UShape df top 0
|
||||
export : define [ToothlessRounded df top sw fHookLeft] : glyph-proc
|
||||
if fHookLeft : begin
|
||||
include : dispiro
|
||||
widths.rhs sw
|
||||
flat df.leftSB 0 [heading Upward]
|
||||
curl df.leftSB (top - ada)
|
||||
arcvh
|
||||
g4 (df.middle - CorrectionOMidS) (top - O)
|
||||
archv
|
||||
flat df.rightSB (top - adb)
|
||||
curl df.rightSB (TailY + HalfStroke) [heading Downward]
|
||||
include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke) (sw -- sw)
|
||||
include : FlipAround df.middle (top / 2)
|
||||
: else : include : UShape df top 0 (stroke -- sw) (ada -- ada) (adb -- adb)
|
||||
|
||||
define [UToothlessRoundedSmall df top fHookLeft] : glyph-proc
|
||||
if fHookLeft : begin
|
||||
export : define [ToothlessCorner df top sw fHookLeft] : glyph-proc
|
||||
include : VBar.l df.leftSB 0 (top - DToothlessRise) sw
|
||||
include : dispiro
|
||||
widths.rhs
|
||||
flat df.leftSB 0 [heading Upward]
|
||||
curl df.leftSB (top - SmallArchDepthA)
|
||||
arcvh
|
||||
widths.rhs sw
|
||||
g4 df.leftSB (top - DToothlessRise)
|
||||
g4 (df.middle - CorrectionOMidS) (top - O)
|
||||
archv
|
||||
flat df.rightSB (top - SmallArchDepthB)
|
||||
curl df.rightSB (TailY + HalfStroke) [heading Downward]
|
||||
include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke)
|
||||
flat df.rightSB (top - adb)
|
||||
curl df.rightSB [if fHookLeft (TailY + HalfStroke) 0] [heading Downward]
|
||||
if fHookLeft : include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke) (sw -- sw)
|
||||
include : FlipAround df.middle (top / 2)
|
||||
: else : include : UShape df top 0 (ada -- SmallArchDepthA) (adb -- SmallArchDepthB)
|
||||
|
||||
define [UToothlessCorner df top] : glyph-proc
|
||||
include : VBar.l df.leftSB 0 (top - DToothlessRise)
|
||||
include : dispiro
|
||||
widths.rhs
|
||||
g4 df.leftSB (top - DToothlessRise)
|
||||
g4 (df.middle - CorrectionOMidS) (top - O)
|
||||
archv
|
||||
flat df.rightSB (top - ArchDepthB)
|
||||
curl df.rightSB 0 [heading Downward]
|
||||
include : FlipAround df.middle (top / 2)
|
||||
|
||||
define [UToothlessCornerSmall df top fHookLeft] : glyph-proc
|
||||
include : VBar.l df.leftSB 0 (top - DToothlessRise)
|
||||
include : dispiro
|
||||
widths.rhs
|
||||
g4 df.leftSB (top - DToothlessRise)
|
||||
g4 (df.middle - CorrectionOMidS) (top - O)
|
||||
archv
|
||||
flat df.rightSB (top - SmallArchDepthB)
|
||||
curl df.rightSB [if fHookLeft (TailY + HalfStroke) 0] [heading Downward]
|
||||
if fHookLeft : include : RetroflexHook.rExt df.rightSB (TailY + HalfStroke)
|
||||
include : FlipAround df.middle (top / 2)
|
||||
define UUpper : UShapeGroup ArchDepthA ArchDepthB
|
||||
define ULower : UShapeGroup SmallArchDepthA SmallArchDepthB
|
||||
|
||||
define [UTopLeftSerif df yTop _sw] : tagged 'serifLT'
|
||||
HSerif.lt df.leftSB yTop SideJut _sw
|
||||
|
@ -149,12 +146,13 @@ glyph-block Letter-Latin-U : begin
|
|||
local sf : SerifFrame.fromDf df top 0 (swSerif -- _sw)
|
||||
return : composite-proc sf.lt.full sf.rt.full
|
||||
|
||||
glyph-block-export CapitalUConfig
|
||||
define CapitalUConfig : SuffixCfg.weave
|
||||
object # body
|
||||
toothed UToothed
|
||||
tailed UTailed
|
||||
toothlessCorner UToothlessCorner
|
||||
toothlessRounded UToothlessRounded
|
||||
toothed UUpper.Toothed
|
||||
tailed UUpper.Tailed
|
||||
toothlessCorner UUpper.ToothlessCorner
|
||||
toothlessRounded UUpper.ToothlessRounded
|
||||
function [body] : object # serifs
|
||||
serifless { no-shape false }
|
||||
bottomRightSerifed { USerifs.BottomRight false }
|
||||
|
@ -171,7 +169,7 @@ glyph-block Letter-Latin-U : begin
|
|||
create-glyph "U.\(suffix)" : glyph-proc
|
||||
local df : DivFrame 1
|
||||
include : MarkSet.capital
|
||||
include : Base df CAP
|
||||
include : Base df CAP Stroke
|
||||
include : Slabs df CAP
|
||||
|
||||
create-glyph "U/withTonos.\(suffix)" : glyph-proc
|
||||
|
@ -181,16 +179,17 @@ glyph-block Letter-Latin-U : begin
|
|||
create-glyph "smcpU.\(suffix)" : glyph-proc
|
||||
local df : DivFrame 1
|
||||
include : MarkSet.e
|
||||
include : Base df XH
|
||||
include : Base df XH Stroke
|
||||
include : Slabs df XH
|
||||
|
||||
define SmallUConfig : SuffixCfg.weave
|
||||
glyph-block-export SmallUConfigT
|
||||
define [SmallUConfigT shapeGroup] : SuffixCfg.weave
|
||||
object # body
|
||||
toothed UToothed
|
||||
tailed UTailed
|
||||
toothlessCorner UToothlessCornerSmall
|
||||
toothlessRounded UToothlessRoundedSmall
|
||||
urtBase UToothed
|
||||
toothed shapeGroup.Toothed
|
||||
tailed shapeGroup.Tailed
|
||||
toothlessCorner shapeGroup.ToothlessCorner
|
||||
toothlessRounded shapeGroup.ToothlessRounded
|
||||
urtBase shapeGroup.Toothed
|
||||
function [body] : object # serifs
|
||||
serifless no-shape
|
||||
bottomRightSerifed USerifs.BottomRight
|
||||
|
@ -203,17 +202,17 @@ glyph-block Letter-Latin-U : begin
|
|||
[Just 'urtBase'] USerifs.RTBase
|
||||
__ USerifs.SmallToothless
|
||||
|
||||
foreach { suffix { Base Slabs } } [Object.entries SmallUConfig] : do
|
||||
foreach { suffix { Base Slabs } } [Object.entries : SmallUConfigT ULower] : do
|
||||
create-glyph "u.\(suffix)" : glyph-proc
|
||||
local df : DivFrame 1
|
||||
include : MarkSet.e
|
||||
include : Base df XH
|
||||
include : Base df XH Stroke
|
||||
include : Slabs df XH
|
||||
|
||||
create-glyph "grek/mu.\(suffix)" : glyph-proc
|
||||
local df : DivFrame 1
|
||||
include : MarkSet.p
|
||||
include : Base df XH
|
||||
include : Base df XH Stroke
|
||||
include : dispiro
|
||||
widths.rhs
|
||||
flat SB Descender [heading Upward]
|
||||
|
@ -224,7 +223,7 @@ glyph-block Letter-Latin-U : begin
|
|||
create-glyph "uHookLeft.\(suffix)" : glyph-proc
|
||||
local df : DivFrame 1
|
||||
include : MarkSet.e
|
||||
include : Base df XH true
|
||||
include : Base df XH Stroke true
|
||||
include : Slabs df XH
|
||||
eject-contour 'serifLT'
|
||||
|
||||
|
@ -232,7 +231,7 @@ glyph-block Letter-Latin-U : begin
|
|||
local df : DivFrame (XH / Width) 2 (XH * 0.1 / SB)
|
||||
include : df.markSet.e
|
||||
include : PointingTo Width XH Width 0 : function [] : glyph-proc
|
||||
include : Base df (Width - SB)
|
||||
include : Base df (Width - SB) Stroke
|
||||
include : Slabs df (Width - SB)
|
||||
include : Translate 0 (SB / 2)
|
||||
|
||||
|
@ -242,7 +241,7 @@ glyph-block Letter-Latin-U : begin
|
|||
local ww : Width * para.diversityM
|
||||
set-width ww
|
||||
include : PointingTo ww XH ww 0 : function [] : glyph-proc
|
||||
include : Base df (ww - SB - 0.75 * para.diversityM * AccentHeight)
|
||||
include : Base df (ww - SB - 0.75 * para.diversityM * AccentHeight) Stroke
|
||||
include : Slabs df (ww - SB - 0.75 * para.diversityM * AccentHeight)
|
||||
include : Translate 0 (SB / 2)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ $$include '../../meta/macros.ptl'
|
|||
import [mix fallback SuffixCfg] from "@iosevka/util"
|
||||
import [MathSansSerif] from "@iosevka/glyph/relation"
|
||||
import [maskBits bitOr] from "@iosevka/util/mask-bit"
|
||||
import [Seg] from "@iosevka/geometry/segment"
|
||||
|
||||
glyph-module
|
||||
|
||||
|
@ -12,7 +13,7 @@ glyph-block Letter-Latin-Upper-A : begin
|
|||
glyph-block-import Mark-Shared-Metrics : markHalfStroke
|
||||
glyph-block-import Letter-Shared : SetGrekUpperTonos CreateOgonekComposition
|
||||
glyph-block-import Letter-Shared-Shapes : SerifFrame
|
||||
glyph-block-import Letter-Latin-V : VShapeOutline VShape
|
||||
glyph-block-import Letter-Latin-V : VShapeOutline VShape VCornerHalfWidth
|
||||
|
||||
define SLAB-NONE 0
|
||||
define SLAB-TOP 1
|
||||
|
@ -24,7 +25,10 @@ glyph-block Letter-Latin-Upper-A : begin
|
|||
include : VShapeOutline df fBarStraight top sw
|
||||
include : FlipAround (df.width / 2) (top / 2)
|
||||
|
||||
define [ABarPosition fBaseSlabs top] : mix [if fBaseSlabs Stroke 0] top (XH / 2 / CAP)
|
||||
glyph-block-export ABarPosition
|
||||
define [ABarPosition slabKind top] : begin
|
||||
local fBaseSlabs : maskBits slabKind : bitOr SLAB-LEFT SLAB-RIGHT
|
||||
return : mix [if fBaseSlabs Stroke 0] top (XH / 2 / CAP)
|
||||
|
||||
glyph-block-export AConfig
|
||||
define AConfig : SuffixCfg.weave
|
||||
|
@ -45,15 +49,51 @@ glyph-block Letter-Latin-Upper-A : begin
|
|||
if [maskBits slabKind SLAB-TOP] : include : intersection [MaskLeft df.middle]
|
||||
if [maskBits slabKind : bitOr SLAB-LEFT SLAB-RIGHT]
|
||||
: then : HSerif.lt df.middle top (MidJutSide + [HSwToV : 0.25 * sw]) sf.swSerif
|
||||
: else : HSerif.lt df.middle top [mix MidJutSide LongJut 0.5] sf.swSerif
|
||||
: else : HSerif.lt df.middle top [mix MidJutSide LongJut 0.5] sf.swSerif
|
||||
|
||||
glyph-block-export ABottomRightRemoved
|
||||
define [ABottomRightRemoved] : with-params [df fStraightBar slabKind top sw] : new-glyph : glyph-proc
|
||||
define yBar : ABarPosition slabKind top
|
||||
include : VShape df fStraightBar top sw
|
||||
include : FlipAround df.middle (top / 2)
|
||||
eject-contour 'strokeDown'
|
||||
|
||||
local rightStrokeKnots : begin
|
||||
local s : Seg (df.middle + VCornerHalfWidth * sw / Stroke) top df.rightSB (yBar - sw)
|
||||
list
|
||||
s.z 0 flat
|
||||
s.zz 0.55 [StrokeWidthBlend 0.48 0.45] [if fStraightBar curl g4]
|
||||
s.z 1 straight.down.end
|
||||
|
||||
include : intersection
|
||||
MaskAbove (yBar - sw)
|
||||
dispiro [widths.rhs sw] rightStrokeKnots
|
||||
|
||||
include : tagged 'crossBar'
|
||||
intersection
|
||||
HBar.t 0 df.width yBar sw
|
||||
union
|
||||
AMaskShape df fStraightBar top sw
|
||||
intersection
|
||||
MaskRight df.middle
|
||||
MaskAbove (yBar - sw)
|
||||
spiro-outline rightStrokeKnots
|
||||
corner df.rightSB 0
|
||||
corner 0 0
|
||||
corner 0 top
|
||||
|
||||
include : ASerifs df top sw slabKind
|
||||
eject-contour 'serifRB'
|
||||
|
||||
return : yBar - sw
|
||||
|
||||
glyph-block-export ALetterShape
|
||||
define [ALetterShape] : with-params [df fStraightBar slabKind top sw] : new-glyph : glyph-proc
|
||||
include : VShape df fStraightBar top sw
|
||||
include : FlipAround df.middle (top / 2)
|
||||
define yBar : ABarPosition [maskBits slabKind : bitOr SLAB-LEFT SLAB-RIGHT] top
|
||||
define yBar : ABarPosition slabKind top
|
||||
include : tagged 'crossBar'
|
||||
intersection [HBar.t 0 df.width yBar] [AMaskShape df fStraightBar top sw]
|
||||
intersection [HBar.t 0 df.width yBar sw] [AMaskShape df fStraightBar top sw]
|
||||
include : ASerifs df top sw slabKind
|
||||
|
||||
glyph-block-export LambdaShape
|
||||
|
@ -78,7 +118,7 @@ glyph-block Letter-Latin-Upper-A : begin
|
|||
slabKind -- slabKind
|
||||
|
||||
if fOverlays : begin
|
||||
define yBar : ABarPosition [maskBits slabKind : bitOr SLAB-LEFT SLAB-RIGHT] top
|
||||
define yBar : ABarPosition slabKind top
|
||||
eject-contour 'crossBar'
|
||||
include : HOverlayBar [mix 0 SB 0.5] [mix Width RightSB 0.5] (yBar - HalfStroke + 0.5 * OverlayStroke)
|
||||
include : HOverlayBar [mix 0 SB 0.5] [mix Width RightSB 0.5] [mix yBar top 0.25]
|
||||
|
|
|
@ -12,6 +12,7 @@ glyph-block Letter-Latin-V : begin
|
|||
glyph-block-import Letter-Shared-Shapes : DiagTail SerifFrame PalatalHook
|
||||
glyph-block-import Letter-Blackboard : BBS BBD
|
||||
|
||||
glyph-block-export VCornerHalfWidth
|
||||
define VCornerHalfWidth : HSwToV : 1.15 * HalfStroke
|
||||
define VCurviness 0.3
|
||||
define VShapeFine : Math.max
|
||||
|
|
|
@ -3,7 +3,6 @@ $$include '../meta/macros.ptl'
|
|||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [mix linreg clamp fallback] from "@iosevka/util"
|
||||
import [ScheduleLeaningMark] from "@iosevka/glyph/relation"
|
||||
import [Box] from "@iosevka/geometry/box"
|
||||
|
||||
glyph-module
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ $$include '../meta/macros.ptl'
|
|||
import [Arcs Quadify ShapeConv] from "typo-geom"
|
||||
import [mix linreg clamp fallback] from "@iosevka/util"
|
||||
import [DesignParameters] from "../meta/aesthetics.mjs"
|
||||
import [Box] from "@iosevka/geometry/box"
|
||||
|
||||
glyph-module
|
||||
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
{
|
||||
"name": "@iosevka/geometry",
|
||||
"version": "28.0.2",
|
||||
"private": true,
|
||||
"exports": {
|
||||
".": "./src/index.mjs",
|
||||
"./anchor": "./src/anchor.mjs",
|
||||
"./box": "./src/box.mjs",
|
||||
"./curve-util": "./src/curve-util.mjs",
|
||||
"./point": "./src/point.mjs",
|
||||
"./transform": "./src/transform.mjs",
|
||||
"./spiro-control": "./src/spiro-control.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iosevka/util": "28.0.2",
|
||||
"spiro": "^3.0.0",
|
||||
"typo-geom": "^0.13.1"
|
||||
}
|
||||
"name": "@iosevka/geometry",
|
||||
"version": "28.0.2",
|
||||
"private": true,
|
||||
"exports": {
|
||||
".": "./src/index.mjs",
|
||||
"./anchor": "./src/anchor.mjs",
|
||||
"./box": "./src/box.mjs",
|
||||
"./segment": "./src/segment.mjs",
|
||||
"./curve-util": "./src/curve-util.mjs",
|
||||
"./point": "./src/point.mjs",
|
||||
"./transform": "./src/transform.mjs",
|
||||
"./spiro-control": "./src/spiro-control.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iosevka/util": "28.0.2",
|
||||
"spiro": "^3.0.0",
|
||||
"typo-geom": "^0.13.1"
|
||||
}
|
||||
}
|
||||
|
|
28
packages/geometry/src/segment.mjs
Normal file
28
packages/geometry/src/segment.mjs
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { mix } from "@iosevka/util";
|
||||
|
||||
export class CSegment {
|
||||
constructor(x1, y1, x2, y2) {
|
||||
this.x0 = x1;
|
||||
this.y0 = y1;
|
||||
this.x1 = x2;
|
||||
this.y1 = y2;
|
||||
}
|
||||
|
||||
x(t) {
|
||||
return mix(this.x0, this.x1, t);
|
||||
}
|
||||
y(t) {
|
||||
return mix(this.y0, this.y1, t);
|
||||
}
|
||||
|
||||
z(t, fn, ...additionalArgs) {
|
||||
return fn(this.x(t), this.y(t), ...additionalArgs);
|
||||
}
|
||||
zz(tx, ty, fn, ...additionalArgs) {
|
||||
return fn(this.x(tx), this.y(ty), ...additionalArgs);
|
||||
}
|
||||
}
|
||||
|
||||
export function Seg(x0, y0, x1, y1) {
|
||||
return new CSegment(x0, y0, x1, y1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue