5 # Parses a single repacking test file. The first line of the file is
6 # the name of the font to use and the remaining lines define the set of
7 # codepoints in the subset.
10 def __init__(self, test_path, definition):
11 self.test_path = test_path
13 self.codepoints = set ()
14 self._parse(definition)
17 return os.path.join (self._base_path (), "fonts", self.font_name)
19 def codepoints_string (self):
20 return ",".join (self.codepoints)
24 os.path.dirname(self.test_path),
28 def _parse(self, definition):
29 lines = definition.splitlines ()
30 self.font_name = lines.pop (0)
36 self.codepoints.add (line)