diff --git a/laantas-script/Glyphs.hs b/laantas-script/Glyphs.hs index 78fc504..485c089 100644 --- a/laantas-script/Glyphs.hs +++ b/laantas-script/Glyphs.hs @@ -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)]) tgPath = shiftX 5 gShortHat <> tkPath 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 tbPath = tPart 6 <> shiftX 4 bPath 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)] 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)] kShortPart = kLeft <> kBottomShort -kShort = kShortPart <> P [mA (4,-3), lR (0,8)] +kShort = kShortPart <> shiftX 4 longAPath kkPath = kShortPart <> shiftX 4 kShort 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 -dPath = dPart <> P [mA (5,-3), lR (0,8)] +dPath = dPart <> shiftX 5 longAPath dPart' = dBase <> dJoin' dPart = dBase <> dJoin dJoin = P [cR (2,0) (3,-0.75) (3,-1.5)] @@ -209,7 +209,7 @@ bGlyphs = [("b", b), ("bj", bj)] b = simpleG bPath 6 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 = bPath <> P [mA (6,0.5), qR (1.5,0) (3,-0.5)] <> @@ -395,7 +395,7 @@ mf = simpleG mfPath 13 mj = simpleG mjPath 9 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)] mBumpI = P [cR (0,2) (2.5,2) (3,0)] <> mLine 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 mhPath = mPart <> shiftX 6 hPath 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)] @@ -512,11 +512,11 @@ rf = simpleG rfPath 10.5 rj = simpleG rjPath 7.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)] -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)] -rShort = rPartShort <> P [mA (3,-3), lR (0,8)] +rShort = rPartShort <> shiftX 3 longAPath rtPath = rPartMid <> shiftX 2 tPath rkPath = rPartShort <> shiftX 3 kShort rgPath = rPartShort <> shiftX 3 gShort @@ -535,8 +535,8 @@ 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)] +rjPath = rMid <> shiftX 4.5 jPathShort +rMid = rPartMid <> shiftX 3.25 longAPath 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 -wPath = wPart <> shiftX 5.75 aPath +wPath = wPart <> shiftX 6 aPath wPart = uPath <> P [mA (2.5,0), lR (3.5,0)] @@ -583,7 +583,7 @@ hh = simpleG hhPath 16.5 hn = simpleG hnPath 15 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 = hPart' sPartIso 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 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), ("ú", ú), @@ -638,6 +638,7 @@ ua = simpleG uaPath 4.5 ŕ = simpleG ŕPath 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 = P [mA (0,0), lR (5,0)] <> shiftX 2.75 aPath <> shiftX 4.75 aPath uPath = P [mA (2.25,0), @@ -654,10 +655,10 @@ uaPath = uNarrow <> shiftX 4.5 aPath ḿPath = mFree ńPath = nFree ł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) sP = simpleDia . P @@ -665,18 +666,21 @@ sP = simpleDia . P -- no @mA@ because letters like t have the join not quite at the edge da = [sP [lR (0,5)]] dá = 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)]] -dí = da <> [sP [cR (1,-2) (4,-3) (-4,-3)]] -du = da <> [sP [lR (-4,0)]] -dú = du <> [sP [mR (4,-3), lR (-3,0)]] +di = da <> diLine +dí = da <> [sP [cR (1,0) (4,-3) (0,-3), qR (-3,0) (-4,1)]] +du = da <> duLine +dú = 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), 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 <> [withWidth \w -> adot (-w/2,0)] -dua = du <> [withWidth \w -> P [mA (w/2,7)] <> adot (0,0)] +dia = di <> [sP $ adot (-4,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), aR 0.625 0.625 0 Small CCW (1.5,0), diff --git a/laantas-script/Split.hs b/laantas-script/Split.hs index a904453..8aed8c8 100644 --- a/laantas-script/Split.hs +++ b/laantas-script/Split.hs @@ -23,8 +23,11 @@ longestWith name p = try $ go . Text.singleton =<< lcChar where Nothing -> fail $ "longestWith " <> name <> ": " <> show acc 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 name i = longestWith name \x -> Map.lookup x i +maxFrom name i = longestWith name \x -> Map.lookup (unthorn x) i initial :: P Glyph initial = maxFrom "initial" initials