Lines Matching refs:lines

100 def parseScriptList(lines, featureMap=None):  argument
103 with lines.between('script table'):
104 for line in lines:
150 def parseFeatureList(lines, lookupMap=None, featureMap=None): argument
153 with lines.between('feature table'):
154 for line in lines:
179 def parseLookupFlags(lines): argument
190 while lines.peeks()[0].lower() in allFlags:
191 line = next(lines)
211 def parseSingleSubst(lines, font, _lookupMap=None): argument
213 for line in lines:
219 def parseMultiple(lines, font, _lookupMap=None): argument
221 for line in lines:
226 def parseAlternate(lines, font, _lookupMap=None): argument
228 for line in lines:
233 def parseLigature(lines, font, _lookupMap=None): argument
235 for line in lines:
241 def parseSinglePos(lines, font, _lookupMap=None): argument
243 for line in lines:
255 def parsePair(lines, font, _lookupMap=None): argument
258 typ = lines.peeks()[0].split()[0].lower()
262 for line in lines:
300 while lines.peeks()[0].endswith("class definition begin"):
301 typ = lines.peek()[0][:-len("class definition begin")].lower()
307 classDefs[idx] = parseClassDef(lines, font, klass=klass)
316 for line in lines:
343 def parseKernset(lines, font, _lookupMap=None): argument
344 typ = lines.peeks()[0].split()[0].lower()
346 with lines.until(("firstclass definition begin", "secondclass definition begin")):
347 return parsePair(lines, font)
348 return parsePair(lines, font)
360 def parseCursive(lines, font, _lookupMap=None): argument
362 for line in lines:
420 def parseMarkToSomething(lines, font, c): argument
431 for line in lines:
502 def parseMarkToBase(lines, font, _lookupMap=None): argument
503 return parseMarkToSomething(lines, font, MarkToBaseHelper())
504 def parseMarkToMark(lines, font, _lookupMap=None): argument
505 return parseMarkToSomething(lines, font, MarkToMarkHelper())
506 def parseMarkToLigature(lines, font, _lookupMap=None): argument
507 return parseMarkToSomething(lines, font, MarkToLigatureHelper())
650 def parseClassDef(lines, font, klass=ot.ClassDef): argument
652 with lines.between('class definition'):
653 for line in lines:
667 def parseCoverage(lines, font, klass=ot.Coverage): argument
669 with lines.between('coverage definition'):
670 for line in lines:
700 def parseContext(lines, font, Type, lookupMap=None): argument
702 typ = lines.peeks()[0].split()[0].lower()
708 for line in lines:
723 while lines.peeks()[0].endswith("class definition begin"):
724 typ = lines.peek()[0][:-len("class definition begin")].lower()
736 classDefs[idx] = parseClassDef(lines, font, klass=klass)
739 for line in lines:
754 while lines.peeks()[0].endswith("coverage definition begin"):
755 typ = lines.peek()[0][:-len("coverage definition begin")].lower()
766 coverages[idx].append(parseCoverage(lines, font, klass=klass))
768 lines = list(lines)
769 assert len(lines) == 1
770 line = lines[0]
779 def parseContextSubst(lines, font, lookupMap=None): argument
780 return parseContext(lines, font, "ContextSubst", lookupMap=lookupMap)
781 def parseContextPos(lines, font, lookupMap=None): argument
782 return parseContext(lines, font, "ContextPos", lookupMap=lookupMap)
783 def parseChainedSubst(lines, font, lookupMap=None): argument
784 return parseContext(lines, font, "ChainContextSubst", lookupMap=lookupMap)
785 def parseChainedPos(lines, font, lookupMap=None): argument
786 return parseContext(lines, font, "ChainContextPos", lookupMap=lookupMap)
788 def parseReverseChainedSubst(lines, font, _lookupMap=None): argument
792 while lines.peeks()[0].endswith("coverage definition begin"):
793 typ = lines.peek()[0][:-len("coverage definition begin")].lower()
798 coverages[idx].append(parseCoverage(lines, font, klass=klass))
804 for line in lines:
813 def parseLookup(lines, tableTag, font, lookupMap=None): argument
814 line = lines.expect('lookup')
818 lookup.LookupFlag,filterset = parseLookupFlags(lines)
844 with lines.until('lookup end'):
847 while lines.peek():
848 with lines.until(('% subtable', 'subtable end')):
849 while lines.peek():
850 subtable = parseLookupSubTable(lines, font, lookupMap)
853 if lines.peeks()[0] in ('% subtable', 'subtable end'):
854 next(lines)
855 lines.expect('lookup end')
865 def parseGSUBGPOS(lines, font, tableTag): argument
876 lambda lines: parseScriptList (lines, featureMap)),
879 lambda lines: parseFeatureList (lines, lookupMap, featureMap)),
886 while lines.peek() is not None:
887 typ = lines.peek()[0].lower()
889 log.debug('Skipping %s', lines.peek())
890 next(lines)
897 _, name, _ = lines.peek()
898 lookup = parseLookup(lines, tableTag, font, lookupMap)
907 setattr(self, attr, parser(lines))
917 def parseGSUB(lines, font): argument
918 return parseGSUBGPOS(lines, font, 'GSUB')
919 def parseGPOS(lines, font): argument
920 return parseGSUBGPOS(lines, font, 'GPOS')
922 def parseAttachList(lines, font): argument
924 with lines.between('attachment list'):
925 for line in lines:
931 def parseCaretList(lines, font): argument
933 with lines.between('carets'):
934 for line in lines:
952 def parseMarkFilteringSets(lines, font): argument
954 with lines.between('set definition'):
955 for line in lines:
965 def parseGDEF(lines, font): argument
972 lambda lines, font: parseClassDef(lines, font, klass=ot.GlyphClassDef)),
979 lambda lines, font: parseClassDef(lines, font, klass=ot.MarkAttachClassDef)),
985 while lines.peek() is not None:
986 typ = lines.peek()[0].lower()
989 next(lines)
993 setattr(self, attr, parser(lines, font))
998 def parseCmap(lines, font): argument
1002 while lines.peek() is not None:
1003 lines.expect('cmap subtable %d' % len(tables))
1005 parseCmapId(lines, field)
1012 line = next(lines)
1015 line = next(lines)
1021 def parseCmapId(lines, field): argument
1022 line = next(lines)
1026 def parseTable(lines, font, tableTag=None): argument
1028 line = lines.peeks()
1035 next(lines)
1049 }[tableTag](lines, font)
1055 lines = iter(f)
1060 self.lines = iter(lines)
1071 line = self.line = next(self.lines)
1151 lines = Tokenizer(f)
1152 return parseTable(lines, font, tableTag=tableTag)