Added tonal symbols.

This commit is contained in:
be5invis 2015-08-23 07:21:46 +08:00
parent 395c390c09
commit 63b134959f
5 changed files with 25 additions and 8 deletions

View File

@ -77,6 +77,11 @@ define customDecompositions (
."\u1FC1" " \u0308\u0342"
."\u0384" " \u0301"
."\u0385" " \u0308\u0301"
# Suppress incorrect slashed arrows... so far
."\u219A" ""
."\u219B" ""
."\u21AE" ""
)
define [subParts parts] : begin {
@ -148,6 +153,7 @@ foreach code [range 0x0000 0xFFFF] : if [not unicodeGlyphs`code] : begin {
create-glyph glyphName : glyph-construction {
assign-unicode code
include parts.0 AS_BASE
set-width parts.0.advanceWidth
foreach part [items-of : parts.slice 1] : include part
}
if [not glyphs.(composition)] : begin {

View File

@ -718,20 +718,22 @@ create-glyph 'longBarOver' : glyph-construction {
create-glyph 'slashOver' : glyph-construction {
set-width 0
assign-unicode 0x337
local fine : adviceBlackness 10
set-anchor 'slash' MARK markMiddle [XH / 2] markMiddle [XH / 2]
include : create-stroke
:.start-from [[mix 0 SB 0.5] - WIDTH] [XH * 0.25]
:.set-width markHalfStroke markHalfStroke
:.line-to [[mix WIDTH RIGHTSB 0.5] - WIDTH] [XH * 0.75]
:.start-from [SB + O + fine - WIDTH] [XH * [-0.05]]
:.set-width fine fine
:.line-to [RIGHTSB - O - fine - WIDTH] [XH * 1.05]
}
create-glyph 'longSlashOver' : glyph-construction {
set-width 0
assign-unicode 0x338
local fine : adviceBlackness 10
set-anchor 'slash' MARK markMiddle [XH / 2] markMiddle [XH / 2]
include : create-stroke
:.start-from [[mix 0 SB 0.5] - WIDTH] [XH * 0.1]
:.set-width markHalfStroke markHalfStroke
:.line-to [[mix WIDTH RIGHTSB 0.5] - WIDTH] [XH * 0.9]
:.start-from [SB + O + fine - WIDTH] [XH * 0.5 - CAP * 0.525]
:.set-width fine fine
:.line-to [RIGHTSB - O - fine - WIDTH] [XH * 0.5 + CAP * 0.525]
}
# Double-character arcs
create-glyph 'tieAbove' : glyph-construction {

View File

@ -36,11 +36,13 @@ define (ArrowHead ArrowShape) : let [arrowSize : [RIGHTSB - SB] / 3] [halfstroke
}
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

View File

@ -1,5 +1,12 @@
###### Other symbols
# IPA tonal marks
foreach tone [range 4 downtill 0] : begin {
create-glyph ['tone' + tone] : glyph-construction {
assign-unicode [0x2E5 + 4 - tone]
include : VBarRight [mix SB RIGHTSB 0.9] 0 CAP OPERATORSTROKE
include : HBar [mix SB RIGHTSB 0.1] [[mix SB RIGHTSB 0.9] - 1] [mix [OPERATORSTROKE / 2] [CAP - OPERATORSTROKE / 2] [tone / 4]] OPERATORSTROKE
}
}
# Suit card
let : begin {
local heartTop : mix parenMid parenTop 0.6

View File

@ -45,7 +45,7 @@ define regular (
.family 'Iosevka'
.style 'Regular'
.weight 400
.version 'r0.1.5'
.version 'r0.1.6'
.variantSelector (.)
.copyright 'Copyright (c) 2015 Belleve Invis.'
)