diff --git a/changes/5.0.0-beta.2.md b/changes/5.0.0-beta.2.md index 5983547fb..66a211fa3 100644 --- a/changes/5.0.0-beta.2.md +++ b/changes/5.0.0-beta.2.md @@ -4,3 +4,4 @@ * Add serifed and top-serifed variants for `S` and `s` (#822). * Add oblique-upper-left-bar variant for `5` (#820). * Add oval variant for `0` (#828). + * Add corner and flat-hooked variants for `?` (#829). \ No newline at end of file diff --git a/font-src/glyphs/symbol/punctuation.ptl b/font-src/glyphs/symbol/punctuation.ptl index 7bb19c737..b82793bdc 100644 --- a/font-src/glyphs/symbol/punctuation.ptl +++ b/font-src/glyphs/symbol/punctuation.ptl @@ -402,8 +402,9 @@ glyph-block Symbol-Punctuation-Emotion : begin glyph-block-import Common-Derivatives local questionBottom : Math.max (CAP * 0.3) (DotSize * 1.5) + local questionYConnect : mix questionBottom (CAP - HalfStroke) 0.375 - define [QuestionShape top questionBottom left right] : glyph-proc + define [QuestionSmoothShape top questionBottom left right] : glyph-proc define strokeEndCor : Math.hypot 1 TanSlope include : dispiro widths.rhs @@ -413,33 +414,36 @@ glyph-block Symbol-Punctuation-Emotion : begin alsoThru.g2 0.5 0.45 [widths.center EssQuestion] straight.down.end ([mix left right 0.5] - HalfStroke * HVContrast * strokeEndCor) questionBottom [widths.heading (Stroke * strokeEndCor) 0 Downward] - create-glyph 'question' '?' : glyph-proc + create-glyph 'question.smooth' : glyph-proc set-width Width - include : QuestionShape CAP questionBottom SB RightSB + include : QuestionSmoothShape CAP questionBottom SB RightSB include : DotAt Middle DotRadius (DotRadius - O) - create-glyph 'interrobang' 0x203D : glyph-proc - set-width Width - local angle : 12 / 180 * Math.PI - include : QuestionShape CAP questionBottom [mix Middle SB 0.75] RightSB - include : Translate (-Middle) (-DotRadius) - include : Rotate (-2 * angle) - include : Translate Middle DotRadius - include : VBar Middle questionBottom CAP - include : Translate (-Middle) (-DotRadius) - include : Rotate (1.2 * angle) - include : Translate Middle DotRadius + create-glyph 'question.corner' : glyph-proc + include : dispiro + widths.rhs + g4 SB (CAP - Hook) + hookstart (CAP - O) + g4 (RightSB - OX) [YSmoothMidR CAP (questionYConnect - Stroke) SmoothA SmoothB] + arcvh + straight.left.end Middle (questionYConnect - Stroke) [heading Leftward] + include : VBar Middle questionBottom questionYConnect include : DotAt Middle DotRadius (DotRadius - O) - create-glyph 'gnaborretni' 0x2E18 : glyph-proc - set-width Width - include : refer-glyph "interrobang" - include : FlipAround Middle (CAP / 2) + create-glyph 'question.cornerFlatHooked' : glyph-proc + local depth : Math.max (Stroke * 1.5) ((RightSB - SB) * 0.5) + include : dispiro + widths.rhs + flat [mix Middle SB 0.75] CAP [heading Rightward] + curl (RightSB - depth - CorrectionOMidS) CAP + archv + g4 (RightSB - OX) [YSmoothMidR CAP (questionYConnect - Stroke) SmoothA SmoothB] + arcvh + straight.left.end Middle (questionYConnect - Stroke) [heading Leftward] + include : VBar Middle questionBottom questionYConnect + include : DotAt Middle DotRadius (DotRadius - O) - create-glyph 'questionDown' 0xBF : glyph-proc - set-width Width - include : refer-glyph "question" - include : FlipAround Middle (XH / 2) + select-variant 'question' '?' create-glyph 'exclam' '!' : glyph-proc set-width Width @@ -449,11 +453,22 @@ glyph-block Symbol-Punctuation-Emotion : begin alias 'alveolarclick' 0x1C3 'exclam' - create-glyph 'exclamDown' 0xA1 : glyph-proc + create-glyph 'interrobang' 0x203D : glyph-proc set-width Width - include : refer-glyph "exclam" - include : FlipAround Middle (XH / 2) + local angle : 12 / 180 * Math.PI + include : QuestionSmoothShape CAP questionBottom [mix Middle SB 0.75] RightSB + include : Translate (-Middle) (-DotRadius) + include : Rotate (-2 * angle) + include : Translate Middle DotRadius + include : VBar Middle questionBottom CAP + include : Translate (-Middle) (-DotRadius) + include : Rotate (1.2 * angle) + include : Translate Middle DotRadius + include : DotAt Middle DotRadius (DotRadius - O) + turned 'gnaborretni' 0x2E18 'interrobang' Middle (CAP / 2) + turned 'questionDown'0xBF 'question' Middle (XH / 2) + turned 'exclamDown' 0xA1 'exclam' Middle (XH / 2) glyph-block Symbol-Punctuation-Bar : begin glyph-block-import CommonShapes diff --git a/params/variants.toml b/params/variants.toml index 00d378b99..c8ca72b7c 100644 --- a/params/variants.toml +++ b/params/variants.toml @@ -2941,6 +2941,29 @@ rank = 3 description = "Show ASCII grave (`` ` ``) as raised turned comma, identical to curly open single quote symbols (U+2018)." selector.asciiGrave = 'raisedTurnComma' + + +[prime.question] +sampler = '?' +tag = 'cv79' + +[prime.question.variants.smooth] +rank = 1 +description = "Smooth question mark (`?`)" +selector.question = 'smooth' + +[prime.question.variants.corner] +rank = 2 +description = "Question mark (`?`) with a corner at middle" +selector.question = 'corner' + +[prime.question.variants.corner-flat-hooked] +rank = 3 +description = "Question mark (`?`) with a corner at middle and flat hook" +selector.question = 'cornerFlatHooked' + + + ########## "Untagged" variants, used for Aile, etc. # This is a special variant selector that controls digit form @@ -3023,6 +3046,8 @@ ampersand = 'closed' bar = 'natural-slope' ascii-single-quote = 'straight' ascii-grave = 'straight' +question = 'smooth' + # m, n, h has tailed variant, but not very ideal # Do not make them default h = 'straight'