otfed
1.0.0
otfed : OpenType Font Format 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 하위 테이블을 상담합니다.
$ 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 IPAEX Mincho의 모든 유니 코드 인식 cmap 하위 테이블을 인쇄합니다 (STDOUT의 큰 출력에주의하십시오) :
$ dune exec otfedcli input/ipaexm.ttf cmap
(omitted)IPAEX Mincho에서 ID 1000의 글리프를 SVG 파일로 출력합니다.
$ dune exec otfedcli input/ipaexm.ttf glyf 1000 output/ipaexm1000.svg
(omitted)컴퓨터에서 ID 50의 글리프를 SVG 파일로 최신 타자기 이탈리아에서 출력합니다.
$ dune exec otfedcli input/cmunit.otf cff 50 output/cmunit1000.svg
(omitted) .notdef , "Q"및 "F"만 포함 된 Junicode의 하위 집합을 출력합니다.
$ dune exec otfedcli input/Junicode.ttf subset 0,113,302 output/Junicode-subset.ttf | 테이블 | 인코딩 작업 | 디코딩 작업 | ||||
|---|---|---|---|---|---|---|
| 지원 | 테스트 | 지원 | 테스트 | |||
| 필수의 | CMAP | 형식 0 | - | - | - | - |
| 형식 2 | - | - | - | - | ||
| 형식 4 | - | - | 다섯 | 다섯 | ||
| 형식 6 | - | - | - | - | ||
| 형식 8 | - | - | - | - | ||
| 형식 10 | - | - | - | - | ||
| 형식 12 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| 형식 13 | - | - | 다섯 | 다섯 | ||
| 형식 14 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| 머리 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| HHEA | 다섯 | 다섯 | 다섯 | 다섯 | ||
| hmtx | 다섯 | 다섯 | 다섯 | 다섯 | ||
| 맥스 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| 이름 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| OS/2 | ver. 0 | 다섯 | 영형 | 다섯 | 영형 | |
| ver. 1 | 다섯 | 영형 | 다섯 | 영형 | ||
| ver. 2 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| ver. 3, 4, & 5 | 다섯 | 영형 | 다섯 | 영형 | ||
| 우편 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| TTF | CVT␣ | - | - | - | - | |
| FPGM | - | - | - | - | ||
| 글리프 | 다섯 | 다섯 | 다섯 | 다섯 | ||
| 로카 | 짧은 | 다섯 | 다섯 | 다섯 | 영형 | |
| 긴 | 다섯 | 영형 | 다섯 | 다섯 | ||
| 예습 | - | - | - | - | ||
| 가스프 | - | - | - | - | ||
| CFF | cff ␣ | 다섯 | 영형 | 다섯 | 다섯 | |
| CFF2 | - | - | - | - | ||
| vorg | - | - | - | - | ||
| SVG | svg␣ | - | - | - | - | |
| 선택 과목 | DSIG | - | - | - | - | |
| 장식 꼬리 | 형식 0 | - | - | 다섯 | 다섯 | |
| 다른 | - | - | - | - | ||
| vhea | ver. 1.0 | 다섯 | 다섯 | 다섯 | 다섯 | |
| ver. 1.1 | 다섯 | 엑스 | 다섯 | 엑스 | ||
| vmtx | 다섯 | 다섯 | 다섯 | 다섯 | ||
| 고급의 | 베이스 | - | - | - | - | |
| gdef | - | - | - | - | ||
| GPO | LookupType 1 | - | - | 다섯 | 영형 | |
| LookupType 2 | - | - | 다섯 | 영형 | ||
| LookupType 3 | - | - | 다섯 | 엑스 | ||
| LookupType 4 | - | - | 다섯 | 영형 | ||
| LookupType 5 | - | - | 다섯 | 영형 | ||
| LookupType 6 | - | - | 다섯 | 영형 | ||
| LookupType 7 | - | - | - | - | ||
| LookupType 8 | - | - | - | - | ||
| LookupType 9 | - | - | 다섯 | 영형 | ||
| GSUB | LookupType 1 | - | - | 다섯 | 영형 | |
| LookupType 2 | - | - | 다섯 | 영형 | ||
| LookupType 3 | - | - | - | - | ||
| LookupType 4 | - | - | 다섯 | 영형 | ||
| LookupType 5 | - | - | - | - | ||
| LookupType 6 | - | - | - | - | ||
| LookupType 7 | - | - | - | - | ||
| LookupType 8 | - | - | - | - | ||
| JSTF | - | - | - | - | ||
| 수학 | - | - | 다섯 | 다섯 | ||
Dune (≥2.7)이 설치되었다고 가정합니다.
$ dune build$ dune test 이 라이브러리는 otfm 재구성하는 강도로 개발되었습니다.
또한 참조 :
otfm 의 확장 버전일부 단위 테스트는 다음 글꼴에서 추출한 데이터를 사용합니다.
ipaexm.ttflmroman10-regular.otf 및 lmmono10-regular.otfDejaVuSans-ExtraLight.ttf