Add a mapping to this instance. Parameters ---------- charcode : CharacterCodeType The character code to record. glyph : GlyphIndexType The corresponding glyph index to record. subset : int The subset in which the
(self, charcode: str, glyph_index: GlyphIndexType, subset: int,
subset_charcode: CharacterCodeType)
| 141 | return self._inverse[(subset, subset_charcode)] |
| 142 | |
| 143 | def add(self, charcode: str, glyph_index: GlyphIndexType, subset: int, |
| 144 | subset_charcode: CharacterCodeType) -> None: |
| 145 | """ |
| 146 | Add a mapping to this instance. |
| 147 | |
| 148 | Parameters |
| 149 | ---------- |
| 150 | charcode : CharacterCodeType |
| 151 | The character code to record. |
| 152 | glyph : GlyphIndexType |
| 153 | The corresponding glyph index to record. |
| 154 | subset : int |
| 155 | The subset in which the subset character code resides. |
| 156 | subset_charcode : CharacterCodeType |
| 157 | The subset character code within the above subset. |
| 158 | """ |
| 159 | self._forward[(charcode, glyph_index)] = (subset, subset_charcode) |
| 160 | self._inverse[(subset, subset_charcode)] = (charcode, glyph_index) |
| 161 | |
| 162 | |
| 163 | class CharacterTracker: |
no outgoing calls