font file CMAP

fonttools

pip install fonttools
The character code points for a ttf/otf font are stored in the CMAP table.

You can use ttx to generate a XML representation of the `CMAP` table. see here.

You can run the command 
```bash
ttx.exe -t cmap MyFont.ttf

and it should output a file MyFont.ttx.
Open it in a text editor and it should show you all the character code it found in the font.

<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="x00x01x00x00" ttLibVersion="4.21">

  <cmap>
    <tableVersion version="0"/>
    <cmap_format_4 platformID="0" platEncID="3" language="0">
      <map code="0xd" name="uni000D"/><!-- ???? -->
      <map code="0x20" name="space"/><!-- SPACE -->
      <map code="0x21" name="exclam"/><!-- EXCLAMATION MARK -->
      <map code="0x22" name="quotedbl"/><!-- QUOTATION MARK -->
      <map code="0x23" name="numbersign"/><!-- NUMBER SIGN -->
      <map code="0x24" name="dollar"/><!-- DOLLAR SIGN -->
      <map code="0x25" name="percent"/><!-- PERCENT SIGN -->
      <map code="0x26" name="ampersand"/><!-- AMPERSAND -->
      <map code="0x27" name="quotesingle"/><!-- APOSTROPHE -->
      <map code="0x28" name="parenleft"/><!-- LEFT PARENTHESIS -->
      <map code="0x29" name="parenright"/><!-- RIGHT PARENTHESIS -->
      <map code="0x2a" name="asterisk"/><!-- ASTERISK -->
      <map code="0x2b" name="plus"/><!-- PLUS SIGN -->
      <map code="0x2c" name="comma"/><!-- COMMA -->
      <map code="0x2d" name="hyphen"/><!-- HYPHEN-MINUS -->
      <map code="0x2e" name="period"/><!-- FULL STOP -->
      <map code="0x2f" name="slash"/><!-- SOLIDUS -->
      <map code="0x30" name="zero"/><!-- DIGIT ZERO -->
      <map code="0x31" name="one"/><!-- DIGIT ONE -->
      <map code="0x32" name="two"/><!-- DIGIT TWO -->
      <map code="0x33" name="three"/><!-- DIGIT THREE -->
      <map code="0x34" name="four"/><!-- DIGIT FOUR -->
原文地址:https://www.cnblogs.com/Searchor/p/14529465.html