lang/laantas-script/Glyphs.hs

734 lines
23 KiB
Haskell
Raw Normal View History

2020-11-04 13:06:54 -05:00
{-# OPTIONS_GHC -Wno-missing-signatures -Wno-name-shadowing #-}
module Glyphs
2021-05-10 18:52:17 -04:00
(Glyph (..), Diacritic, simpleDia, Segs (..), EGlyph, Word, doGlyphs,
2021-04-29 05:55:54 -04:00
withSize,
2021-04-28 06:29:21 -04:00
charHeight', lineHeight', spaceWidth', gap',
charHeight, lineHeight, spaceWidth, gap,
2021-04-29 05:55:54 -04:00
initials, finals, vowels, medials, num, numbers, punctuation, wave)
where
2020-11-04 13:06:54 -05:00
2021-05-10 18:52:17 -04:00
import Prelude hiding (Word)
2021-04-28 06:29:21 -04:00
import Data.Map (Map)
import qualified Data.Map.Strict as Map
import GlyphsBase
2020-11-04 13:06:54 -05:00
2021-04-28 06:29:21 -04:00
initials :: Map Text Glyph
initials = Map.fromList $
tGlyphs <> kGlyphs <> ƶGlyphs <> sGlyphs <> šGlyphs <> lGlyphs <>
mGlyphs <> nGlyphs <> rGlyphs <> pGlyphs <> bGlyphs <>
2021-04-28 06:29:21 -04:00
čGlyphs <> hGlyphs <> fGlyphs <>
[("g", g), ("d", d), ("ǧ", ǧ), ("w", w), ("j", j)]
2021-04-28 06:29:21 -04:00
finals :: Map Text Glyph
finals = Map.fromList $
[("t",t0), ("ƶ", ƶ0), ("s",s0), ("š",š0), ("l",l0), ("m",m0),
("n", n0), ("r", r0), ("f", f0)]
2021-05-10 18:52:17 -04:00
medials :: Map Text [Diacritic]
2021-04-28 06:29:21 -04:00
medials = Map.fromList $
[("a", da), ("á", ), ("i", di), ("í", ), ("u", du), ("ú", ),
("ai", dai), ("au", dau), ("ia", dia), ("ua", dua), ("ḿ", dḿ),
("ń", ), ("ł", ), ("ŕ", )]
2020-11-04 13:06:54 -05:00
2021-04-28 06:29:21 -04:00
vowels :: Map Text Glyph
vowels = Map.fromList vGlyphs
2020-11-04 13:06:54 -05:00
2021-04-28 06:29:21 -04:00
tGlyphs = [("t",t), ("tt",tt), ("tk",tk), ("tg",tg), ("td",td), ("",),
2020-11-04 13:06:54 -05:00
("tp",tp), ("tb",tb), ("ts",ts), ("",), ("tl",tl), ("tm",tm),
("tn",tn), ("tr",tr), ("",), ("",), ("tw",tw), ("th",th),
2021-04-28 06:29:21 -04:00
("tf",tf), ("tj",tj)]
2020-11-04 13:06:54 -05:00
t = simpleG tPath 5.5
tt = simpleG ttPath 7
tk = simpleG tkPath 9
tg = simpleG tgPath 9
td = simpleG tdPath 9
= simpleG tƶPath 9
tp = simpleG tpPath 9.5
tb = simpleG tbPath 10
ts = simpleG tsPath 9
= simpleG tšPath 9
tl = simpleG tlPath 8.5
tm = simpleG tmPath 10
tn = simpleG tnPath 9
tr = simpleG trPath 7
= simpleG tčPath 9
= simpleG tǧPath 10
tw = simpleG twPath 10
th = simpleG thPath 12
tf = simpleG tfPath 10
tj = simpleG tjPath 4.75
t0 = simpleG t0Path 5
2020-11-04 13:06:54 -05:00
2021-04-30 07:46:57 -04:00
tPath = P [mA (0,0), lA (5.5,0)] <> shiftX 1.5 aPath <> shiftX 5.25 aPath
2021-05-03 12:47:34 -04:00
tNarrow = P [mA (0,0), lA (5,0)] <> shiftX 1.5 aPath <> shiftX 4.75 aPath
2021-04-30 07:46:57 -04:00
tPart = shiftX 1.5 aPath <> P [mA (0,0), lR (,0)]
ttPath = P [mA (0,0), lR (7,0)]
<> shiftX 0.75 aPath
<> shiftX 2.75 aPath
<> shiftX 4.75 aPath
<> shiftX 6.75 aPath
tkPath = tPart 5 <> shiftX 5 (aPath <> kBottomShort <> P [mA (4,-3), lR (0,8)])
2021-05-03 12:47:34 -04:00
tgPath = shiftX 5 gShortHat <> tkPath
2020-11-04 13:06:54 -05:00
tdPath = tPart 4 <> shiftX 4 dPath
2023-12-25 15:44:48 -05:00
tƶPath = shiftX 5 gShortHat <> tdPath
2021-05-02 05:22:28 -04:00
tpPath = P [mA (2,-3), lR (0,8), mA (0,-3), lR (6,0)] <> shiftX 4 pPath
2020-11-04 13:06:54 -05:00
tbPath = tPart 6 <> shiftX 4 bPath
tsPath = tPart 4 <> shiftX 4 sPath
tšPath = tPart 4 <> shiftX 4 šPath
2021-05-02 05:22:28 -04:00
tlPath = tPart 5 <> shiftX 3.5 lPath
2020-11-04 13:06:54 -05:00
tmPath = tPart 4.5 <> shiftX 4 mPath
tnPath = tPart 6 <> shiftX 4 nPath
trPath = tPart 7 <> shiftX 4 rShort
tčPath = tPart 3 <> shiftX 3 čFlat
tǧPath = tPart 4 <> shiftX 5 ǧPath
twPath = tPart 6 <> shiftX 4 wPath
thPath = tPart 4 <> shiftX 4 hPath
tfPath = tPart 4 <> shiftX 4 fPath
2021-05-03 12:47:34 -04:00
tjPath = tPart 3.5 <> shiftX (-0.5) jTall
2021-04-29 06:17:19 -04:00
t0Path = tPath <> P [mA (1.5,7), cR (1.8,-0.25) (3.1,0) (3.5,0.5)]
2020-11-04 13:06:54 -05:00
kGlyphs = [("k", k), ("kk", kk), ("ks", ks)]
2020-11-04 13:06:54 -05:00
k = simpleG kPath 5
kk = simpleG kkPath 8
ks = simpleG ksPath 9
2020-11-04 13:06:54 -05:00
2021-05-02 05:22:28 -04:00
kLeft = P [mA (0,0), cR (0.5,0.75) (0,3) (0,5)]
2021-04-30 07:46:57 -04:00
kBottomShort = P [cR (0,0) (2.6,0) (4,-0.5)]
2023-12-25 15:44:48 -05:00
kPath = kLeft <> kBottom <> shiftX 5 longAPath
2021-04-30 07:46:57 -04:00
kBottom = P [cR (0,0) (3,0) (5,-0.5)]
kShortPart = kLeft <> kBottomShort
2023-12-25 15:44:48 -05:00
kShort = kShortPart <> shiftX 4 longAPath
kkPath = kShortPart <> shiftX 4 kShort
ksPath = kShortPart <> shiftX 4 sPath
2020-11-04 13:06:54 -05:00
g = simpleG gPath 5
2020-11-04 13:06:54 -05:00
2021-04-30 07:46:57 -04:00
gPath = gHat <> kPath
gHat = P [mA (1.5,-2.75), qR (1.5,0.125) (3.5,-0.25)]
gShort = gShortHat <> kShort
gShortHat = P [mA (1.25,-2.75), qR (1.25,0.125) (2.75,-0.25)]
2020-11-04 13:06:54 -05:00
d = simpleG dPath 5
2020-11-04 13:06:54 -05:00
2023-12-25 15:44:48 -05:00
dPath = dPart <> shiftX 5 longAPath
2021-05-02 05:22:28 -04:00
dPart' = dBase <> dJoin'
2020-11-04 13:06:54 -05:00
dPart = dBase <> dJoin
2021-05-10 10:16:03 -04:00
dJoin = P [cR (2,0) (3,-0.75) (3,-1.5)]
dJoin' = P [cR (1.75,0) (2.5,-0.75) (2.85,-2.5)]
2020-11-04 13:06:54 -05:00
dBase = P [mA (0,0), lR (3.5,0), cR (0,1.5) (-3.5,3.5) (-3.5,5), lR (2,0)]
dFree = dBase <> P [mA (2,5), lR (1.5,0)]
dLong = dFree <> shiftX 1.5 dJoin
2021-04-28 06:29:21 -04:00
ƶGlyphs = [("ƶ",ƶ), ("ƶt",ƶt), ("ƶk",ƶk), ("ƶg",ƶg), ("ƶd",ƶd),
("ƶƶ",ƶƶ), ("ƶp",ƶp), ("ƶb",ƶb), ("ƶs",ƶs), ("ƶš",ƶš), ("ƶl",ƶl),
("ƶm",ƶm), ("ƶn",ƶn), ("ƶr",ƶr), ("ƶč",ƶč), ("ƶǧ",ƶǧ), ("ƶw",ƶw),
("ƶh",ƶh), ("ƶf",ƶf), ("ƶj",ƶj)]
ƶ = simpleG ƶPath 5
ƶt = simpleG ƶtPath 10.5
ƶk = simpleG ƶkPath 9
ƶg = simpleG ƶgPath 9
ƶd = simpleG ƶdPath 10
ƶƶ = simpleG ƶƶPath 10
ƶp = simpleG ƶpPath 10.5
ƶb = simpleG ƶbPath 11
ƶs = simpleG ƶsPath 10
ƶš = simpleG ƶšPath 10
ƶl = simpleG ƶlPath 10
ƶm = simpleG ƶmPath 11
ƶn = simpleG ƶnPath 9.75
ƶr = simpleG ƶrPath 8
ƶč = simpleG ƶčPath 10
ƶǧ = simpleG ƶǧPath 10
ƶw = simpleG ƶwPath 11
ƶh = simpleG ƶhPath 13
ƶf = simpleG ƶfPath 10
ƶj = simpleG ƶjPath 7.5
ƶ0 = simpleG ƶ0Path 3.5
2021-04-28 06:29:21 -04:00
2021-05-02 05:22:28 -04:00
ƶPath = gHat <> dPath
2021-04-28 06:29:21 -04:00
ƶtPath = dLong <> shiftX 5 tPath
ƶkPath = dPart <> shiftX 5 kShort
ƶgPath = dPart <> shiftX 5 gShort
2021-05-02 05:22:28 -04:00
ƶdPath = dFree <> shiftX 5 dPath
2021-04-28 06:29:21 -04:00
ƶƶPath = dFree <> shiftX 5 ƶPath
ƶpPath = dFree <> shiftX 5 pPath
2021-05-02 05:22:28 -04:00
ƶbPath = dPart' <> shiftX 5 bPath
2021-04-28 06:29:21 -04:00
ƶsPath = dPart <> shiftX 5 sPath
ƶšPath = dPart <> shiftX 5 šPath
ƶlPath = dPart <> shiftX 5 lPath
ƶmPath = dPart <> shiftX 5 mPath
2021-05-03 12:47:34 -04:00
ƶnPath = dPart' <> shiftX 4.75 nPath
2021-05-10 10:16:03 -04:00
ƶrPath = dPart <> P [qR (0,1.5) (1,1.5), qR (2,0) (2,-2), mR (0,-6), lR (0,8)]
2021-04-28 06:29:21 -04:00
ƶčPath = dFree <> shiftX 5 čPath
ƶǧPath = dFree <> shiftX 5 ǧPath
2021-05-02 05:22:28 -04:00
ƶwPath = dPart' <> shiftX 5 wPath
2021-04-28 06:29:21 -04:00
ƶhPath = dPart <> shiftX 5 hPath
ƶfPath = dFree <> shiftX 4 fPath
2021-05-03 12:47:34 -04:00
ƶjPath = dFree <> shiftX 4.5 jPathShort
2021-04-29 06:17:19 -04:00
ƶ0Path = dFree <> P [mA (1,7), cR (1.8,-0.25) (2.2,0) (2.5,0.5)]
2020-11-04 13:06:54 -05:00
pGlyphs = [("p", p), ("pp", pp), ("ps", ps), ("pj", pj)]
p = simpleG pPath 5.5
pp = simpleG ppPath 9
ps = simpleG psPath 10.5
pj = simpleG pjPath 10
2020-11-04 13:06:54 -05:00
2021-05-02 05:22:28 -04:00
pInit =
P [mA (0,-3), cR (-1,1) (-0.5,6) (-0.5,8)]
2021-04-30 07:46:57 -04:00
pPart =
2021-05-02 05:22:28 -04:00
shiftX 2 pInit <>
P [cR (-1,-3) (-2,-4) (0,-5), cR (1,-0.5) (2.5,-0.5) (4,0)]
2021-04-30 07:46:57 -04:00
pPath = pPart <> shiftX 5.25 aPath
2021-05-02 05:22:28 -04:00
ppPath =
shiftX 2 pInit <> shiftX 4.5 pInit <>
P [mA (1.5,5), cR (-1,-3) (-2,-4) (0,-5), cR (1,-0.5) (2.5,-0.5) (7.5,0)] <>
shiftX 8.75 aPath
2021-04-30 07:46:57 -04:00
psPath = pPart <> shiftX 5.5 sPath
2021-05-02 05:22:28 -04:00
pjPath =
shiftX 2 pInit <>
P [cR (-1,-3) (-2,-4) (0,-5), cR (1,-0.5) (4,-1) (4,1),
lR (0,4), mR (0,-4),
cR (0,-2) (3.5,-1) (4.5,-1)] <>
shiftX 9.75 aPath
2020-11-04 13:06:54 -05:00
bGlyphs = [("b", b), ("bj", bj)]
2020-11-04 13:06:54 -05:00
b = simpleG bPath 6
bj = simpleG bjPath 9
2020-11-04 13:06:54 -05:00
2023-12-25 15:44:48 -05:00
bPath = shiftX 1 gHat <> wPart <> shiftX 6 longAPath
2021-05-02 05:22:28 -04:00
bjPath =
bPath <>
P [mA (6,0.5), qR (1.5,0) (3,-0.5)] <>
shiftX 8.75 aPath
2020-11-04 13:06:54 -05:00
2021-04-28 06:29:21 -04:00
sGlyphs = [("s",s), ("st",st), ("sk",sk), ("sg",sg), ("sd",sd), ("",),
2020-11-04 13:06:54 -05:00
("sp",sp), ("sb",sb), ("ss",ss), ("",), ("sl",sl), ("sm",sm),
("sn",sn), ("sr",sr), ("",), ("",), ("sw",sw), ("sh",sh),
2021-04-28 06:29:21 -04:00
("sf",sf), ("sj",sj)]
2020-11-04 13:06:54 -05:00
s = simpleG sPath 5.125
st = simpleG stPath 8.5
sk = simpleG skPath 9
sg = simpleG sgPath 9
sd = simpleG sdPath 9
= simpleG sƶPath 9
sp = simpleG spPath 9.5
sb = simpleG sbPath 10.5
ss = simpleG ssPath 10
= simpleG sšPath 10
sl = simpleG slPath 9
sm = simpleG smPath 10.5
sn = simpleG snPath 9.5
sr = simpleG srPath 7
= simpleG sčPath 9
= simpleG sǧPath 10
sw = simpleG swPath 10
sh = simpleG shPath 13
sf = simpleG sfPath 10.25
sj = simpleG sjPath 5
s0 = simpleG s0Path 5
2020-11-04 13:06:54 -05:00
2021-05-03 12:47:34 -04:00
sPath = sPartLine <> shiftX 4.75 aPath
sPart' = P [mA (0, 0),
2021-05-02 05:22:28 -04:00
cR (0.15,0.5) (0,2.5) (0,3.5),
2021-05-03 12:47:34 -04:00
aR 1.5 1.5 0 Small CCW (3,0)]
sPart = sPart' <> P [qR (0,-3) (-0.5,-3.5)]
sPartIso = sPart' <> P [cR (0,-0.5) (-0.15,-2.5) (0,-3.5)]
sPartLine = sPart <> P [mA (2.5,0), qR (1,0.25) (2.5,0)]
stPath = sPart <> P [lR (1,0)] <> shiftX 3.5 tNarrow
2020-11-04 13:06:54 -05:00
skPath = sPartLine <> shiftX 5 kShort
sgPath = sPartLine <> shiftX 5 gShort
2021-05-02 05:22:28 -04:00
sdPath = sPart <> P [mA (2.5,0), lR (1.5,0)] <> shiftX 4 dPath
sƶPath = sPart <> P [mA (2.5,0), lR (1.5,0)] <> shiftX 4 ƶPath
spPath = sPartIso <> shiftX 4 pPath
2021-05-03 12:47:34 -04:00
sbPath = sPart' <>
P [cR (0,-2.5) (-0.25,-2.5) (0,-6.5), qR (2,0.5) (7.5,0), lR (0,8)] <>
shiftX 4.5 wPart <> P [mA (10.5,5)]
2020-11-04 13:06:54 -05:00
ssPath = sPartLine <> shiftX 5 sPath
sšPath = sPartLine <> shiftX 5 šPath
2021-05-03 12:47:34 -04:00
slPath = sPart <> P [mA (2.5,0), qR (1.25,0.5) (3.5,0)] <> shiftX 4.5 lPath
smPath = sPartLine <> shiftX 4.5 mPath
snPath = sPart <> P [mA (2.5,0), qR (1.5,0.5) (4.5,0)] <> shiftX 4.5 nPath
srPath = sPart <> P [mA (2.5,0), qR (2,0.75) (4.5,0.25)] <> shiftX 4 rShort
2021-05-02 05:22:28 -04:00
sčPath = sPart <> P [mA (2.5,0), lR (1.5,0)] <> shiftX 3 čFlat
sǧPath = sPartIso <> shiftX 4 ǧPath
swPath = sPart <> P [mA (2.5,0), lR (4,0)] <> shiftX 4 wPath
shPath = sPartIso <> shiftX 5 hPath
2021-05-03 12:47:34 -04:00
sfPath = sPartIso <> shiftX 4.25 fPath
sjPath = sPartLine <> jTall
2021-04-29 06:17:19 -04:00
s0Path = sPath <> P [mA (1.5,7), cR (1.8,-0.25) (2.6,0) (3,0.5)]
2020-11-04 13:06:54 -05:00
2021-04-28 06:29:21 -04:00
šGlyphs = [("š",š), ("št",št), ("šk",šk), ("šg",šg), ("šd",šd), ("šƶ",šƶ),
("šp",šp), ("šb",šb), ("šs",šs), ("šš",šš), ("šl",šl), ("šm",šm),
("šn",šn), ("šr",šr), ("šč",šč), ("šǧ",šǧ), ("šw",šw), ("šh",šh),
2021-04-28 06:29:21 -04:00
("šf",šf), ("šj",šj)]
2020-11-04 13:06:54 -05:00
2021-04-30 07:46:57 -04:00
š@(G {path = šPath}) = s2š s
šš = ss {path = ššPath}
šp = sp {path = špPath}
šb = sb {path = šbPath}
št = s2š st
šk = s2š sk
šg = s2š sg
šd = s2š sd
2021-04-28 06:29:21 -04:00
šƶ = s2š
šs = s2š ss
šl = s2š sl
šm = s2š sm
šn = s2š sn
šr = s2š sr
šč = s2š
šǧ = s2š
šw = s2š sw
šh = s2š sh
šf = s2š sf
2024-03-14 19:56:54 -04:00
šj = sj {path = P [mA (0.5, -1), cR (1,0.25) (2,-0.875) (1,-1.75)] <> path sj}
š0 = s2š s0
2021-05-03 12:47:34 -04:00
šLine = P [mA (0.5,-2.25), qR (1.5,-0.25) (2,0.25)]
ššPath = P [mA (0.5,-2), cR (2,-1) (5,1) (7,0)] <> ssPath
2021-04-30 07:46:57 -04:00
špPath = šLine <> spPath
šbPath = sPart <> šLine <> P [mA (3,0), lR (4,0)] <> shiftX 4 bPath
2021-04-30 07:46:57 -04:00
s2š g@(G {path}) = g {path = šLine <> path}
2021-04-29 06:01:16 -04:00
lGlyphs = [("l",l), ("ll", ll), ("lt",lt), ("lk",lk), ("lg",lg), ("ld",ld),
("",), ("lp",lp), ("lb",lb), ("ls",ls), ("",), ("lm",lm),
("ln",ln), ("lr",lr), ("",), ("",), ("lw",lw), ("lh",lh),
("lf",lf), ("lj",lj)]
2020-11-04 13:06:54 -05:00
l = simpleG lPath 4.625
ll = simpleG llPath 9
lt = simpleG ltPath 10
lk = simpleG lkPath 8.5
lg = simpleG lgPath 8.5
ld = simpleG ldPath 9.5
= simpleG lƶPath 9.5
lp = simpleG lpPath 10
lb = simpleG lbPath 10.5
ls = simpleG lsPath 9.5
= simpleG lšPath 9.5
lm = simpleG lmPath 10.5
ln = simpleG lnPath 9.25
lr = simpleG lrPath 7.5
= simpleG lčPath 9.5
= simpleG lǧPath 9.5
lw = simpleG lwPath 10.5
lh = simpleG lhPath 12.5
lf = simpleG lfPath 10.5
lj = simpleG ljPath 5
l0 = simpleG l0Path 3.75
lPath = lPart <> shiftX 4.5 aPath
2021-05-02 05:22:28 -04:00
lBase = P [mA (3,0.5), cR (0.25,-0.25) (0,-0.75) (-1.25,-0.5),
cR (-1.5,0.3) (-2,2.5) (0,2.5),
lR (0.75,0), mR (-1.25,0),
cR (-1.5,0.3) (-2,2.5) (0,2.5)]
lJoin = P [lR (0.25,0)] <> dJoin
lJoin' = P [lR (0.25,0)] <> dJoin'
lPart = lBase <> lJoin
lPart' = lBase <> lJoin'
lFree = lBase <> P [qR (2.25,0) (2.5,-0.5)]
lFree' = lBase <> P [qR (2,0) (2.25,-0.75)]
llPath = lPart <> shiftX 4.5 lPath
ltPath = lBase <> P [qR (4.5,0) (4.75,-3)] <> shiftX 4.5 tPath
lkPath = lPart <> shiftX 4.5 kShort
lgPath = lPart <> shiftX 4.5 gShort
ldPath = lFree' <> shiftX 4.5 dPath
lƶPath = lFree' <> shiftX 4.5 ƶPath
lpPath = lFree' <> shiftX 4.5 pPath
lbPath = lPart' <> shiftX 4.5 bPath
lsPath = lPart <> shiftX 4.5 sPath
lšPath = lPart <> shiftX 4.5 šPath
lmPath = lPart <> shiftX 4.5 mPath
2021-05-03 12:47:34 -04:00
lnPath = lPart' <> shiftX 4.25 nPath
lrPath = lPart <> P [qR (0,1.5) (1,1.5), qR (2,0) (2,-2), mR (0,-6), lR (0,8)]
2021-05-02 05:22:28 -04:00
lčPath = lFree' <> shiftX 4.5 čPath
lǧPath = lFree' <> shiftX 4.5 ǧPath
lwPath = lPart' <> shiftX 4.5 wPath
lhPath = lPart <> shiftX 4.5 hPath
lfPath = lFree' <> shiftX 4.5 fPath
2021-05-03 12:47:34 -04:00
ljPath = lFree' <> jTall
2021-04-29 06:17:19 -04:00
l0Path = lFree <> P [mA (1.25,7), cR (1.8,-0.25) (2.2,0) (2.5,0.5)]
2021-04-28 06:29:21 -04:00
mGlyphs = [("m",m), ("mt",mt), ("mk",mk), ("mg",mg), ("md",md), ("",),
("mp",mp), ("mb",mb), ("ms",ms), ("",), ("ml",ml), ("mm",mm),
("mn",mn), ("mr",mr), ("",), ("",), ("mw",mw), ("mh",mh),
2021-04-28 06:29:21 -04:00
("mf",mf), ("mj",mj)]
2020-11-04 13:06:54 -05:00
2021-06-20 15:28:54 -04:00
m = simpleG mPath 6.125
mt = simpleG mtPath 10
mk = simpleG mkPath 10
mg = simpleG mgPath 10
md = simpleG mdPath 12
= simpleG mƶPath 12
mp = simpleG mpPath 12.5
mb = simpleG mbPath 12
ms = simpleG msPath 11
= simpleG mšPath 11
ml = simpleG mlPath 11
mm = simpleG mmPath 12
mn = simpleG mnPath 11
mr = simpleG mrPath 9
= simpleG mčPath 12
= simpleG mǧPath 12
mw = simpleG mwPath 12
mh = simpleG mhPath 14
mf = simpleG mfPath 13
mj = simpleG mjPath 9
m0 = simpleG m0Path 6
2020-11-04 13:06:54 -05:00
2023-12-25 15:44:48 -05:00
mPath = mPart <> shiftX 6 longAPath
mInit = P [mA (0.5,0), cR (-0.25,0.2) (-0.5,2.25) (-0.5,3.5)]
2021-06-20 15:28:54 -04:00
mBumpI = P [cR (0,2) (2.5,2) (3,0)] <> mLine
mLine = P [qR (0.125,-1) (0.125,-2), mR (-0.125,2)]
mBumpF = P [cR (-0.5,2) (2.5,2) (3,0)]
mBumpM = mBumpF <> mLine
mBumpsN n = mconcat $ [mBumpI] <> replicate n mBumpM <> [mBumpF]
mBumps = mBumpsN 0
mPart = mInit <> mBumps
mFree = mPart <> P [cR (0.5,-2) (-0.75,-4) (-1.5,-3.5)]
2021-04-29 06:01:16 -04:00
mtPath = mPart <> shiftX 4.5 tPath
mkPath = mPart <> shiftX 6 kShort
mgPath = mPart <> shiftX 6 gShort
2021-06-20 15:28:54 -04:00
mdPath = mFree <> shiftX 7 dPath
mƶPath = mFree <> shiftX 7 ƶPath
mpPath = mFree <> shiftX 7 pPath
mbPath = mPart <> shiftX 6 bPath
msPath = mPart <> shiftX 6 sPath
mšPath = mPart <> shiftX 6 šPath
mlPath = mPart <> shiftX 6 lPath
2021-06-20 15:28:54 -04:00
mmPath = mInit <> mBumpsN 2 <> P [mR (0,-3.5), lR (0,5)]
mnPath = mPart <> shiftX 6 nPath
2021-06-20 15:28:54 -04:00
mrPath = mInit <> mBumpsN 1 <> P [mR (0,-6.5), lR (0,8)]
mčPath = mFree <> shiftX 7 čPath
mǧPath = mFree <> shiftX 7 ǧPath
mwPath = mPart <> shiftX 6 wPath
mhPath = mPart <> shiftX 6 hPath
2021-06-20 15:28:54 -04:00
mfPath = mFree <> shiftX 7 fPath
2023-12-25 15:44:48 -05:00
mjPath = mFree <> shiftX 4.5 jPath
2021-06-20 15:28:54 -04:00
m0Path = mFree <> P [mA (1.25,7), cR (3.55,-0.3) (3.8,0) (4,0.5)]
2021-04-28 06:29:21 -04:00
nGlyphs = [("n", n), ("nt", nt), ("nk", nk), ("ng", ng), ("nd", nd), ("", ),
("np", np), ("nb", nb), ("ns", ns), ("", ), ("nl", nl),
("nm", nm), ("nn", nn), ("nr", nr), ("", ), ("", ),
2021-04-28 06:29:21 -04:00
("nw", nw), ("nh", nh), ("nf", nf), ("nj", nj)]
n = simpleG nPath 5.125
nt = simpleG ntPath 10.5
nk = simpleG nkPath 9
ng = simpleG ngPath 9
nd = simpleG ndPath 10
= simpleG nƶPath 10
np = simpleG npPath 10.25
nb = simpleG nbPath 11
ns = simpleG nsPath 10
= simpleG nšPath 10
nl = simpleG nlPath 10
nm = simpleG nmPath 11
nn = simpleG nnPath 10
nr = simpleG nrPath 6.5
= simpleG nčPath 10
= simpleG nǧPath 9.75
nw = simpleG nwPath 11
nh = simpleG nhPath 13
nf = simpleG nfPath 10.75
nj = simpleG njPath 5.25
n0 = simpleG n0Path 3.5
nPath = nPart <> shiftX 5 aPath
2021-05-03 12:47:34 -04:00
nPart = nPart' <> P [cR (1.6,-0.25) (2.5,-1.75) (2.5,-2.5)]
nPart' = P [mA (3.5,1), cR (0.5,-1) (-0.5,-1.125) (-1,-1),
cR (-3.2,0.5) (-3.2,5.5) (0,5)]
nLong = nPart' <> P [cR (3.2,-0.5) (4,-1.5) (4,-2.5)]
nFlat = P [mA (5,0), lR (-2.5,0), aR 2.5 2.5 0 Large CCW (0,5),
cR (0.5,0) (1,-0.5) (1,-1.5)]
2021-05-03 12:47:34 -04:00
nFree = nPart' <> P [qR (0.8,-0.125) (1.5,-1)]
nFree' = nPart' <> P [qR (0.8,-0.125) (1,-1)]
2020-11-04 13:06:54 -05:00
ntPath = nLong <> shiftX 5 tPath
nkPath = nFlat <> shiftX 5 kShort
ngPath = nFlat <> shiftX 5 gShort
ndPath = nFlat <> shiftX 5 dPath
2021-04-28 06:29:21 -04:00
nƶPath = nFlat <> shiftX 5 ƶPath
2021-05-03 12:47:34 -04:00
npPath = nFree <> shiftX 4.75 pPath
nbPath = nFlat <> P [mA (5,0), lR (2,0)] <> shiftX 5 bPath
nsPath = nFlat <> shiftX 5 sPath
nšPath = nFlat <> shiftX 5 šPath
nlPath = nFlat <> P [mA (5,0), lR (1,0)] <> shiftX 5 lPath
nmPath = nFlat <> P [mA (5,0), lR (0.5,0)] <> shiftX 5 mPath
nnPath = nFlat <> P [mA (5,0), lR (2,0)] <> shiftX 5 nPath
2021-05-03 12:47:34 -04:00
nrPath = nFree' <> P [qR (0,1) (1,1), qR (2,0) (2,-2), mR (0,-6), lR (0,8)]
nčPath = nFlat <> shiftX 4 čFlat
2021-05-03 12:47:34 -04:00
nǧPath = nFree' <> shiftX 4.75 ǧPath
nwPath = nFlat <> P [mA (5,0), lR (2,0)] <> shiftX 5 wPath
nhPath = nFlat <> shiftX 5 hPath
2021-05-03 12:47:34 -04:00
nfPath = nFree' <> shiftX 4.75 fPath
njPath = nFree' <> jTall
n0Path = nFree <> P [mA (1,7), cR (1.8,-0.25) (2.2,0) (2.5,0.5)]
2021-04-28 06:29:21 -04:00
rGlyphs = [("r", r), ("rt", rt), ("rk", rk), ("rg", rg), ("rd", rd), ("", ),
("rp", rp), ("rb", rb), ("rs", rs), ("", ), ("rl", rl),
2021-04-29 06:01:16 -04:00
("rm", rm), ("rn", rn), ("rr", rr), ("", ), ("", ),
("rw", rw), ("rh", rh), ("rf", rf), ("rj", rj)]
2020-11-04 13:06:54 -05:00
r = simpleG rPath 5
rt = simpleG rtPath 7.5
rk = simpleG rkPath 7
rg = simpleG rgPath 7
rd = simpleG rdPath 9.5
= simpleG rƶPath 9.5
rp = simpleG rpPath 10
rb = simpleG rbPath 10.5
rs = simpleG rsPath 9.5
= simpleG ršPath 9.5
rl = simpleG rlPath 9.5
rm = simpleG rmPath 10.5
rr = simpleG rrPath 6
rn = simpleG rnPath 9
= simpleG rčPath 9.5
= simpleG rǧPath 9.5
rw = simpleG rwPath 10.5
rh = simpleG rhPath 12.5
rf = simpleG rfPath 10.5
rj = simpleG rjPath 7.5
r0 = simpleG r0Path 5
2020-11-04 13:06:54 -05:00
2023-12-25 15:44:48 -05:00
rPath = rPart <> shiftX 5 longAPath
2020-11-04 13:06:54 -05:00
rPart = P [mA (0,5), cR (3.5,0) (5,-1) (5,-2)]
2023-12-25 15:44:48 -05:00
rPartMid = P [mA (0,5), cR (1.25,0) (3.25,-1) (3.25,-2)]
2020-11-04 13:06:54 -05:00
rPartShort = P [mA (0,5), cR (1,0) (3,-1) (3,-2)]
2023-12-25 15:44:48 -05:00
rShort = rPartShort <> shiftX 3 longAPath
rtPath = rPartMid <> shiftX 2 tPath
rkPath = rPartShort <> shiftX 3 kShort
rgPath = rPartShort <> shiftX 3 gShort
rdPath = rMid <> shiftX 4.5 dPath
2021-04-28 06:29:21 -04:00
rƶPath = rMid <> shiftX 4.5 ƶPath
rpPath = rMid <> shiftX 4.5 pPath
rbPath = rMid <> shiftX 4.5 bPath
rsPath = rMid <> shiftX 4.5 sPath
ršPath = rMid <> shiftX 4.5 šPath
rlPath = rMid <> shiftX 4.5 lPath
rmPath = rMid <> shiftX 4.5 mPath
2021-04-29 06:01:16 -04:00
rnPath = rShort <> shiftX 4 nPath
rrPath = rShort <> shiftX 3 rShort
rčPath = rMid <> shiftX 4.5 čPath
rǧPath = rMid <> shiftX 4.5 ǧPath
rwPath = rMid <> shiftX 4.5 wPath
rhPath = rMid <> shiftX 4.5 hPath
rfPath = rMid <> shiftX 4.5 fPath
2023-12-25 15:44:48 -05:00
rjPath = rMid <> shiftX 4.5 jPathShort
rMid = rPartMid <> shiftX 3.25 longAPath
2021-04-29 06:17:19 -04:00
r0Path = ŕPath <> P [mA (1.25,7), cR (2.2,-0.25) (2.8,0) (3,0.5)]
čGlyphs = [("č", č), ("čs", čs), ("čč", čč)]
2020-11-04 13:06:54 -05:00
č = simpleG čPath 5
čs = simpleG čsPath 10
čč = simpleG ččPath 10
2020-11-04 13:06:54 -05:00
čPath = čPart <> čJoin <> P [mA (5,0), lR (0,5)]
čPart = P [mA (0,0.5), cR (2.25,-0.75) (2.55,-0.5) (2.75,-0.5)] <> čPart'
2020-11-04 13:06:54 -05:00
čPart' = P [aR 1.25 1.25 0 Small CW (0,2.5), lR (-2,0), mR (2,0),
aR 1.25 1.25 0 Small CW (0,2.5),
2021-04-29 12:07:10 -04:00
cR (-0.2,0.25) (-2.25,0) (-2.75,-0.5)]
2020-11-04 13:06:54 -05:00
čJoin = P [mA (2.5,5), cR (1.5,0) (2.5,-0.5) (2.5,-1)]
čPartFlat = P [mA (0,0), lR (3.5,0)] <> čPart'
2020-11-04 13:06:54 -05:00
čFlat = čPartFlat <> shiftX 1 čJoin <> P [mA (6,0), lR (0,5)]
čsPath = čPart <> shiftX 5 sPath
ččPath = čPart <> shiftX 5 čPath
2020-11-04 13:06:54 -05:00
ǧ = simpleG ǧPath 5
2020-11-04 13:06:54 -05:00
ǧPath = ǧPart <> čJoin <> P [mA (5,-3), lR (0,8)]
ǧPart = P [mA (0,-2), cR (2.25,-0.75) (2.55,-0.5) (2.75,-0.5),
aR 1.25 1.25 0 Small CW (0,2.5),
lR (-2,0), mR (2,0),
aR 1.25 1.25 0 Small CW (0,2.5),
lR (-2,0), mR (2,0),
aR 1.25 1.25 0 Small CW (0,2.5),
cR (-0.2,0.25) (-2.25,0) (-2.75,-0.5)]
w = simpleG wPath 6
2020-11-04 13:06:54 -05:00
2023-12-25 15:44:48 -05:00
wPath = wPart <> shiftX 6 aPath
2021-04-29 12:07:10 -04:00
wPart = uPath <> P [mA (2.5,0), lR (3.5,0)]
2020-11-04 13:06:54 -05:00
hGlyphs = [("h", h), ("hh", hh), ("hn", hn), ("hm", hm)]
h = simpleG hPath 8.5
hh = simpleG hhPath 16.5
hn = simpleG hnPath 15
hm = simpleG hmPath 16
2020-11-04 13:06:54 -05:00
2023-12-25 15:44:48 -05:00
hPath = hPart <> shiftX 3.5 gHat <> shiftX 8.5 longAPath
2021-05-02 05:22:28 -04:00
hPart' x = sPart <> P [mA (2.5,0), lR (1.5,0)] <> shiftX 4 x
hPart = hPart' sPartIso
hhPath = hPart' sPart <> P [mA (6.5,0), lR (1.5,0)] <> shiftX 8 hPart <>
shiftX 11.5 gHat <> P [mA (16.5,-3), lR (0,8)]
hnPath = hPath <> shiftX 10 nPath
hmPath = hPath <> shiftX 10 mPath
2020-11-04 13:06:54 -05:00
fGlyphs = [("f", f), ("fn", fn), ("fm", fm)]
2020-11-04 13:06:54 -05:00
f = simpleG fPath 6
fn = simpleG fnPath 12
fm = simpleG fmPath 12
f0 = simpleG f0Path 6
2020-11-04 13:06:54 -05:00
fPath = fPart <> P [lR (0,2.5)]
2021-05-10 10:16:03 -04:00
fPart = P [mA (4.25,2.5),
cR (0.5,-1) (-1.75,-1) (-1.75, 0),
cR (0,1) (1.75,0.75) (1.75,1.75),
cR (0,0.35) (-0.15,0.65) (-1.75,0.75),
cR (-3.2,0.5) (-3.2,-5) (1,-5.5),
cR (1.6,-0.25) (2.5,1) (2.5,3)
]
fnPath = fPath <> shiftX 7 nPath
2021-06-20 15:28:54 -04:00
fmPath = fPart <> P [lR (0,1)] <> mBumps <> P [mA (12,0), lR (0,5)]
2021-04-29 06:17:19 -04:00
f0Path = fPath <> P [mA (1.5,7), cR (2.8,-0.35) (3.1,0) (3.5,0.5)]
2020-11-04 13:06:54 -05:00
j = simpleG jPath 4
2020-11-04 13:06:54 -05:00
2021-05-03 12:47:34 -04:00
jPath = P [mA (0,0), qR (1.25,0.5) (4,0)] <> shiftX 3.75 aPath
jPathShort = P [mA (0,0), qR (1,0.25) (3,0)] <> shiftX 2.75 aPath
2023-12-25 15:44:48 -05:00
jTall = gHat <> shiftX 5 longAPath
2020-11-04 13:06:54 -05:00
vGlyphs = [("a", a), ("á", á), ("i", i), ("í", í), ("u", u), ("ú", ú),
("ai", ai), ("au", au), ("ia", ia), ("ua", ua), ("ḿ", ḿ),
("ń", ń), ("ł", ł), ("ŕ", ŕ)]
2020-11-04 13:06:54 -05:00
a = simpleG aPath 0.125
á = simpleG áPath 2.125
2020-11-04 13:06:54 -05:00
i = j
í = simpleG íPath 5
u = simpleG uPath 4.5
ú = simpleG úPath 4
ai = simpleG aiPath 5
au = simpleG auPath 4.5
ia = simpleG iaPath 5
ua = simpleG uaPath 4.5
ḿ = simpleG ḿPath 6
ń = simpleG ńPath 4
ł = simpleG łPath 3.75
ŕ = simpleG ŕPath 5
2020-11-04 13:06:54 -05:00
2021-04-29 12:07:10 -04:00
aPath = P [mA (0.25,0), cR (-0.25,1) (-0.25,2) (-0.25,5)]
2023-12-25 15:44:48 -05:00
longAPath = P [mA (0.25,-3), cR (-0.25,1) (-0.25,2) (-0.25,5), lR (0, 3)]
2021-04-29 12:07:10 -04:00
áPath = aPath <> shiftX 2 aPath
íPath = P [mA (0,0), lR (5,0)] <> shiftX 2.75 aPath <> shiftX 4.75 aPath
uPath = P [mA (2.25,0),
cR (-3.2,0.5) (-3.2,5.5) (0,5),
cR (3.2,-0.5) (3.2,-5.5) (0,-5)]
uNarrow = P [mA (1.5,0),
cR (-2.2,0.25) (-2.2,5.25) (0,5),
cR (2.2,-0.25) (2.2,-5.25) (0,-5)]
úPath = uPath <> P [mA (4.25,-3), cR (-1.5,3) (-3.2,8) (-2.8,12)]
aiPath = aPath <> P [mR (2,-5), lR (3,0)] <> shiftX 4.75 aPath
auPath = aPath <> shiftX 1.5 uNarrow
iaPath = P [mA (0,0), lR (3,0)] <> shiftX 2.75 aPath <> shiftX 5 aPath
uaPath = uNarrow <> shiftX 4.5 aPath
2021-06-20 15:28:54 -04:00
ḿPath = mFree
2021-05-03 12:47:34 -04:00
ńPath = nFree
2020-11-04 13:06:54 -05:00
łPath = lFree
2023-12-25 15:44:48 -05:00
ŕPath = rPart <> shiftX 5 aPath
2020-11-04 13:06:54 -05:00
2023-12-25 15:44:48 -05:00
adot = circR 0.2
2020-11-04 13:06:54 -05:00
withWidth f (SI {width}) = (f width, width)
2021-05-10 18:52:17 -04:00
sP = simpleDia . P
-- no @mA@ because letters like t have the join not quite at the edge
2021-05-10 18:52:17 -04:00
da = [sP [lR (0,5)]]
= da <> [withWidth \w -> P [mA (w/2-1,8), cR (0.75,-0.5) (1.25,0.5) (2,0)]]
2023-12-25 15:44:48 -05:00
di = da <> diLine
= da <> [sP [cR (1,0) (4,-3) (0,-3), qR (-3,0) (-4,1)]]
du = da <> duLine
= du <> [sP [mR (0.5, 3.5)]] <> duLine
2021-05-10 18:52:17 -04:00
2023-12-25 15:44:48 -05:00
duLine = [sP [qR (-1, -2.75) (-2, -3.5)]]
diLine = [sP [qR (1.5, -1.5) (1.5, -4)]]
dai = da <> [sP [mR (-4,-3), lR (2.5,0), qR (-0.5,1) (-0.5,3)]]
2021-05-10 18:52:17 -04:00
dau = da <> [sP [mR (-3,-3.5),
cR (-1.5,0.25) (-1.5,3.25) (0,3),
cR (1.5,-0.25) (1.5,-3.25) (0,-3),
cR (1,-0.25) (2,0.5) (3,0)]]
2023-12-25 15:44:48 -05:00
dia = di <> [sP $ adot (-4,0)]
dua = du <> [sP $ adot (-2,0)]
2021-05-10 18:52:17 -04:00
dḿ = da <> [sP [mR (-4,-3), cR (-0.375,1.125) (-0.25,1.275) (-0.25,1.375),
aR 0.625 0.625 0 Small CCW (1.5,0),
lR (0,-1), mR (0,1),
aR 0.625 0.625 0 Small CCW (1.5,0),
cR (0.125,-0.1) (0,-1.125) (-0.25,-1.375)]]
= da <> [sP [mR (-2,-2.5),
qR (0.25,-0.625) (-0.5,-0.5),
cR (-1.5,0.25) (-1.5,2.75) (0,2.5),
qR (0.375,-0.0625) (0.5,-0.3)]]
2021-05-03 12:47:34 -04:00
= da <>
2021-05-10 18:52:17 -04:00
[sP [mR (-2,-2.75),
cR (0.125,-0.125) (0,-0.375) (-0.625,-0.25),
cR (-0.75,0.15) (-1,1.25) (0,1.25),
lR (0.375,0), mR (-0.625,0),
cR (-0.75,0.15) (-1,1.25) (0,1.25),
qR (1,0) (1.125,-0.375)]]
= da <> [sP [mR (-3,0), cR (1,0) (3,-1) (3,-2)]]
2021-04-28 06:29:21 -04:00
punctuation :: Map Text Glyph
punctuation = Map.fromList
2021-06-11 09:47:54 -04:00
[(".", eos), ("?", eos), ("!", eos), (",", eop), (":", eop), (";", eop),
("", ellipsis)]
eos = simpleG eosPath 4
2021-04-29 13:01:42 -04:00
eosPath = P $ circA 1 (4,1) <> circA 1 (4,4)
eop = simpleG eopPath 2
2021-04-29 13:01:42 -04:00
eopPath = P $ circA 1 (3,2.5)
num = simpleG path 1
where path = P [mA (0,0), lR (0,5), mA (1,0), lR (0,5)]
2021-04-28 06:29:21 -04:00
numbers = Map.fromList $
zip [0..9::Int] [u, t, n2, simpleG dFree 3, n4, n5, ł, ḿ, ń, f]
n2 = simpleG n2Path 5
n2Path = P [mA (0,0), lR (0,5), sR (3,0) (5,-0.5), mA (5,0), lR (0,5)]
n4 = simpleG n4Path 5
n4Path = P [mA (1.5,0), lR (0,5), sR (-1.5,-3) (-1.5,-5), lR (5,0), lR (0,5)]
n5 = simpleG n5Path 4
2021-04-29 06:01:16 -04:00
n5Path = P [mA (0,5), lR (0,-3.5), aR 1.5 1.5 0 Small CW (1.5,-1.5),
lR (1,0), aR 1.5 1.5 0 Small CW (1.5,1.5), lR (0,3.5)]
2021-04-29 05:55:54 -04:00
wave :: Glyph
wave = simpleG wavePath 4
2021-06-11 09:47:54 -04:00
ellipsis :: Glyph
ellipsis = simpleG (shiftX 3.5 wavePath) 6
wavePath = P [mA (0,2.5), cR (1.5,-2) (2.5,2) (4,0)]