Recreate font name that contains PDF hex codes. E.g. #20 -> space, chr(32)
(name)
| 5324 | """ |
| 5325 | |
| 5326 | def norm_name(name): |
| 5327 | """Recreate font name that contains PDF hex codes. |
| 5328 | |
| 5329 | E.g. #20 -> space, chr(32) |
| 5330 | """ |
| 5331 | while "#" in name: |
| 5332 | p = name.find("#") |
| 5333 | c = int(name[p + 1 : p + 3], 16) |
| 5334 | name = name.replace(name[p : p + 3], chr(c)) |
| 5335 | return name |
| 5336 | |
| 5337 | def get_fontnames(doc, item): |
| 5338 | """Return a list of fontnames for an item of page.get_fonts(). |
no test coverage detected
searching dependent graphs…