otfed
1.0.0
otfed : Opentype FONT FORTIF ENCODER & DECODER otfedcli ภายใต้เงื่อนไขที่ opam (ผู้จัดการแพ็คเกจสำหรับ OCAML, COQ ฯลฯ ) ได้รับการติดตั้งเรียกใช้คำสั่งต่อไปนี้:
$ cd < your-workspace >
$ git clone https://github.com/gfngfn/otfed
$ cd otfed
$ opam pin add otfed . อาจเป็นคำสั่งสุดท้ายด้านบนจะถามคุณว่าจะติดตั้ง otfed หรือไม่ จากนั้นตอบ y .
ถ้าไม่เรียกใช้คำสั่งต่อไปนี้จะทำ:
$ opam install otfed otfedcli $ dune exec otfedcli < path/to/font-file > < command > ... < command >
<command> ::=
| tables # Prints all the tags of tables contained in the font.
| cmap # Prints all the Unicode-aware `cmap` subtables.
| cmap_word "<arbitrary-utf8-text>" # Consults `cmap` subtables for each character in the given text.
| head # Prints the contents of `head` table.
| hhea # Prints the contents of `hhea` table.
| vhea # Prints the contents of `vhea` table.
| maxp # Prints the contents of `maxp` table.
| hmtx <glyph-id> # Consults the `hmtx` table by the glyph of ID <glyph-id>.
| vmtx <glyph-id> # Consults the `vmtx` table by the glyph of ID <glyph-id>.
| glyf <glyph-id> <output-svg-file> # Outputs the glyph of ID <glyph-id> that has TrueType outlines.
| cff <glyph-id> <output-svg-file> # Outputs the glyph of ID <glyph-id> that has CFF outlines.
| cff_lex <glyph-id> # Prints the tokenized CharString of the glyph of ID <glyph-id>.
| cff_top # Prints the Top DICT in the `CFF␣` table.
| charset <glyph-id> # Prints the name of the glyph by consulting the charset in `CFF␣`.
| gsub <script> <langsys> <feature> # Prints the contents of `GSUB` subtables.
| gpos <script> <langsys> <feature> # Prints the contents of `GPOS` subtables.
| subset <glyph-ids> <output-ttf> # Makes a subset font by using given glyph IDs.
<glyph-ids> ::= (comma-separated glyph IDs where no space is allowed around commas) ปรึกษา cmap ย่อยโดยคะแนนรหัส Unicode:
$ dune exec otfedcli input/ipaexm.ttf cmap_word "田中太郎"
* subtable (platform: 0, encoding: 3)
- U+7530 --> 2900
- U+4E2D --> 2746
- U+592A --> 2614
- U+90CE --> 3830
* subtable (platform: 3, encoding: 1)
- U+7530 --> 2900
- U+4E2D --> 2746
- U+592A --> 2614
- U+90CE --> 3830
* subtable (platform: 3, encoding: 10)
- U+7530 --> 2900
- U+4E2D --> 2746
- U+592A --> 2614
- U+90CE --> 3830 พิมพ์ Subtables cmap ที่รับรู้ของ Unicode ทั้งหมดใน IPAEX Mincho (โปรดระวังเอาต์พุตขนาดใหญ่บน stdout):
$ dune exec otfedcli input/ipaexm.ttf cmap
(omitted)เอาต์พุต Glyph ของ ID 1000 ใน IPAEX Mincho เป็นไฟล์ SVG:
$ dune exec otfedcli input/ipaexm.ttf glyf 1000 output/ipaexm1000.svg
(omitted)เอาต์พุต Glyph ของ ID 50 ในเครื่องพิมพ์ดีดที่ทันสมัยคอมพิวเตอร์เป็นไฟล์ SVG:
$ dune exec otfedcli input/cmunit.otf cff 50 output/cmunit1000.svg
(omitted) ส่งออกชุดย่อยของ Junicode ซึ่งมี .notdef ,“ Q” และ“ F” เท่านั้น:
$ dune exec otfedcli input/Junicode.ttf subset 0,113,302 output/Junicode-subset.ttf | โต๊ะ | การเข้ารหัส | การถอดรหัส | ||||
|---|---|---|---|---|---|---|
| ที่ได้รับการสนับสนุน | ผ่านการทดสอบแล้ว | ที่ได้รับการสนับสนุน | ผ่านการทดสอบแล้ว | |||
| ที่จำเป็น | CMAP | รูปแบบ 0 | - | - | - | - |
| รูปแบบ 2 | - | - | - | - | ||
| รูปแบบ 4 | - | - | V | V | ||
| รูปแบบ 6 | - | - | - | - | ||
| รูปแบบ 8 | - | - | - | - | ||
| รูปแบบ 10 | - | - | - | - | ||
| รูปแบบ 12 | V | V | V | V | ||
| รูปแบบ 13 | - | - | V | V | ||
| รูปแบบ 14 | V | V | V | V | ||
| ศีรษะ | V | V | V | V | ||
| Hhea | V | V | V | V | ||
| HMTX | V | V | V | V | ||
| สูงสุด | V | V | V | V | ||
| ชื่อ | V | V | V | V | ||
| OS/2 | ก.พ. 0 | V | โอ | V | โอ | |
| ก.พ. 1 | V | โอ | V | โอ | ||
| ก.พ. 2 | V | V | V | V | ||
| ก.พ. 3, 4, & 5 | V | โอ | V | โอ | ||
| โพสต์ | V | V | V | V | ||
| TTF | cvt␣ | - | - | - | - | |
| FPGM | - | - | - | - | ||
| Glyf | V | V | V | V | ||
| สถานที่ | สั้น | V | V | V | โอ | |
| ยาว | V | โอ | V | V | ||
| รับเชิญ | - | - | - | - | ||
| อ้าปากค้าง | - | - | - | - | ||
| CFF | CFF␣ | V | โอ | V | V | |
| CFF2 | - | - | - | - | ||
| Vorg | - | - | - | - | ||
| SVG | svg␣ | - | - | - | - | |
| ไม่จำเป็น | DSIG | - | - | - | - | |
| เคอร์น | รูปแบบ 0 | - | - | V | V | |
| อื่น | - | - | - | - | ||
| Vhea | ก.พ. 1.0 | V | V | V | V | |
| ก.พ. 1.1 | V | x | V | x | ||
| VMTX | V | V | V | V | ||
| ขั้นสูง | ฐาน | - | - | - | - | |
| GDEF | - | - | - | - | ||
| เกรดเฉลี่ย | Lookuptype 1 | - | - | V | โอ | |
| Lookuptype 2 | - | - | V | โอ | ||
| Lookuptype 3 | - | - | V | x | ||
| Lookuptype 4 | - | - | V | โอ | ||
| Lookuptype 5 | - | - | V | โอ | ||
| Lookuptype 6 | - | - | V | โอ | ||
| Lookuptype 7 | - | - | - | - | ||
| Lookuptype 8 | - | - | - | - | ||
| Lookuptype 9 | - | - | V | โอ | ||
| GSUB | Lookuptype 1 | - | - | V | โอ | |
| Lookuptype 2 | - | - | V | โอ | ||
| Lookuptype 3 | - | - | - | - | ||
| Lookuptype 4 | - | - | V | โอ | ||
| Lookuptype 5 | - | - | - | - | ||
| Lookuptype 6 | - | - | - | - | ||
| Lookuptype 7 | - | - | - | - | ||
| Lookuptype 8 | - | - | - | - | ||
| jstf | - | - | - | - | ||
| คณิตศาสตร์ | - | - | V | V | ||
สมมติว่ามีการติดตั้ง Dune (≥2.7)
$ dune build$ dune test ห้องสมุดนี้ได้รับการพัฒนาด้วยความตั้งใจของการปฏิรูป otfm
ดูเพิ่มเติม:
otfm รุ่นเพิ่มเติมสำหรับ satysfiการทดสอบหน่วยบางหน่วยใช้ข้อมูลที่สกัดจากแบบอักษรต่อไปนี้:
ipaexm.ttflmroman10-regular.otf และ lmmono10-regular.otfDejaVuSans-ExtraLight.ttf