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

Method _read_name

src/pptx/text/fonts.py:351–360  ·  view source on GitHub ↗

Return a (platform_id, name_id, name) 3-tuple for name at `idx` in `bufr`. The triple looks like (0, 1, 'Arial'). `strings_offset` is the for the name at `idx` position in `bufr`. `strings_offset` is the index into `bufr` where actual name strings begin. The returned name is

(self, bufr, idx, strings_offset)

Source from the content-addressed store, hash-verified

349 return unpack_from(tmpl, bufr, offset)[0]
350
351 def _read_name(self, bufr, idx, strings_offset):
352 """Return a (platform_id, name_id, name) 3-tuple for name at `idx` in `bufr`.
353
354 The triple looks like (0, 1, 'Arial'). `strings_offset` is the for the name at
355 `idx` position in `bufr`. `strings_offset` is the index into `bufr` where actual
356 name strings begin. The returned name is a unicode string.
357 """
358 platform_id, enc_id, lang_id, name_id, length, str_offset = self._name_header(bufr, idx)
359 name = self._read_name_text(bufr, platform_id, enc_id, strings_offset, str_offset, length)
360 return platform_id, name_id, name
361
362 def _read_name_text(
363 self, bufr, platform_id, encoding_id, strings_offset, name_str_offset, length

Callers 2

_iter_namesMethod · 0.95

Calls 2

_name_headerMethod · 0.95
_read_name_textMethod · 0.95

Tested by 1