Added /circlestar

This commit is contained in:
be5invis 2016-05-22 08:20:54 +08:00
parent 904e82393f
commit 3666aa0185
4 changed files with 29 additions and 20 deletions

View File

@ -578,6 +578,8 @@ define [Miniature] : params [glyphs crowd scale [slantAngle para.slantAngle] unf
local forkedPara : Object.create para
forkedPara.stroke = [adviceBlackness crowd] / scale
forkedPara.ess = para.ess * forkedPara.stroke / para.stroke
forkedPara.dotsize = para.dotsize * forkedPara.stroke / para.stroke
forkedPara.periodsize = para.periodsize * forkedPara.stroke / para.stroke
forkedPara.sb = SB * sbscale
forkedPara.slantAngle = slantAngle
forkedPara.unfair = unfair

View File

@ -186,6 +186,15 @@ symbol-block 'Geometric'
include FullWidthify
save 'blackcircle' 0x25CF
sketch # blackstar
start-from MIDDLE (parenMid + squareRadius)
foreach [j : range 1 5] : begin
local angle : 2 * Math.PI * j * 2 / 5
line-to [mix left right (0.5 - 0.55 * [Math.sin angle])] (parenMid + squareRadius * [Math.cos angle] * 1.1)
save 'hwblackstar'
include FullWidthify
save 'blackstar' 0x2605
sketch # dottedcircle
local n 12
local fine : adviceBlackness 10
@ -214,6 +223,8 @@ symbol-block 'Geometric'
hollow 'whitebullet' 0x25E6 'bullet' [hollowScale (PERIODSIZE - O) 1]
hollow 'whitediamond' 0x25C7 'blackdiamond' [hollowScale squareRadius nothing (hollowSW * [Math.sqrt 2])]
composite 'circlestar' glyphs.hwblackstar [FlipAround MIDDLE parenMid 0.75] glyphs.mathO [into-unicode 0x235F]
let [sts 0.75]
: begin
resized 'smallblacktriangleup' 0x25B4 'blacktriangleup' MIDDLE parenMid 0.75

View File

@ -79,19 +79,20 @@ symbol-block 'Letter-like Mathematical Symbols'
save 'partial' 0x2202
symbol-block 'Mathematical Operators'
sketch # mathO
local sw OPERATORSTROKE
local k 1
include : OShape (parenMid + (RIGHTSB - SB) * 0.5 + sw * k) (parenMid - (RIGHTSB - SB) * 0.5 - sw * k) (SB - sw * k) (RIGHTSB + sw * k) sw (SMALLSMOOTHA * 3) (SMALLSMOOTHB * 3)
save 'mathO'
sketch # plus
set-width WIDTH
include : HBar SB RIGHTSB parenMid OPERATORSTROKE
include : VBar MIDDLE (parenMid - (RIGHTSB - SB) * 0.55) (parenMid + (RIGHTSB - SB) * 0.55) OPERATORSTROKE
save 'plus' '+'
sketch # minus
set-width WIDTH
include : HBar SB RIGHTSB parenMid OPERATORSTROKE
save 'minus' 0x2212
sketch # plusminus
set-width WIDTH
include : HBarBottom SB RIGHTSB 0 OPERATORSTROKE
include glyphs.plus
save 'plusminus' 0xB1
@ -99,16 +100,11 @@ symbol-block 'Mathematical Operators'
local equalHalfSpace : (parenTop - parenBot) * 0.11
sketch # equal
set-width WIDTH
include : HBar SB RIGHTSB (parenMid + equalHalfSpace) OPERATORSTROKE
include : HBar SB RIGHTSB (parenMid - equalHalfSpace) OPERATORSTROKE
save 'equal' '='
sketch # less
set-width WIDTH
local top : mix parenMid parenTop 0.5
local bot : mix parenMid parenBot 0.5
local exp : Math.sqrt : 1 + (top - bot) / (2 * (RIGHTSB - SB)) * (top - bot) / (2 * (RIGHTSB - SB))
@ -122,13 +118,9 @@ symbol-block 'Mathematical Operators'
widths.center OPERATORSTROKE
flat RIGHTSB bot
curl SB [mix top bot 0.5] [widths.heading (OPERATORSTROKE / 2 * exp) (OPERATORSTROKE / 2 * exp) LEFTWARD]
save 'less' '<'
sketch # greater
set-width WIDTH
local top : mix 0 CAP 0.75
local bot : mix 0 CAP 0.1
@ -158,6 +150,12 @@ symbol-block 'Mathematical Operators'
save 'divide' 0xF7
composite 'mathAsterisk' glyphs.'smallasterisk.low' [into-unicode 0x2217]
composite 'oplus' glyphs.mathO glyphs.plus [into-unicode 0x2295]
composite 'ominus' glyphs.mathO glyphs.minus [into-unicode 0x2296]
composite 'oasterisk' glyphs.mathO glyphs.mathAsterisk [into-unicode 0x229B]
sketch # negate
include glyphs.minus
include : VBarRight RIGHTSB (parenMid - (RIGHTSB - SB) * 0.55) parenMid OPERATORSTROKE

View File

@ -361,7 +361,6 @@ symbol-block 'Typographic Symbols'
}
sketch # section
local top parenTop
local bot parenBot
local sma SMOOTHA
@ -383,10 +382,8 @@ symbol-block 'Typographic Symbols'
save 'section' 0xA7
local asteriskCenterY : parenTop - LONGJUT * 1.5
sketch # asterisk.high
set-width WIDTH
local radius : LONGJUT * 1.2
foreach [{size name} : items-of {{1.2 'asterisk.high'} {0.85 'smallasterisk.high'}}] : sketch
local radius : LONGJUT * size
local fine : STROKE * 0.4
local final : 0.5 * [Math.min STROKE (radius * Math.PI * 2 / 10)]
@ -396,9 +393,10 @@ symbol-block 'Typographic Symbols'
include : dispiro
flat MIDDLE asteriskCenterY [widths fine fine]
curl (MIDDLE + radius * s) (asteriskCenterY + radius * c) [widths final final]
save 'asterisk.high' '*'
save name
composite 'asterisk.low' glyphs.'asterisk.high' [Upright] [Translate 0 (parenMid - asteriskCenterY)] [Italify]
composite 'smallasterisk.low' glyphs.'smallasterisk.high' [Upright] [Translate 0 (parenMid - asteriskCenterY)] [Italify]
select-variant 'asterisk' '*' 'high' {
.cv18 'asterisk.high'
.cv19 'asterisk.low'