From 7dafab53164d94e182632513056853991291ee75 Mon Sep 17 00:00:00 2001 From: be5invis Date: Sat, 16 Sep 2023 13:29:05 -0700 Subject: [PATCH] * Add Characters - VERY MUCH LESS-THAN (`U+22D8`) (#1990). - VERY MUCH GREATER-THAN (`U+22D9`) (#1990). --- changes/27.0.1.md | 3 + font-src/glyphs/symbol/math/relation.ptl | 80 +++++++++++++----------- 2 files changed, 46 insertions(+), 37 deletions(-) create mode 100644 changes/27.0.1.md diff --git a/changes/27.0.1.md b/changes/27.0.1.md new file mode 100644 index 000000000..0bdd8e377 --- /dev/null +++ b/changes/27.0.1.md @@ -0,0 +1,3 @@ +* Add Characters + - VERY MUCH LESS-THAN (`U+22D8`) (#1990). + - VERY MUCH GREATER-THAN (`U+22D9`) (#1990). diff --git a/font-src/glyphs/symbol/math/relation.ptl b/font-src/glyphs/symbol/math/relation.ptl index ec9da28ae..c5f76a059 100644 --- a/font-src/glyphs/symbol/math/relation.ptl +++ b/font-src/glyphs/symbol/math/relation.ptl @@ -216,8 +216,9 @@ glyph-block Symbol-Math-Relation-Addons : begin glyph-block-import Common-Derivatives glyph-block-import Symbol-Math-Relation-Common : lessEqDist dH dSH - glyph-block-export lesslessSW lesslessSWO llggHeight - define lesslessSW : AdviceStroke 4 + glyph-block-export lesslessSW muchLessSW lesslessSWO llggHeight + define lesslessSW : AdviceStroke 3.5 + define muchLessSW : AdviceStroke 4.5 para.diversityM define lesslessSWO : Math.max lesslessSW lessEqDist define llggHeight : dH * 2 + lessEqDist * 2 @@ -378,7 +379,7 @@ glyph-block Symbol-Math-Relation-Inequality : begin glyph-block-import Common-Derivatives glyph-block-import Symbol-Math-Relation-Common : dH dSH lessEqDist glyph-block-import Symbol-Math-Relation-Sym : symWave - glyph-block-import Symbol-Math-Relation-Addons : lesslessSW llggHeight + glyph-block-import Symbol-Math-Relation-Addons : lesslessSW muchLessSW llggHeight glyph-block-import Symbol-Math-Relation-Addon-Glyphs define [LessGreaterExpansion top bot l r] @@ -392,47 +393,41 @@ glyph-block Symbol-Math-Relation-Inequality : begin corner l top corner l bot corner r [mix bot top 0.5] - define [LessShapeA top bot l r s p] : begin + + define [LessShapeHalf sign top bot l r s p] : begin define exp : LessGreaterExpansion top bot l r + define expAmend : Math.min [Math.sqrt 2] exp + define endAdj : 0.5 * s * (exp - expAmend) define pp : fallback p 1 + return : dispiro widths.center s - flat [mix l r pp] [mix [mix top bot 0.5] top pp] - curl l [mix top bot 0.5] [widths.heading (s / 2 * exp) (s / 2 * exp) Leftward] - define [LessShapeB top bot l r s p] : begin + flat [mix l r pp] [mix [mix top bot 0.5] [mix bot top sign] pp] + curl (l - endAdj) [mix top bot 0.5] [widths.center.heading (s * expAmend) Leftward] + + define [GreaterShapeHalf sign top bot l r s p] : begin define exp : LessGreaterExpansion top bot l r + define expAmend : Math.min [Math.sqrt 2] exp + define endAdj : 0.5 * s * (exp - expAmend) define pp : fallback p 1 + return : dispiro widths.center s - flat [mix l r pp] [mix [mix top bot 0.5] bot pp] - curl l [mix top bot 0.5] [widths.heading (s / 2 * exp) (s / 2 * exp) Leftward] - define [GreaterShapeA top bot l r s p] : begin - define exp : LessGreaterExpansion top bot l r - define pp : fallback p 1 - return : dispiro - widths.center s - flat [mix r l pp] [mix [mix top bot 0.5] top pp] - curl r [mix top bot 0.5] [widths.heading (s / 2 * exp) (s / 2 * exp) Rightward] - define [GreaterShapeB top bot l r s p] : begin - define exp : LessGreaterExpansion top bot l r - define pp : fallback p 1 - return : dispiro - widths.center s - flat [mix r l pp] [mix [mix top bot 0.5] bot pp] - curl r [mix top bot 0.5] [widths.heading (s / 2 * exp) (s / 2 * exp) Rightward] + flat [mix r l pp] [mix [mix top bot 0.5] [mix bot top sign] pp] + curl (r + endAdj) [mix top bot 0.5] [widths.center.heading (s * expAmend) Rightward] glyph-block-export LessShape define [LessShape top bot l r s] : union - LessShapeA top bot l r [fallback s OperatorStroke] - LessShapeB top bot l r [fallback s OperatorStroke] + LessShapeHalf 0 top bot l r [fallback s OperatorStroke] + LessShapeHalf 1 top bot l r [fallback s OperatorStroke] glyph-block-export LigationLessShape define [LigationLessShape top bot l r s t gap] : union intersection Rect [mix bot top 2] [mix top bot 2] [mix r l 2] r union - LessShapeA top bot l r [fallback s OperatorStroke] 2 - LessShapeB top bot l r [fallback s OperatorStroke] 2 + LessShapeHalf 0 top bot l r [fallback s OperatorStroke] 2 + LessShapeHalf 1 top bot l r [fallback s OperatorStroke] 2 intersection LessMaskShape top bot l r difference @@ -446,16 +441,16 @@ glyph-block Symbol-Math-Relation-Inequality : begin glyph-block-export GreaterShape define [GreaterShape top bot l r s] : union - GreaterShapeA top bot l r [fallback s OperatorStroke] - GreaterShapeB top bot l r [fallback s OperatorStroke] + GreaterShapeHalf 0 top bot l r [fallback s OperatorStroke] + GreaterShapeHalf 1 top bot l r [fallback s OperatorStroke] glyph-block-export LigationGreaterShape define [LigationGreaterShape top bot l r s t gap] : union intersection Rect [mix bot top 2] [mix top bot 2] [mix l r 2] l union - GreaterShapeA top bot l r [fallback s OperatorStroke] 2 - GreaterShapeB top bot l r [fallback s OperatorStroke] 2 + GreaterShapeHalf 0 top bot l r [fallback s OperatorStroke] 2 + GreaterShapeHalf 1 top bot l r [fallback s OperatorStroke] 2 intersection GreaterMaskShape top bot l r difference @@ -498,11 +493,11 @@ glyph-block Symbol-Math-Relation-Inequality : begin derive-composites 'lessSym' 0x2272 'lessEqUpper' 'symLower' derive-composites 'lessSymBarNegated' 0x22E6 'lessEqUpper' 'symBarNegatedLower' derive-composites 'lessEqSlant' 0x2A7D 'lessEqUpper' - LessShapeB (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB OperatorStroke + LessShapeHalf 0 (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB OperatorStroke WithDotVariants 'lessEqSlantDot' 0x2A7F : function [DrawAt kr ov] : composite-proc LessShape (SymbolMid + dSH + lessEqDist) (SymbolMid - dSH + lessEqDist) SB RightSB [AdviceStroke 4] - LessShapeB (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB [AdviceStroke 4] + LessShapeHalf 0 (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB [AdviceStroke 4] DrawAt (RightSB - DotRadius) (SymbolMid + lessEqDist) (DotRadius * kr * [AdviceStroke 4] / Stroke - ov) derive-composites 'greater.narrow' null 'greaterEqUpper' [ApparentTranslate 0 (-lessEqDist)] @@ -511,11 +506,11 @@ glyph-block Symbol-Math-Relation-Inequality : begin derive-composites 'greaterSym' 0x2273 'greaterEqUpper' 'symLower' derive-composites 'greaterSymBarNegated' 0x22E7 'greaterEqUpper' 'symBarNegatedLower' derive-composites 'greaterEqSlant' 0x2A7E 'greaterEqUpper' - GreaterShapeB (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB OperatorStroke + GreaterShapeHalf 0 (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB OperatorStroke WithDotVariants 'greaterEqSlantDot' 0x2A80 : function [DrawAt kr ov] : composite-proc GreaterShape (SymbolMid + dSH + lessEqDist) (SymbolMid - dSH + lessEqDist) SB RightSB [AdviceStroke 4] - GreaterShapeB (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB [AdviceStroke 4] + GreaterShapeHalf 0 (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) SB RightSB [AdviceStroke 4] DrawAt (SB + DotRadius) (SymbolMid + lessEqDist) (DotRadius * kr * [AdviceStroke 4] / Stroke - ov) derive-composites 'normalSubsetEq' 0x22B4 'normalSubsetUpper' 'eqLower' @@ -541,10 +536,10 @@ glyph-block Symbol-Math-Relation-Inequality : begin create-aliased-glyph 'eq.at-gteq.lig2.flat' create-glyph 'eq.at-lteq.lig2.slanted' : glyph-proc Joining.set currentGlyph Joining.Classes.Left - include : LessShapeB (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) l2 r2 OperatorStroke + include : LessShapeHalf 0 (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) l2 r2 OperatorStroke create-glyph 'eq.at-gteq.lig2.slanted' : glyph-proc Joining.set currentGlyph Joining.Classes.Left - include : GreaterShapeB (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) l2 r2 OperatorStroke + include : GreaterShapeHalf 0 (SymbolMid + dH - lessEqDist) (SymbolMid - dH - lessEqDist) l2 r2 OperatorStroke select-variant 'eq.at-lteq.lig2' select-variant 'eq.at-gteq.lig2' @@ -592,6 +587,17 @@ glyph-block Symbol-Math-Relation-Inequality : begin include : GreaterShape (SymbolMid + dH) (SymbolMid - dH) (SB - lessEqDist / 2) (RightSB - lessEqDist * 2) lesslessSW include : GreaterShape (SymbolMid + dH) (SymbolMid - dH) (SB + lessEqDist * 2) (RightSB + lessEqDist / 2) lesslessSW + create-glyph 'muchLess' 0x22D8 : glyph-proc + local df : include : DivFrame para.diversityM 3 + include : LessShape (SymbolMid + dH) (SymbolMid - dH) [mix df.leftSB df.rightSB (0/3)] [mix df.leftSB df.rightSB (1/3)] muchLessSW + include : LessShape (SymbolMid + dH) (SymbolMid - dH) [mix df.leftSB df.rightSB (1/3)] [mix df.leftSB df.rightSB (2/3)] muchLessSW + include : LessShape (SymbolMid + dH) (SymbolMid - dH) [mix df.leftSB df.rightSB (2/3)] [mix df.leftSB df.rightSB (3/3)] muchLessSW + create-glyph 'muchGreater' 0x22D9 : glyph-proc + local df : include : DivFrame para.diversityM + include : GreaterShape (SymbolMid + dH) (SymbolMid - dH) [mix df.leftSB df.rightSB (0/3)] [mix df.leftSB df.rightSB (1/3)] muchLessSW + include : GreaterShape (SymbolMid + dH) (SymbolMid - dH) [mix df.leftSB df.rightSB (1/3)] [mix df.leftSB df.rightSB (2/3)] muchLessSW + include : GreaterShape (SymbolMid + dH) (SymbolMid - dH) [mix df.leftSB df.rightSB (2/3)] [mix df.leftSB df.rightSB (3/3)] muchLessSW + glyph-block Symbol-Math-Relation-Precedes-Succeeds : begin glyph-block-import CommonShapes glyph-block-import Common-Derivatives