Skip to content

Commit

Permalink
Use class kerning
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Jan 4, 2024
1 parent ee10625 commit b23e92b
Show file tree
Hide file tree
Showing 36 changed files with 641 additions and 788 deletions.
Binary file modified docs/assets/fonts/Raqq.woff2
Binary file not shown.
Binary file modified fonts/Raqq.ttf
Binary file not shown.
Binary file modified fonts/Raqq.woff2
Binary file not shown.
9 changes: 5 additions & 4 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def makeMark(font, glyphOrder):

def makeAyah(font, glyphOrder):
bases = []
marks = []
marks = {}
for gname in glyphOrder:
glyph = font.glyphs[gname]
if glyph is None:
Expand All @@ -242,15 +242,16 @@ def makeAyah(font, glyphOrder):
if anchor.name.startswith("_") and anchor.name[1:] in AYAH_ANCHORS:
x = anchor.position.x
y = anchor.position.y
marks.append((gname, (x, y)))
marks.setdefault((x, y), []).append(gname)
break

ayah = ""
for base, (bx, by) in bases:
for mark, (mx, my) in marks:
for mx, my in marks:
names = " ".join(marks[(mx, my)])
x = bx + mx
y = by - my
ayah += f"pos {base} <NULL> {mark} <{-x} {y} 0 0>;\n"
ayah += f"pos {base} <NULL> [{names}] <{-x} {y} 0 0>;\n"

