zoukankan      html  css  js  c++  java
  • 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 -->
    
  • 相关阅读:
    JSON的基本认识
    Linux基础 7-10 Bash编程练习4--for循环
    Linux基础7-9 Bash编程--for循环语句
    linux基础 7-3-条件判断语句案例
    Linux基础 7-8 sed命令使用练习
    Linux基础 7-7 set命令的使用
    Linux基础 7-6 Bash脚本编程练习3
    Linux基础7-5 Bash脚本编程--算术运算
    Linux基础7-4 Bash脚本编程练习2
    Linux基础 7-3 Bash脚本编程--条件判断
  • 原文地址:https://www.cnblogs.com/Searchor/p/14529465.html
Copyright © 2011-2022 走看看