MCPcopy Create free account
hub / github.com/scanny/python-pptx / _TableFactory

Function _TableFactory

src/pptx/text/fonts.py:393–399  ·  view source on GitHub ↗

Return an instance of |Table| appropriate to *tag*, loaded from *font_file* with content of *length* starting at *offset*.

(tag, stream, offset, length)

Source from the content-addressed store, hash-verified

391
392
393def _TableFactory(tag, stream, offset, length):
394 """
395 Return an instance of |Table| appropriate to *tag*, loaded from
396 *font_file* with content of *length* starting at *offset*.
397 """
398 TableClass = {"head": _HeadTable, "name": _NameTable}.get(tag, _BaseTable)
399 return TableClass(tag, stream, offset, length)

Callers 2

_tablesMethod · 0.85

Calls 1

getMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…