if ayah:
return f"""
Expand Down
112 changes: 55 additions & 57 deletions sources/Raqq.glyphspackage/glyphs/_ayah.005.1.glyph
Original file line number Diff line number Diff line change
Expand Up @@ -7,66 +7,64 @@ shapes = (
{
closed = 1;
nodes = (
(69,26,o),
(88,25,o),
(97,41,cs),
(107,58,o),
(106,97,o),
(106,113,cs),
(106,131,o),
(106,149,o),
(105,163,c),
(347,163,l),
(382,203,l),
(306,214,o),
(290,226,o),
(256,280,c),
(251,266,o),
(244,254,o),
(238,243,c),
(231,260,o),
(219,269,o),
(200,269,cs),
(183,269,o),
(168,264,o),
(159,249,c),
(155,277,l),
(140,252,o),
(135,242,o),
(122,229,c),
(118,245,o),
(115,264,o),
(113,269,c),
(99,235,o),
(95,229,o),
(81,221,c),
(72,228,o),
(59,235,o),
(45,235,c),
(42,213,o),
(12,197,o),
(-5,189,c),
(44,179,o),
(54,173,o),
(62,162,c),
(70,146,o),
(70,96,o),
(69,74,c),
(50,74,o),
(39,78,o),
(29,84,c),
(15,60,o),
(-5,49,o),
(-9,51,c),
(2,36,o),
(24,28,o),
(45,27,cs)
(439,26,o),
(458,25,o),
(467,41,cs),
(477,58,o),
(476,97,o),
(476,113,cs),
(476,131,o),
(476,149,o),
(475,163,c),
(717,163,l),
(752,203,l),
(676,214,o),
(660,226,o),
(626,280,c),
(621,266,o),
(614,254,o),
(608,243,c),
(601,260,o),
(589,269,o),
(570,269,cs),
(553,269,o),
(538,264,o),
(529,249,c),
(525,277,l),
(510,252,o),
(505,242,o),
(492,229,c),
(488,245,o),
(485,264,o),
(483,269,c),
(469,235,o),
(465,229,o),
(451,221,c),
(442,228,o),
(429,235,o),
(415,235,c),
(412,213,o),
(382,197,o),
(365,189,c),
(414,179,o),
(424,173,o),
(432,162,c),
(440,146,o),
(440,96,o),
(439,74,c),
(420,74,o),
(409,78,o),
(399,84,c),
(385,60,o),
(365,49,o),
(361,51,c),
(372,36,o),
(394,28,o),
(415,27,cs)
);
}
);
width = 372;
width = 1117;
}
);
metricLeft = "=-9";
metricRight = "=-10";
}
168 changes: 83 additions & 85 deletions sources/Raqq.glyphspackage/glyphs/_ayah.005.glyph
Original file line number Diff line number Diff line change
Expand Up @@ -7,99 +7,97 @@ shapes = (
{
closed = 1;
nodes = (
(198,220,o),
(197,221,o),
(197,224,cs),
(197,225,o),
(198,228,o),
(201,228,cs),
(203,228,o),
(205,225,o),
(205,224,cs),
(205,221,o),
(202,220,o),
(201,220,cs)
(568,220,o),
(567,221,o),
(567,224,cs),
(567,225,o),
(568,228,o),
(571,228,cs),
(573,228,o),
(575,225,o),
(575,224,cs),
(575,221,o),
(572,220,o),
(571,220,cs)
);
},
{
closed = 1;
nodes = (
(85,30,o),
(93,44,cs),
(102,59,o),
(101,97,o),
(101,113,cs),
(101,133,o),
(101,153,o),
(99,168,c),
(345,168,l),
(372,199,l),
(306,210,o),
(287,223,o),
(257,269,c),
(252,257,o),
(246,246,o),
(240,236,c),
(243,225,o),
(245,217,o),
(245,207,c),
(241,207,l),
(236,248,o),
(225,264,o),
(200,264,cs),
(175,264,o),
(155,253,o),
(153,207,c),
(149,207,l),
(149,216,o),
(150,229,o),
(155,240,c),
(152,262,l),
(142,245,o),
(136,236,o),
(124,224,c),
(125,218,o),
(129,211,o),
(131,208,c),
(127,205,l),
(119,216,o),
(115,238,o),
(112,253,c),
(103,232,o),
(97,225,o),
(86,218,c),
(89,211,o),
(94,205,o),
(95,203,c),
(92,199,l),
(84,213,o),
(68,228,o),
(49,230,c),
(45,212,o),
(25,195,o),
(9,191,c),
(48,183,o),
(59,176,o),
(66,164,cs),
(76,146,o),
(75,88,o),
(74,69,c),
(54,68,o),
(41,72,o),
(31,77,c),
(21,62,o),
(8,52,o),
(0,48,c),
(11,38,o),
(28,33,o),
(45,32,cs),
(69,31,o)
(455,30,o),
(463,44,cs),
(472,59,o),
(471,97,o),
(471,113,cs),
(471,133,o),
(471,153,o),
(469,168,c),
(715,168,l),
(742,199,l),
(676,210,o),
(657,223,o),
(627,269,c),
(622,257,o),
(616,246,o),
(610,236,c),
(613,225,o),
(615,217,o),
(615,207,c),
(611,207,l),
(606,248,o),
(595,264,o),
(570,264,cs),
(545,264,o),
(525,253,o),
(523,207,c),
(519,207,l),
(519,216,o),
(520,229,o),
(525,240,c),
(522,262,l),
(512,245,o),
(506,236,o),
(494,224,c),
(495,218,o),
(499,211,o),
(501,208,c),
(497,205,l),
(489,216,o),
(485,238,o),
(482,253,c),
(473,232,o),
(467,225,o),
(456,218,c),
(459,211,o),
(464,205,o),
(465,203,c),
(462,199,l),
(454,213,o),
(438,228,o),
(419,230,c),
(415,212,o),
(395,195,o),
(379,191,c),
(418,183,o),
(429,176,o),
(436,164,cs),
(446,146,o),
(445,88,o),
(444,69,c),
(424,68,o),
(411,72,o),
(401,77,c),
(391,62,o),
(378,52,o),
(370,48,c),
(381,38,o),
(398,33,o),
(415,32,cs),
(439,31,o)
);
}
);
width = 372;
width = 1117;
}
);
metricLeft = "=0";
metricRight = "=0";
}
Loading

0 comments on commit b23e92b

Please sign in to comment.