Return the unicode name decoded from *raw_name* using the encoding implied by the combination of *platform_id* and *encoding_id*.
(raw_name, platform_id, encoding_id)
| 300 | |
| 301 | @staticmethod |
| 302 | def _decode_name(raw_name, platform_id, encoding_id): |
| 303 | """ |
| 304 | Return the unicode name decoded from *raw_name* using the encoding |
| 305 | implied by the combination of *platform_id* and *encoding_id*. |
| 306 | """ |
| 307 | if platform_id == 1: |
| 308 | # reject non-Roman Mac font names |
| 309 | if encoding_id != 0: |
| 310 | return None |
| 311 | return raw_name.decode("mac-roman") |
| 312 | elif platform_id in (0, 3): |
| 313 | return raw_name.decode("utf-16-be") |
| 314 | else: |
| 315 | return None |
| 316 | |
| 317 | def _iter_names(self): |
| 318 | """Generate a key/value pair for each name in this table. |
no outgoing calls