Merge pull request #2770 from jmcwilliams403/UShape

Move `[UShape]` to `common/shapes.ptl`.
This commit is contained in:
Belleve 2025-05-18 09:51:25 -10:00 committed by GitHub
commit 5760ba1fa8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 48 additions and 51 deletions

View file

@ -233,6 +233,26 @@ glyph-block CommonShapes : begin
arch.lhs.centerAt.rtl.t (middle + gap / 2) u (sw -- width) (knot-ty -- flat) arch.lhs.centerAt.rtl.t (middle + gap / 2) u (sw -- width) (knot-ty -- flat)
arch.lhs.centerAt.rtl.t middle u (sw -- width) (knot-ty -- curl) arch.lhs.centerAt.rtl.t middle u (sw -- width) (knot-ty -- curl)
glyph-block-export UShapeT
define [UShapeT] : with-params [sink df top bottom [stroke Stroke] [ada ArchDepthA] [adb ArchDepthB] [offset 0]] : sink
widths.lhs stroke
[if (sink == spiro-outline) corner flat] (df.leftSB + offset) top [heading Downward]
curl (df.leftSB + offset) (bottom + adb + offset)
arch.lhs (bottom + offset) (sw -- stroke)
flat (df.rightSB - offset) (bottom + ada + offset)
[if (sink == spiro-outline) corner curl] (df.rightSB - offset) top [heading Upward]
glyph-block-export UShape
define [UShape] : with-params [df top bottom [stroke Stroke] [ada ArchDepthA] [adb ArchDepthB] [offset 0]] : glyph-proc
include : UShapeT dispiro
df -- df
top -- top
bottom -- bottom
stroke -- stroke
ada -- ada
adb -- adb
offset -- offset
glyph-block-export HSerif glyph-block-export HSerif
define HSerif : namespace define HSerif : namespace
export : define [lt x y length _sw _swRef] : glyph-proc export : define [lt x y length _sw _swRef] : glyph-proc

View file

@ -9,7 +9,6 @@ glyph-block Letter-Armenian-Upper-U-Group : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : SerifFrame glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Latin-U : UShape USerifs
glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar glyph-block-import Letter-Armenian-Shared-Shapes : ArmHBar
do "Ayb" do "Ayb"
@ -19,7 +18,9 @@ glyph-block Letter-Armenian-Upper-U-Group : begin
include : df.markSet.capital include : df.markSet.capital
include : UShape df CAP 1 df.mvs include : UShape df CAP 1 df.mvs
include : QCrossing df CAP QInnerDiagSw include : QCrossing df CAP QInnerDiagSw
if SLAB : include : USerifs.Toothless df CAP df.mvs if SLAB : begin
local sf : SerifFrame.fromDf df CAP 0
include : composite-proc sf.lt.full sf.rt.full
do "Men" do "Men"
create-glyph 'armn/Men' 0x544 : glyph-proc create-glyph 'armn/Men' 0x544 : glyph-proc
@ -28,7 +29,8 @@ glyph-block Letter-Armenian-Upper-U-Group : begin
include : UShape df CAP 0 df.mvs include : UShape df CAP 0 df.mvs
include : [ArmHBar.right df].cap include : [ArmHBar.right df].cap
if SLAB : begin if SLAB : begin
include : USerifs.Toothless df CAP df.mvs local sf : SerifFrame.fromDf df CAP 0
include : composite-proc sf.lt.full sf.rt.full
do "Vo" do "Vo"
create-glyph 'armn/Vo' 0x548 : glyph-proc create-glyph 'armn/Vo' 0x548 : glyph-proc
@ -57,4 +59,5 @@ glyph-block Letter-Armenian-Upper-U-Group : begin
include : df.markSet.capital include : df.markSet.capital
include : UShape df CAP 1 df.mvs include : UShape df CAP 1 df.mvs
if SLAB : begin if SLAB : begin
include : USerifs.Toothless df CAP df.mvs local sf : SerifFrame.fromDf df CAP 0
include : composite-proc sf.lt.full sf.rt.full

View file

@ -10,7 +10,6 @@ glyph-block Letter-Armenian-Upper-Xeh : begin
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : SerifFrame glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Latin-Lower-AE-OE : SubDfAndShift glyph-block-import Letter-Latin-Lower-AE-OE : SubDfAndShift
glyph-block-import Letter-Latin-U : UShape
do "Xeh" do "Xeh"
create-glyph 'armn/Xeh' 0x53D : glyph-proc create-glyph 'armn/Xeh' 0x53D : glyph-proc

View file

