lántas script updates

This commit is contained in:
Rhiannon Morris 2023-12-25 21:44:48 +01:00
parent d44c407560
commit a2dc61b428
2 changed files with 32 additions and 25 deletions

View file

@ -75,7 +75,7 @@ ttPath = P [mA (0,0), lR (7,0)]
tkPath = tPart 5 <> shiftX 5 (aPath <> kBottomShort <> P [mA (4,-3), lR (0,8)]) tkPath = tPart 5 <> shiftX 5 (aPath <> kBottomShort <> P [mA (4,-3), lR (0,8)])
tgPath = shiftX 5 gShortHat <> tkPath tgPath = shiftX 5 gShortHat <> tkPath
tdPath = tPart 4 <> shiftX 4 dPath tdPath = tPart 4 <> shiftX 4 dPath
tƶPath = tdPath <> P [mA (6,-3), lR (3,0)] tƶPath = shiftX 5 gShortHat <> tdPath
tpPath = P [mA (2,-3), lR (0,8), mA (0,-3), lR (6,0)] <> shiftX 4 pPath tpPath = P [mA (2,-3), lR (0,8), mA (0,-3), lR (6,0)] <> shiftX 4 pPath
tbPath = tPart 6 <> shiftX 4 bPath tbPath = tPart 6 <> shiftX 4 bPath
tsPath = tPart 4 <> shiftX 4 sPath tsPath = tPart 4 <> shiftX 4 sPath
@ -101,10 +101,10 @@ ks = simpleG ksPath 9
kLeft = P [mA (0,0), cR (0.5,0.75) (0,3) (0,5)] 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)] kBottomShort = P [cR (0,0) (2.6,0) (4,-0.5)]
kPath = kLeft <> kBottom <> P [mA (5,-3), lR (0,8)] kPath = kLeft <> kBottom <> shiftX 5 longAPath
kBottom = P [cR (0,0) (3,0) (5,-0.5)] kBottom = P [cR (0,0) (3,0) (5,-0.5)]
kShortPart = kLeft <> kBottomShort kShortPart = kLeft <> kBottomShort
kShort = kShortPart <> P [mA (4,-3), lR (0,8)] kShort = kShortPart <> shiftX 4 longAPath
kkPath = kShortPart <> shiftX 4 kShort kkPath = kShortPart <> shiftX 4 kShort
ksPath = kShortPart <> shiftX 4 sPath ksPath = kShortPart <> shiftX 4 sPath
@ -119,7 +119,7 @@ gShortHat = P [mA (1.25,-2.75), qR (1.25,0.125) (2.75,-0.25)]
d = simpleG dPath 5 d = simpleG dPath 5
dPath = dPart <> P [mA (5,-3), lR (0,8)] dPath = dPart <> shiftX 5 longAPath
dPart' = dBase <> dJoin' dPart' = dBase <> dJoin'
dPart = dBase <> dJoin dPart = dBase <> dJoin
dJoin = P [cR (2,0) (3,-0.75) (3,-1.5)] dJoin = P [cR (2,0) (3,-0.75) (3,-1.5)]
@ -209,7 +209,7 @@ bGlyphs = [("b", b), ("bj", bj)]
b = simpleG bPath 6 b = simpleG bPath 6
bj = simpleG bjPath 9 bj = simpleG bjPath 9
bPath = shiftX 1 gHat <> wPart <> P [mA (6,-3), lR (0,8)] bPath = shiftX 1 gHat <> wPart <> shiftX 6 longAPath
bjPath = bjPath =
bPath <> bPath <>
P [mA (6,0.5), qR (1.5,0) (3,-0.5)] <> P [mA (6,0.5), qR (1.5,0) (3,-0.5)] <>
@ -395,7 +395,7 @@ mf = simpleG mfPath 13
mj = simpleG mjPath 9 mj = simpleG mjPath 9
m0 = simpleG m0Path 6 m0 = simpleG m0Path 6
mPath = mPart <> shiftX 6 aPath mPath = mPart <> shiftX 6 longAPath
mInit = P [mA (0.5,0), cR (-0.25,0.2) (-0.5,2.25) (-0.5,3.5)] mInit = P [mA (0.5,0), cR (-0.25,0.2) (-0.5,2.25) (-0.5,3.5)]
mBumpI = P [cR (0,2) (2.5,2) (3,0)] <> mLine mBumpI = P [cR (0,2) (2.5,2) (3,0)] <> mLine
mLine = P [qR (0.125,-1) (0.125,-2), mR (-0.125,2)] mLine = P [qR (0.125,-1) (0.125,-2), mR (-0.125,2)]
@ -423,7 +423,7 @@ mǧPath = mFree <> shiftX 7 ǧPath
mwPath = mPart <> shiftX 6 wPath mwPath = mPart <> shiftX 6 wPath
mhPath = mPart <> shiftX 6 hPath mhPath = mPart <> shiftX 6 hPath
mfPath = mFree <> shiftX 7 fPath mfPath = mFree <> shiftX 7 fPath
mjPath = mFree <> P [mA (5.5,0), lR (3.5,0), lR (0,5)] mjPath = mFree <> shiftX 4.5 jPath
m0Path = mFree <> P [mA (1.25,7), cR (3.55,-0.3) (3.8,0) (4,0.5)] m0Path = mFree <> P [mA (1.25,7), cR (3.55,-0.3) (3.8,0) (4,0.5)]
@ -512,11 +512,11 @@ rf = simpleG rfPath 10.5
rj = simpleG rjPath 7.5 rj = simpleG rjPath 7.5
r0 = simpleG r0Path 5 r0 = simpleG r0Path 5
rPath = rPart <> P [mA (5,-3), lR (0,8)] rPath = rPart <> shiftX 5 longAPath
rPart = P [mA (0,5), cR (3.5,0) (5,-1) (5,-2)] rPart = P [mA (0,5), cR (3.5,0) (5,-1) (5,-2)]
rPartMid = P [mA (0,5), cR (1.25,0) (3.5,-1) (3.5,-2)] rPartMid = P [mA (0,5), cR (1.25,0) (3.25,-1) (3.25,-2)]
rPartShort = P [mA (0,5), cR (1,0) (3,-1) (3,-2)] rPartShort = P [mA (0,5), cR (1,0) (3,-1) (3,-2)]
rShort = rPartShort <> P [mA (3,-3), lR (0,8)] rShort = rPartShort <> shiftX 3 longAPath
rtPath = rPartMid <> shiftX 2 tPath rtPath = rPartMid <> shiftX 2 tPath
rkPath = rPartShort <> shiftX 3 kShort rkPath = rPartShort <> shiftX 3 kShort
rgPath = rPartShort <> shiftX 3 gShort rgPath = rPartShort <> shiftX 3 gShort
@ -535,8 +535,8 @@ rǧPath = rMid <> shiftX 4.5 ǧPath
rwPath = rMid <> shiftX 4.5 wPath rwPath = rMid <> shiftX 4.5 wPath
rhPath = rMid <> shiftX 4.5 hPath rhPath = rMid <> shiftX 4.5 hPath
rfPath = rMid <> shiftX 4.5 fPath rfPath = rMid <> shiftX 4.5 fPath
rjPath = rMid <> P [mA (3.5,0), lR (4,0), lR (0,5)] rjPath = rMid <> shiftX 4.5 jPathShort
rMid = rPartMid <> P [mA (3.5,0), lR (0,5)] rMid = rPartMid <> shiftX 3.25 longAPath
r0Path = ŕPath <> P [mA (1.25,7), cR (2.2,-0.25) (2.8,0) (3,0.5)] r0Path = ŕPath <> P [mA (1.25,7), cR (2.2,-0.25) (2.8,0) (3,0.5)]
@ -572,7 +572,7 @@ r0Path = ŕPath <> P [mA (1.25,7), cR (2.2,-0.25) (2.8,0) (3,0.5)]
w = simpleG wPath 6 w = simpleG wPath 6
wPath = wPart <> shiftX 5.75 aPath wPath = wPart <> shiftX 6 aPath
wPart = uPath <> P [mA (2.5,0), lR (3.5,0)] wPart = uPath <> P [mA (2.5,0), lR (3.5,0)]
@ -583,7 +583,7 @@ hh = simpleG hhPath 16.5
hn = simpleG hnPath 15 hn = simpleG hnPath 15
hm = simpleG hmPath 16 hm = simpleG hmPath 16
hPath = hPart <> shiftX 3.5 gHat <> P [mA (8.5,-3), lR (0,8)] hPath = hPart <> shiftX 3.5 gHat <> shiftX 8.5 longAPath
hPart' x = sPart <> P [mA (2.5,0), lR (1.5,0)] <> shiftX 4 x hPart' x = sPart <> P [mA (2.5,0), lR (1.5,0)] <> shiftX 4 x
hPart = hPart' sPartIso hPart = hPart' sPartIso
hhPath = hPart' sPart <> P [mA (6.5,0), lR (1.5,0)] <> shiftX 8 hPart <> hhPath = hPart' sPart <> P [mA (6.5,0), lR (1.5,0)] <> shiftX 8 hPart <>
@ -615,7 +615,7 @@ j = simpleG jPath 4
jPath = P [mA (0,0), qR (1.25,0.5) (4,0)] <> shiftX 3.75 aPath 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 jPathShort = P [mA (0,0), qR (1,0.25) (3,0)] <> shiftX 2.75 aPath
jTall = gHat <> P [lR (0,8)] jTall = gHat <> shiftX 5 longAPath
vGlyphs = [("a", a), ("á", á), ("i", i), ("í", í), ("u", u), ("ú", ú), vGlyphs = [("a", a), ("á", á), ("i", i), ("í", í), ("u", u), ("ú", ú),
@ -638,6 +638,7 @@ ua = simpleG uaPath 4.5
ŕ = simpleG ŕPath 5 ŕ = simpleG ŕPath 5
aPath = P [mA (0.25,0), cR (-0.25,1) (-0.25,2) (-0.25,5)] aPath = P [mA (0.25,0), cR (-0.25,1) (-0.25,2) (-0.25,5)]
longAPath = P [mA (0.25,-3), cR (-0.25,1) (-0.25,2) (-0.25,5), lR (0, 3)]
áPath = aPath <> shiftX 2 aPath áPath = aPath <> shiftX 2 aPath
íPath = P [mA (0,0), lR (5,0)] <> shiftX 2.75 aPath <> shiftX 4.75 aPath íPath = P [mA (0,0), lR (5,0)] <> shiftX 2.75 aPath <> shiftX 4.75 aPath
uPath = P [mA (2.25,0), uPath = P [mA (2.25,0),
@ -654,10 +655,10 @@ uaPath = uNarrow <> shiftX 4.5 aPath
ḿPath = mFree ḿPath = mFree
ńPath = nFree ńPath = nFree
łPath = lFree łPath = lFree
ŕPath = rPart <> P [mA (5,0), lR (0,5)] ŕPath = rPart <> shiftX 5 aPath
adot = P . circR 0.2 adot = circR 0.2
withWidth f (SI {width}) = (f width, width) withWidth f (SI {width}) = (f width, width)
sP = simpleDia . P sP = simpleDia . P
@ -665,18 +666,21 @@ sP = simpleDia . P
-- no @mA@ because letters like t have the join not quite at the edge -- no @mA@ because letters like t have the join not quite at the edge
da = [sP [lR (0,5)]] 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)]] = da <> [withWidth \w -> P [mA (w/2-1,8), cR (0.75,-0.5) (1.25,0.5) (2,0)]]
di = da <> [sP [cR (1,-2) (3,-3) (0,-3)]] di = da <> diLine
= da <> [sP [cR (1,-2) (4,-3) (-4,-3)]] = da <> [sP [cR (1,0) (4,-3) (0,-3), qR (-3,0) (-4,1)]]
du = da <> [sP [lR (-4,0)]] du = da <> duLine
= du <> [sP [mR (4,-3), lR (-3,0)]] = du <> [sP [mR (0.5, 3.5)]] <> duLine
dai = da <> [sP [mR (-4,-3), lR (2.5,0), lR (0,3)]] 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)]]
dau = da <> [sP [mR (-3,-3.5), 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.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)]] cR (1,-0.25) (2,0.5) (3,0)]]
dia = di <> [withWidth \w -> adot (-w/2,0)] dia = di <> [sP $ adot (-4,0)]
dua = du <> [withWidth \w -> P [mA (w/2,7)] <> adot (0,0)] dua = du <> [sP $ adot (-2,0)]
dḿ = da <> [sP [mR (-4,-3), cR (-0.375,1.125) (-0.25,1.275) (-0.25,1.375), 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), aR 0.625 0.625 0 Small CCW (1.5,0),

View file

@ -23,8 +23,11 @@ longestWith name p = try $ go . Text.singleton =<< lcChar where
Nothing -> fail $ "longestWith " <> name <> ": " <> show acc Nothing -> fail $ "longestWith " <> name <> ": " <> show acc
Just x -> try (do c <- lcChar; go $ Text.snoc acc c) <|> pure x Just x -> try (do c <- lcChar; go $ Text.snoc acc c) <|> pure x
unthorn :: Text -> Text
unthorn = Text.map \case 'þ' -> 'ƶ'; 'ð' -> 'ƶ'; c -> c
maxFrom :: String -> Map Text a -> P a maxFrom :: String -> Map Text a -> P a
maxFrom name i = longestWith name \x -> Map.lookup x i maxFrom name i = longestWith name \x -> Map.lookup (unthorn x) i
initial :: P Glyph initial :: P Glyph
initial = maxFrom "initial" initials initial = maxFrom "initial" initials