start working on fixing symbols, like /peseta.
This commit is contained in:
parent
a2280fdad8
commit
cea639e317
|
@ -279,7 +279,7 @@ define [createFractions records] : if [not recursive] : begin
|
|||
local miniatureFont : Miniature pendingGlyphs 4 0.6
|
||||
foreach {unicode numid denid height} [items-of records] : create-glyph [suggestName : numid + 'over' + denid] : glyph-construction
|
||||
if unicode : assign-unicode unicode
|
||||
local fine : adviceBlackness 3.7
|
||||
local fine : adviceBlackness 3
|
||||
local dist : XH * 0.4
|
||||
include : create-glyph : glyph-construction
|
||||
include : create-glyph [suggestName : 'num' + numid] : glyph-construction
|
||||
|
|
|
@ -351,6 +351,7 @@ define [Fork glyphs params] : begin
|
|||
define [Miniature glyphs fold scale] : begin
|
||||
local forkedPara : Object.create para
|
||||
forkedPara.stroke = [adviceBlackness fold] / scale
|
||||
forkedPara.ess = para.ess * forkedPara.stroke / para.stroke
|
||||
forkedPara.sb = SB / 2
|
||||
return : Fork glyphs forkedPara
|
||||
|
||||
|
|
|
@ -1,62 +1,68 @@
|
|||
###### GEOMETRIC SHAPES
|
||||
|
||||
### Arrowheads
|
||||
define {ArrowHead ArrowShape} : let [arrowSize : (RIGHTSB - SB) / 3 * [Math.pow (FULLWIDTH / WIDTH) 0.4]] [halfstroke : [adviceBlackness 4] / 2] [fine : adviceBlackness 4.5] [arrowTop : mix parenMid parenTop 0.85] [arrowBot : mix parenMid parenBot 0.85] : begin
|
||||
define [ArrowHead x1 y1 x2 y2 _size] : create-glyph : glyph-construction
|
||||
local size : fallback _size arrowSize
|
||||
set this.gizmo : Translate 0 0
|
||||
include : create-stroke
|
||||
:.start-from 0 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width 0 fine
|
||||
:.line-to (size * 1) size
|
||||
:.set-width 0 fine
|
||||
:.max-samples 1
|
||||
include : create-stroke
|
||||
:.start-from 0 0
|
||||
:.heads-to DOWNWARD
|
||||
:.set-width fine 0
|
||||
:.line-to (size * 1) (-size)
|
||||
:.set-width fine 0
|
||||
:.max-samples 1
|
||||
apply-transform : Translate O 0
|
||||
local {.x xo .y yo} : tp globalTransform {.x x1 .y y1}
|
||||
local {.x xt .y yt} : tp globalTransform {.x x2 .y y2}
|
||||
apply-transform : Rotate : Math.atan2 (yo - yt) (xo - xt)
|
||||
apply-transform : Translate xt yt
|
||||
define [ArrowShape x1 y1 x2 y2 size] : glyph-construction
|
||||
local mag : Math.hypot (y2 - y1) (x2 - x1)
|
||||
local p : (mag - halfstroke * 1.1) / mag
|
||||
include : ArrowHead x1 y1 x2 y2 size
|
||||
include : create-stroke
|
||||
:.start-from x1 y1
|
||||
:.set-width halfstroke halfstroke
|
||||
:.line-to [mix x1 x2 p] [mix y1 y2 p]
|
||||
define [arrow id unicode x1 y1 x2 y2] : create-glyph id : glyph-construction
|
||||
set-width FULLWIDTH
|
||||
set-anchor "slash" BASE FWMIDDLE parenMid
|
||||
assign-unicode unicode
|
||||
include : ArrowShape x1 y1 x2 y2
|
||||
define [doublearrow id unicode x1 y1 x2 y2] : create-glyph id : glyph-construction
|
||||
set-width FULLWIDTH
|
||||
set-anchor "slash" BASE FWMIDDLE parenMid
|
||||
assign-unicode unicode
|
||||
local xm : mix x1 x2 0.5
|
||||
local ym : mix y1 y2 0.5
|
||||
include : ArrowShape xm ym x1 y1
|
||||
include : ArrowShape xm ym x2 y2
|
||||
arrow 'arrowleft' 0x2190 FWRSB parenMid SB parenMid
|
||||
arrow 'arrowright' 0x2192 SB parenMid FWRSB parenMid
|
||||
arrow 'arrowup' 0x2191 FWMIDDLE arrowBot FWMIDDLE arrowTop
|
||||
arrow 'arrowdown' 0x2193 FWMIDDLE arrowTop FWMIDDLE arrowBot
|
||||
doublearrow 'arrowleftright' 0x2194 SB parenMid FWRSB parenMid
|
||||
doublearrow 'arrowupdown' 0x2195 FWMIDDLE arrowTop FWMIDDLE arrowBot
|
||||
arrow 'arrowupleft' 0x2196 FWRSB arrowBot SB arrowTop
|
||||
arrow 'arrowupright' 0x2197 SB arrowBot FWRSB arrowTop
|
||||
arrow 'arrowdownright' 0x2198 SB arrowTop FWRSB arrowBot
|
||||
arrow 'arrowdownleft' 0x2199 FWRSB arrowTop SB arrowBot
|
||||
|
||||
* {ArrowHead ArrowShape}
|
||||
define {ArrowHead ArrowShape} : let
|
||||
arrowSize : (RIGHTSB - SB) / 3 * [Math.pow (FULLWIDTH / WIDTH) 0.4]
|
||||
halfstroke : OPERATORSTROKE / 2
|
||||
fine : adviceBlackness 4
|
||||
arrowTop : mix parenMid parenTop 0.85
|
||||
arrowBot : mix parenMid parenBot 0.85
|
||||
begin
|
||||
define [ArrowHead x1 y1 x2 y2 _size] : create-glyph : glyph-construction
|
||||
local size : fallback _size arrowSize
|
||||
set this.gizmo : Translate 0 0
|
||||
include : create-stroke
|
||||
:.start-from 0 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width 0 fine
|
||||
:.line-to (size * 1) size
|
||||
:.set-width 0 fine
|
||||
:.max-samples 1
|
||||
include : create-stroke
|
||||
:.start-from 0 0
|
||||
:.heads-to DOWNWARD
|
||||
:.set-width fine 0
|
||||
:.line-to (size * 1) (-size)
|
||||
:.set-width fine 0
|
||||
:.max-samples 1
|
||||
apply-transform : Translate O 0
|
||||
local {.x xo .y yo} : tp globalTransform {.x x1 .y y1}
|
||||
local {.x xt .y yt} : tp globalTransform {.x x2 .y y2}
|
||||
apply-transform : Rotate : Math.atan2 (yo - yt) (xo - xt)
|
||||
apply-transform : Translate xt yt
|
||||
define [ArrowShape x1 y1 x2 y2 size] : glyph-construction
|
||||
local mag : Math.hypot (y2 - y1) (x2 - x1)
|
||||
local p : (mag - halfstroke * 1.1) / mag
|
||||
include : ArrowHead x1 y1 x2 y2 size
|
||||
include : create-stroke
|
||||
:.start-from x1 y1
|
||||
:.set-width halfstroke halfstroke
|
||||
:.line-to [mix x1 x2 p] [mix y1 y2 p]
|
||||
define [arrow id unicode x1 y1 x2 y2] : create-glyph id : glyph-construction
|
||||
set-width FULLWIDTH
|
||||
set-anchor "slash" BASE FWMIDDLE parenMid
|
||||
assign-unicode unicode
|
||||
include : ArrowShape x1 y1 x2 y2
|
||||
define [doublearrow id unicode x1 y1 x2 y2] : create-glyph id : glyph-construction
|
||||
set-width FULLWIDTH
|
||||
set-anchor "slash" BASE FWMIDDLE parenMid
|
||||
assign-unicode unicode
|
||||
local xm : mix x1 x2 0.5
|
||||
local ym : mix y1 y2 0.5
|
||||
include : ArrowShape xm ym x1 y1
|
||||
include : ArrowShape xm ym x2 y2
|
||||
arrow 'arrowleft' 0x2190 FWRSB parenMid SB parenMid
|
||||
arrow 'arrowright' 0x2192 SB parenMid FWRSB parenMid
|
||||
arrow 'arrowup' 0x2191 FWMIDDLE arrowBot FWMIDDLE arrowTop
|
||||
arrow 'arrowdown' 0x2193 FWMIDDLE arrowTop FWMIDDLE arrowBot
|
||||
doublearrow 'arrowleftright' 0x2194 SB parenMid FWRSB parenMid
|
||||
doublearrow 'arrowupdown' 0x2195 FWMIDDLE arrowTop FWMIDDLE arrowBot
|
||||
arrow 'arrowupleft' 0x2196 FWRSB arrowBot SB arrowTop
|
||||
arrow 'arrowupright' 0x2197 SB arrowBot FWRSB arrowTop
|
||||
arrow 'arrowdownright' 0x2198 SB arrowTop FWRSB arrowBot
|
||||
arrow 'arrowdownleft' 0x2199 FWRSB arrowTop SB arrowBot
|
||||
|
||||
* {ArrowHead ArrowShape}
|
||||
|
||||
### Standard geometric shapes
|
||||
let : begin
|
||||
|
|
|
@ -62,7 +62,7 @@ create-glyph 'frenchFranc' : glyph-construction
|
|||
create-glyph 'peseta' : glyph-construction
|
||||
assign-unicode 0x20A7
|
||||
include glyphs.P
|
||||
include : HOverlayBar [mix SB 0 0.7] [mix RIGHTSB WIDTH 0.7] [mix CAPMIDDLE CAP 0.45]
|
||||
include : HOverlayBar [mix SB 0 0.7] [mix RIGHTSB WIDTH 0.7] [mix ((CAP - STROKE) * BARPOS - HALFSTROKE) CAP (SMOOTHB / (SMOOTHA + SMOOTHB))]
|
||||
|
||||
|
||||
### Other
|
||||
|
|
Loading…
Reference in New Issue
Block a user