@ -8,43 +8,38 @@ glyph-block Letter-Cyrillic-Djerv : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Shared-Shapes : LetterBarOverlay SerifFrame glyph-block-import Letter-Shared-Shapes : LetterBarOverlay SerifFrame
glyph-block-import Letter-Latin-U : UShape
define [DjervBar df top py fSlab] : begin define [RStirrupShape df top py ada adb] : glyph-proc
local stroke : AdviceStroke2 2 3 top local uBot : mix top 0 py
return : LetterBarOverlay.m.in
x -- df.middle
bot -- top * py
top -- top - [if fSlab Stroke 0]
define [DjervShape df top py fSmall fSlab] : glyph-proc
local uBot : top * (1 - py)
include : VBar.m df.middle 0 uBot include : VBar.m df.middle 0 uBot
include : if fSmall include : UShape df top uBot nothing ada adb
UShape df top uBot (ada -- SmallArchDepthA) (adb -- SmallArchDepthB)
UShape df top uBot
include : FlipAround df.middle (top / 2) include : FlipAround df.middle (top / 2)
if fSlab : begin define [DjervShape df top py ada adb] : glyph-proc
include : RStirrupShape df top py ada adb
if SLAB : begin
local sf : SerifFrame.fromDf df top 0 local sf : SerifFrame.fromDf df top 0
include sf.lb.full include sf.lb.full
include sf.rb.full include sf.rb.full
include sf.mt.full include sf.mt.full
include : LetterBarOverlay.m.in
x -- df.middle
bot -- (top * py)
top -- (top - [if SLAB Stroke 0])
create-glyph 'cyrl/Djerv' 0xA648 : glyph-proc create-glyph 'cyrl/Djerv' 0xA648 : glyph-proc
define df : include : DivFrame 1 define df : include : DivFrame 1
include : df.markSet.capital include : df.markSet.capital
include : DjervShape df CAP 0.6 false SLAB include : DjervShape df CAP 0.6 ArchDepthA ArchDepthB
include : DjervBar df CAP 0.6 SLAB
create-glyph 'cyrl/djerv' 0xA649 : glyph-proc create-glyph 'cyrl/djerv' 0xA649 : glyph-proc
define df : include : DivFrame 1 define df : include : DivFrame 1
include : df.markSet.e include : df.markSet.e
include : DjervShape df XH 0.6 true SLAB include : DjervShape df XH 0.6 SmallArchDepthA SmallArchDepthB
include : DjervBar df XH 0.6 SLAB
create-glyph 'rStirrup' 0xAB45 : glyph-proc create-glyph 'rStirrup' 0xAB45 : glyph-proc
define df : include : DivFrame 1 define df : include : DivFrame 1
include : df.markSet.e include : df.markSet.e
include : DjervShape df XH 0.6 false false include : RStirrupShape df XH 0.6 ArchDepthA ArchDepthB

View file

@ -13,25 +13,6 @@ glyph-block Letter-Latin-U : begin
glyph-block-import Letter-Shared-Shapes : uBowl RightwardTailedBar SerifFrame glyph-block-import Letter-Shared-Shapes : uBowl RightwardTailedBar SerifFrame
glyph-block-import Letter-Shared-Shapes : CyrDescender CyrTailDescender RetroflexHook TopHook glyph-block-import Letter-Shared-Shapes : CyrDescender CyrTailDescender RetroflexHook TopHook
define [UArcT] : with-params [sink df top bottom [stroke Stroke] [ada ArchDepthA] [adb ArchDepthB] [offset 0]] : sink
widths.lhs stroke
[if (sink == spiro-outline) corner flat] (df.leftSB + offset) top [heading Downward]
curl (df.leftSB + offset) (bottom + adb + offset)
arch.lhs (bottom + offset) (sw -- stroke)
flat (df.rightSB - offset) (bottom + ada + offset)
[if (sink == spiro-outline) corner curl] (df.rightSB - offset) top [heading Upward]
glyph-block-export UShape
define [UShape] : with-params [df top bottom [stroke Stroke] [ada ArchDepthA] [adb ArchDepthB] [offset 0]] : glyph-proc
include : UArcT dispiro
df -- df
top -- top
bottom -- bottom
stroke -- stroke
ada -- ada
adb -- adb
offset -- offset
glyph-block-export UShapeGroup glyph-block-export UShapeGroup
define [UShapeGroup ada adb] : namespace define [UShapeGroup ada adb] : namespace
export : define [Toothed df top sw fHookLeft fShortLeg] : glyph-proc export : define [Toothed df top sw fHookLeft fShortLeg] : glyph-proc
@ -406,7 +387,7 @@ glyph-block Letter-Latin-U : begin
stroke -- BBS stroke -- BBS
include : intersection include : intersection
VBar.l (SB + BBD) 0 CAP BBS VBar.l (SB + BBD) 0 CAP BBS
UArcT spiro-outline [DivFrame 1] CAP 0 UShapeT spiro-outline [DivFrame 1] CAP 0
stroke -- BBS stroke -- BBS
oper -- true oper -- true
offset -- 1 offset -- 1

