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 -->
    
  • 相关阅读:
    python threading模块中对于信号的抓取
    docker挂载NVIDIA显卡运行pytorch
    更换HomeBrew源
    IX-Protected Dataplane Operating System解读
    NFV、DPDK以及部分用户态协议研究
    (一)最小的Django
    (二)无状态的web应用(单py的Django占位图片服务器)
    Windows7 64位环境下Python-igraph环境配置
    关于docker使用的几个小问题(二)
    关于docker使用的几个小问题(一)
  • 原文地址:https://www.cnblogs.com/Searchor/p/14529465.html
Copyright © 2011-2022 走看看