• Home
  • Raw
  • Download

Lines Matching +full:v8 +full:- +full:coverage

1 # coding: utf-8
2 """fontTools.ttLib.tables.otTables -- A collection of classes representing the various
42 self.GlyphClasses = {} # GlyphID --> GlyphClass
49 self.Transitions = {} # GlyphClass --> AATAction
276 # As of 2017-09-12, the 'morx' specification says that
301 # terminated with an end-of-sequence flag, which can
305 for a in sorted(actions, key=lambda x: (-len(x), x)):
318 last = i == len(self.Actions) - 1
336 if delta >= 0x20000000: # sign-extend 30-bit value
337 delta = -0x40000000 + delta
494 for action in sorted(actions, key=lambda x: (-len(x), x)):
495 # We insert all sub-sequences of the action glyph sequence
540 class Coverage(FormatSwitchingBaseTable): class
553 # Some SIL fonts have coverage entries that don't have sorted
558 log.warning("GSUB/GPOS Coverage is not sorted by glyph ids.")
569 log.warning("Unknown Coverage format: %s", self.Format)
587 ranges[-1].append(last)
590 ranges[-1].append(last)
603 index = index + end - start + 1
605 log.warning("GSUB/GPOS Coverage is not sorted by glyph ids.")
629 # The special 0xFFFFFFFF delta-set index is used to indicate that there
657 ored = (ored >> (16 - innerBits)) | (ored & ((1 << innerBits) - 1))
667 return ((entrySize - 1) << 4) | (innerBits - 1)
680 # Make xml dump less verbose, by omitting no-op entries like:
716 mapList.extend([mapList[-1]] * (len(glyphOrder) - len(mapList)))
726 while len(mapping) > 1 and mapping[-2] == mapping[-1]:
727 del mapping[-1]
751 …thub.com/fonttools/fonttools/commit/21cbab8ce9ded3356fef3745122da64dcaf314e9#commitcomment-27649836
762 # be equal to the fvar.axisCount, and OTS < v8.0.0 enforces this rule
784 input = _getGlyphsFromCoverageTable(rawTable["Coverage"])
818 delta = (outID - inID) % 65536
831 cov = Coverage()
835 rawTable["Coverage"] = cov
865 glyphs = _getGlyphsFromCoverageTable(rawTable["Coverage"])
877 cov = Coverage()
881 "Coverage": cov,
900 if name == "Coverage":
985 ranges[-1].extend([last, lastName])
990 ranges[-1].extend([last, lastName])
999 endGlyph = ranges[-1][3]
1000 glyphCount = endGlyph - startGlyph + 1
1017 for g in range(start - startGlyph, end - startGlyph + 1):
1046 input = _getGlyphsFromCoverageTable(rawTable["Coverage"])
1066 cov = Coverage()
1069 setList = [item[-1] for item in items]
1074 # a special case to deal with the fact that several hundred Adobe Japan1-5
1075 # CJK fonts will overflow an offset if the coverage table isn't pushed to the end.
1076 # Also useful in that when splitting a sub-table because of an offset overflow
1077 …t need to calculate the change in the subtable offset due to the change in the coverage table size.
1080 return {"Coverage": cov, "AlternateSet": alternates}
1116 input = _getGlyphsFromCoverageTable(rawTable["Coverage"])
1128 # Computes a key for ordering ligatures in a GSUB Type-4 lookup.
1149 # This is also what fea-rs does, see:
1150 # https://github.com/adobe-type-tools/afdko/issues/1727
1153 return -len(components)
1162 # New high-level API in v3.1 and later. Note that we just support compiling this
1165 # ligatures is map from components-sequence to lig-glyph
1180 cov = Coverage()
1184 setList = [item[-1] for item in items]
1191 # Useful in that when splitting a sub-table because of an offset overflow
1192 # I don't need to calculate the change in subtabl offset due to the coverage table size.
1195 return {"Coverage": cov, "LigatureSet": ligSets}
1250 # thus here we pre-initialize a CountReference; the actual count value
1404 "following glyph ID range: [%i-%i]",
1411 "ClipRecord[%i] range references missing " "glyph IDs: [%i-%i]",
1445 ranges[-1].append(last)
1448 ranges[-1].append(last)
1525 # Porter-Duff modes for COLRv1 PaintComposite:
1526 # https://github.com/googlefonts/colr-gradients-spec/tree/off_sub_1#compositemode-enumeration
1625 def iterPaintSubTables(self, colr: COLR) -> Iterator[BaseTable.SubTableEntry]:
1652 def getChildren(self, colr) -> List["Paint"]:
1657 """Depth-first traversal of graph rooted at self, callback on each node."""
1664 paint = path[-1].value
1667 def getTransform(self) -> Transform:
1679 .translate(-self.centerX, -self.centerY)
1687 .translate(-self.centerX, -self.centerY)
1695 .translate(-self.centerX, -self.centerY)
1698 return Identity.skew(radians(-self.xSkewAngle), radians(self.ySkewAngle))
1702 .skew(radians(-self.xSkewAngle), radians(self.ySkewAngle))
1703 .translate(-self.centerX, -self.centerY)
1712 ) -> Optional[ClipBox]:
1717 paint = path[-1].value
1744 "Coverage": (
1853 lookupIndex = lookupIndex - 1
1865 lookupIndex = lookupIndex - 1
1890 if overflowRecord.itemName in ["Coverage", "RangeRecord"]:
1891 # Coverage table is written last. Overflow is to or within the
1892 # the coverage table. We will just cut the subtable in half.
1897 # Sequence index to make sure the offset to the Coverage table
1899 newLen = overflowRecord.itemIndex - 1
1919 if overflowRecord.itemName in ["Coverage", "RangeRecord"]:
1920 # Coverage table is written last. overflow is to or within the
1921 # the coverage table. We will just cut the subtable in half.
1927 # to the Coverage table doesn't overflow.
1928 newLen = overflowRecord.itemIndex - 1
1945 if overflowRecord.itemName in ["Coverage", "RangeRecord"]:
1946 # Coverage table is written last. overflow is to or within the
1947 # the coverage table. We will just cut the subtable in half.
1953 # to the Coverage table doesn't overflow.
1954 newLen = overflowRecord.itemIndex - 1
1974 # Move top half of coverage to new subtable
1976 newSubTable.Coverage = oldSubTable.Coverage.__class__()
1978 coverage = oldSubTable.Coverage.glyphs
1983 oldSubTable.Coverage.glyphs = coverage[:oldCount]
1986 newSubTable.Coverage.glyphs = coverage[oldCount:]
2007 newSubTable.Coverage = oldSubTable.Coverage.__class__()
2010 coverage = oldSubTable.Coverage.glyphs
2017 oldSubTable.Coverage.glyphs = [g for g in coverage if g not in newGlyphs]
2023 newSubTable.Coverage.glyphs = [g for g in coverage if g in newGlyphs]
2025 k: (v - oldCount) for k, v in classDefs.items() if v > oldCount
2045 newClassCount = classCount - oldClassCount
2056 markRecord.Class -= oldClassCount
2124 An offset has overflowed within a sub-table. We need to divide this subtable into smaller parts.
2185 formatPat = re.compile(r"([A-Za-z0-9]+)Format(\d+)$")
2195 # the first row of a format-switching otData table describes the Format;
2207 # link Var{Table} <-> {Table} (e.g. ColorStop <-> VarColorStop, etc.)
2295 def _getGlyphsFromCoverageTable(coverage): argument
2296 if coverage is None:
2297 # empty coverage table
2300 return coverage.glyphs