View file

@ -305,8 +305,8 @@ define-macro glyph-block-import : syntax-rules
derive-glyphs derive-composites link-reduced-variant alias-reduced-variant HalfAdvance derive-glyphs derive-composites link-reduced-variant alias-reduced-variant HalfAdvance
derive-multi-part-glyphs DeriveMeshT link-gr] derive-multi-part-glyphs DeriveMeshT link-gr]
CommonShapes `[no-shape tagged Rect SquareAt Ring RingAt DotAt RingStroke CommonShapes `[no-shape tagged Rect SquareAt Ring RingAt DotAt RingStroke RingStrokeAt
RingStrokeAt DotStrokeAt Circle Ellipse OShapeT OShape OShapeOutline OShapeFlatTB HSerif DotStrokeAt Circle Ellipse OShapeT OShape OShapeOutline OShapeFlatTB UShapeT UShape HSerif
VSerif NeedSlab NeedNotItalic HBar HOverlayBar HOverlayObliqueBar VBar FlatSlashShape VSerif NeedSlab NeedNotItalic HBar HOverlayBar HOverlayObliqueBar VBar FlatSlashShape
hookstart hookend flatside arch Ungizmo Regizmo FlipAround ScaleAround Realign ForceUpright hookstart hookend flatside arch Ungizmo Regizmo FlipAround ScaleAround Realign ForceUpright
DiagCor NameUni PointingTo with-transform with-outlined remove-holes radicalize clear-geometry DiagCor NameUni PointingTo with-transform with-outlined remove-holes radicalize clear-geometry

View file

@ -10,7 +10,6 @@ glyph-module
glyph-block Symbol-Math-APL : begin glyph-block Symbol-Math-APL : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Latin-U : UShape
# Dimensions # Dimensions
define aplBoxInnerTop BgOpTop define aplBoxInnerTop BgOpTop

View file

@ -9,7 +9,6 @@ glyph-block Symbol-Math-Large-Operators : for-width-kinds WideWidth1
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Shared-Symbol-Shapes : TriangleShape glyph-block-import Shared-Symbol-Shapes : TriangleShape
glyph-block-import Letter-Latin-Long-S : LongSShape glyph-block-import Letter-Latin-Long-S : LongSShape
glyph-block-import Letter-Latin-U : UShape
glyph-block-import Letter-Greek-Upper-Sigma : SigmaShape glyph-block-import Letter-Greek-Upper-Sigma : SigmaShape
glyph-block-import Letter-Greek-Pi : PiShape glyph-block-import Letter-Greek-Pi : PiShape
glyph-block-import Letter-Blackboard : BBS BBD glyph-block-import Letter-Blackboard : BBS BBD

View file

@ -7,7 +7,7 @@ glyph-module
glyph-block Symbol-Math-VAndCup : begin glyph-block Symbol-Math-VAndCup : begin
glyph-block-import CommonShapes glyph-block-import CommonShapes
glyph-block-import Common-Derivatives glyph-block-import Common-Derivatives
glyph-block-import Letter-Latin-U : UShape USerifs glyph-block-import Letter-Shared-Shapes : SerifFrame
glyph-block-import Letter-Greek-Pi : PiShape glyph-block-import Letter-Greek-Pi : PiShape
glyph-block-import Letter-Cyrillic-Sha : CyrShaShape glyph-block-import Letter-Cyrillic-Sha : CyrShaShape
glyph-block-import Symbol-Arrow-Shared : ArrowShape glyph-block-import Symbol-Arrow-Shared : ArrowShape
@ -258,7 +258,8 @@ glyph-block Symbol-Math-VAndCup : begin
create-glyph 'cupClosedSerifed' 0x2A4C : glyph-proc create-glyph 'cupClosedSerifed' 0x2A4C : glyph-proc
include : UShape [DivFrame 1] OperTop OperBot (stroke -- OperatorStroke) include : UShape [DivFrame 1] OperTop OperBot (stroke -- OperatorStroke)
include : HBar.t SB RightSB OperTop OperatorStroke include : HBar.t SB RightSB OperTop OperatorStroke
include : USerifs.Toothless [DivFrame 1] OperTop OperatorStroke local sf : SerifFrame.fromDf [DivFrame 1] OperTop OperBot (swSerif -- OperatorStroke)
include : composite-proc sf.lt.full sf.rt.full
turned 'capClosedSerifed' 0x2A4D 'cupClosedSerifed' Middle SymbolMid turned 'capClosedSerifed' 0x2A4D 'cupClosedSerifed' Middle SymbolMid