lang/laantas-script/Glyphs.hs

722 lines
25 KiB
Haskell
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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