Add Ellipses (U+2B2C ... U+2B2F).

This commit is contained in:
be5invis 2021-01-15 03:15:39 -08:00
parent a47951e715
commit c07c1ca10b
5 changed files with 50 additions and 13 deletions

View file

@ -6,6 +6,7 @@
- Equivalent To and Not Equivalent To (`U+224D`, `U+226D`). - Equivalent To and Not Equivalent To (`U+224D`, `U+226D`).
- XOR, NAND and NOR (`U+22BB` ... `U+22BD`). - XOR, NAND and NOR (`U+22BB` ... `U+22BD`).
- Upper-half and Lower-half filled square (`U+2B12`, `U+2B13`). - Upper-half and Lower-half filled square (`U+2B12`, `U+2B13`).
- Ellipses (`U+2B2C` ... `U+2B2F`).
- Medium and Small Stars, Large Heavy White Circle (`U+2B50` ... `U+2B52`, `U+2B55`). - Medium and Small Stars, Large Heavy White Circle (`U+2B50` ... `U+2B52`, `U+2B55`).
- Barb Arrows (`U+2794`, `U+1F860` ... `U+1F887`, #792). - Barb Arrows (`U+2794`, `U+1F860` ... `U+1F887`, #792).
- Sans Serif Arrows (`U+1F850` ... `U+1F859`). - Sans Serif Arrows (`U+1F850` ... `U+1F859`).

View file

@ -191,13 +191,13 @@ glyph-block Symbol-Geometric-Masked : for-width-kinds WideWidth1
set-width Geom.Width set-width Geom.Width
include : difference include : difference
refer-glyph : MangleName 'blackLongRectangle' refer-glyph : MangleName 'blackLongRectangle'
refer-glyph : MangleName 'blackCircle' refer-glyph : MangleName 'blackInvInnerCircle'
create-glyph [MangleName 'uni25D9'] [MangleUnicode 0x25D9] : glyph-proc create-glyph [MangleName 'uni25D9'] [MangleUnicode 0x25D9] : glyph-proc
set-width Geom.Width set-width Geom.Width
include : difference include : difference
refer-glyph : MangleName 'blackLongRectangle' refer-glyph : MangleName 'blackLongRectangle'
refer-glyph : MangleName 'whiteCircle' refer-glyph : MangleName 'whiteInvInnerCircle'
create-glyph [MangleName 'uni25DA'] [MangleUnicode 0x25DA] : glyph-proc create-glyph [MangleName 'uni25DA'] [MangleUnicode 0x25DA] : glyph-proc
set-width Geom.Width set-width Geom.Width

View file

@ -211,11 +211,13 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1
StdBlackShape RectangleFill 'blackRectangle' 0x25AC StdBlackShape RectangleFill 'blackRectangle' 0x25AC
ConvexWhitePolygon RectangleFill 'whiteRectangle' 0x25AD ConvexWhitePolygon RectangleFill 'whiteRectangle' 0x25AD
define [LongRectangleFill cx cy r] : spiro-outline define [LongRectangleFill cx cy r] : begin
corner (cx - r) (cy + r * 1.5) define rs : Geom.TallSize / (r * 1.5)
corner (cx + r) (cy + r * 1.5) return : spiro-outline
corner (cx + r) (cy - r * 1.5) corner (cx - r * rs) (cy + r * rs * 1.5)
corner (cx - r) (cy - r * 1.5) corner (cx + r * rs) (cy + r * rs * 1.5)
corner (cx + r * rs) (cy - r * rs * 1.5)
corner (cx - r * rs) (cy - r * rs * 1.5)
StdBlackShape LongRectangleFill 'blackLongRectangle' 0x25AE StdBlackShape LongRectangleFill 'blackLongRectangle' 0x25AE
ConvexWhitePolygon LongRectangleFill 'whiteLongRectangle' 0x25AF ConvexWhitePolygon LongRectangleFill 'whiteLongRectangle' 0x25AF
@ -391,12 +393,21 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1
do "Circle" do "Circle"
define [CircleShape cx cy size] : spiro-outline define [CircleShape cx cy size] : spiro-outline
g4 cx (cy + size)
g4 (cx - size) cy g4 (cx - size) cy
arcvh.superness 2
g4 cx (cy - size) g4 cx (cy - size)
archv.superness 2
g4 (cx + size) cy g4 (cx + size) cy
arcvh.superness 2
g4 cx (cy + size)
archv.superness 2
close close
define [CircleInvertInnerShape cx cy size sw] : begin
define sizeOrig : size + sw
define rs : Geom.TallSize / (sizeOrig * 1.5)
return : CircleShape cx cy (sizeOrig * rs - sw)
StdBlackShape CircleShape 'blackCircleO' null StdBlackShape CircleShape 'blackCircleO' null
StdBlackShape CircleShape 'blackCircle' 0x25CF StdBlackShape CircleShape 'blackCircle' 0x25CF
@ -424,6 +435,9 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1
StdGeomTargetShape CircleShape 'circleTarget' 0x1F78B StdGeomTargetShape CircleShape 'circleTarget' 0x1F78B
StdBlackShape CircleInvertInnerShape 'blackInvInnerCircle' null
StdWhiteShape CircleInvertInnerShape 'whiteInvInnerCircle' null
create-glyph [MangleName 'dottedCircle'] [MangleUnicode 0x25CC] : glyph-proc create-glyph [MangleName 'dottedCircle'] [MangleUnicode 0x25CC] : glyph-proc
set-width Geom.Width set-width Geom.Width
include : [DivFrame Geom.Scalar].markSet.plus include : [DivFrame Geom.Scalar].markSet.plus
@ -452,6 +466,25 @@ glyph-block Symbol-Geometric-Plain : for-width-kinds WideWidth1
include : CircleRingAt box.Right [mix box.Top box.Bot t] fine include : CircleRingAt box.Right [mix box.Top box.Bot t] fine
include : CircleRingAt [mix box.Right box.Left t] box.Bot fine include : CircleRingAt [mix box.Right box.Left t] box.Bot fine
do "Ellipse"
define [EllipseFillT kx ky] : lambda [cx cy r s] : begin
define rOrig : r + s
return : spiro-outline
g4 (cx - (rOrig * kx - s)) cy
arcvh.superness 2
g4 cx (cy - (rOrig * ky - s))
archv.superness 2
g4 (cx + (rOrig * kx - s)) cy
arcvh.superness 2
g4 cx (cy + (rOrig * ky - s))
archv.superness 2
close
StdBlackShape [EllipseFillT 1 (1 / 1.5)] 'blackEllipse' 0x2B2C
StdWhiteShape [EllipseFillT 1 (1 / 1.5)] 'whiteEllipse' 0x2B2D
StdBlackShape [EllipseFillT (1 / 1.5) 1] 'blackLongEllipse' 0x2B2E
StdWhiteShape [EllipseFillT (1 / 1.5) 1] 'whiteLongEllipse' 0x2B2F
do "Regular Polygon" do "Regular Polygon"
define [RegularPolygonFill sides skip overflow phase] : lambda [cx cy size] : begin define [RegularPolygonFill sides skip overflow phase] : lambda [cx cy size] : begin
local corners {} local corners {}

View file

@ -7,13 +7,16 @@ glyph-module
glyph-block Symbol-Geometric-Shared : begin glyph-block Symbol-Geometric-Shared : begin
glyph-block-export GeometricDim glyph-block-export GeometricDim
define [GeometricDim UnitWidth fullWidth] : begin define [GeometricDim unitWidth fullWidth] : begin
define s : fullWidth / UnitWidth define s : fullWidth / unitWidth
define size : 0.5 * fullWidth - 0.625 * SB * s * s define sb : 0.625 * SB * s * s
define tallSize : 0.5 * para.arrowHeight * (unitWidth - sb) * [Math.pow s (1 / 3)]
define size : Math.min (0.5 * fullWidth - sb) tallSize
return : object return : object
UnitWidth UnitWidth UnitWidth unitWidth
Scalar s Scalar s
Size size Size size
TallSize tallSize
Width fullWidth Width fullWidth
Left : 0.5 * fullWidth - size Left : 0.5 * fullWidth - size
MidX : 0.5 * fullWidth MidX : 0.5 * fullWidth

View file

@ -166,7 +166,7 @@ export : define [calculateMetrics para] : begin
define MVertStroke : MVertStrokeD 3 1 define MVertStroke : MVertStrokeD 3 1
define OverlayStroke : AdviceStroke 3.75 define OverlayStroke : AdviceStroke 3.75
define OperatorStroke : AdviceStroke 3 define OperatorStroke : AdviceStroke 3
define GeometryStroke : AdviceStroke 4.5 define GeometryStroke : AdviceStroke 4
define ShoulderFine : Math.min (Stroke * para.shoulderfineMin) [AdviceStroke 16] define ShoulderFine : Math.min (Stroke * para.shoulderfineMin) [AdviceStroke 16]
define [_SuperXY x superness] : Math.pow define [_SuperXY x superness] : Math.pow