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 -->
    
  • 相关阅读:
    登录Mysql看不到Mysql库
    七牛云使用记录
    FFmpeg工具
    解决VMware下CentOS连不上网络问题
    14.中介者模式
    二十三种设计模式(三)
    23种设计模式(二)
    搭建ssm环境
    文件的字符流与字节流读写
    设计模式之用工厂模式实现计算器
  • 原文地址:https://www.cnblogs.com/Searchor/p/14529465.html
Copyright © 2011-2022 走看看