otfed : OpenType Font Format Coder & Decoder otfedcli En la condición de que opam (un administrador de paquetes para OCAML, CoQ, etc.) esté instalado, invoca los siguientes comandos:
$ cd < your-workspace >
$ git clone https://github.com/gfngfn/otfed
$ cd otfed
$ opam pin add otfed . Probablemente el último comando anterior le preguntará si instalar otfed . Luego responde y .
Si no, invocar el siguiente comando funcionará:
$ 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) Consulta subtables cmap por puntos de código 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 Imprime todos los subtables cmap de Unicode-ADAUA en IPAEX Mincho (tenga cuidado con las grandes salidas en Stdout):
$ dune exec otfedcli input/ipaexm.ttf cmap
(omitted)Emite el glifo de ID 1000 en IPAEX Mincho como un archivo SVG:
$ dune exec otfedcli input/ipaexm.ttf glyf 1000 output/ipaexm1000.svg
(omitted)Emite el glifo de ID 50 en la computadora moderna Typewriter Italic como un archivo SVG:
$ dune exec otfedcli input/cmunit.otf cff 50 output/cmunit1000.svg
(omitted) Emite el subconjunto de Junicode que contiene .notdef , "Q" y "F" solamente:
$ dune exec otfedcli input/Junicode.ttf subset 0,113,302 output/Junicode-subset.ttf | Mesas | Operaciones de codificación | Operaciones de decodificación | ||||
|---|---|---|---|---|---|---|
| Compatible | Probado | Compatible | Probado | |||
| Requerido | CMAP | Formato 0 | - | - | - | - |
| Formato 2 | - | - | - | - | ||
| Formato 4 | - | - | V | V | ||
| Formato 6 | - | - | - | - | ||
| Formato 8 | - | - | - | - | ||
| Formato 10 | - | - | - | - | ||
| Formato 12 | V | V | V | V | ||
| Formato 13 | - | - | V | V | ||
| Formato 14 | V | V | V | V | ||
| cabeza | V | V | V | V | ||
| HHEA | V | V | V | V | ||
| hmtx | V | V | V | V | ||
| maxp | V | V | V | V | ||
| nombre | V | V | V | V | ||
| OS/2 | vertis 0 | V | O | V | O | |
| vertis 1 | V | O | V | O | ||
| vertis 2 | V | V | V | V | ||
| vertis 3, 4 y 5 | V | O | V | O | ||
| correo | V | V | V | V | ||
| TTF | cvt␣ | - | - | - | - | |
| FPGM | - | - | - | - | ||
| glyf | V | V | V | V | ||
| loca | corto | V | V | V | O | |
| largo | V | O | V | V | ||
| deberes | - | - | - | - | ||
| jadear | - | - | - | - | ||
| CFF | CFF␣ | V | O | V | V | |
| CFF2 | - | - | - | - | ||
| Vorg | - | - | - | - | ||
| SVG | Svg␣ | - | - | - | - | |
| Opcional | Dsig | - | - | - | - | |
| núcleo | Formato 0 | - | - | V | V | |
| otro | - | - | - | - | ||
| vhea | vertis 1.0 | V | V | V | V | |
| vertis 1.1 | V | incógnita | V | incógnita | ||
| VMTX | V | V | V | V | ||
| Avanzado | BASE | - | - | - | - | |
| Gdef | - | - | - | - | ||
| GPOS | LookUptype 1 | - | - | V | O | |
| LookUptype 2 | - | - | V | O | ||
| LookUptype 3 | - | - | V | incógnita | ||
| LookUptype 4 | - | - | V | O | ||
| LookUptype 5 | - | - | V | O | ||
| LookUptype 6 | - | - | V | O | ||
| Lookuptype 7 | - | - | - | - | ||
| LookUptype 8 | - | - | - | - | ||
| LookUptype 9 | - | - | V | O | ||
| Gsub | LookUptype 1 | - | - | V | O | |
| LookUptype 2 | - | - | V | O | ||
| LookUptype 3 | - | - | - | - | ||
| LookUptype 4 | - | - | V | O | ||
| LookUptype 5 | - | - | - | - | ||
| LookUptype 6 | - | - | - | - | ||
| Lookuptype 7 | - | - | - | - | ||
| LookUptype 8 | - | - | - | - | ||
| Jstf | - | - | - | - | ||
| MATEMÁTICAS | - | - | V | V | ||
Se supone que se instala la duna (≥2.7).
$ dune build$ dune test Esta biblioteca se ha desarrollado con la intensión de reformular otfm .
Ver también:
otfm para SatysfiAlgunas pruebas unitarias usan datos extraídos de las siguientes fuentes:
ipaexm.ttflmroman10-regular.otf y lmmono10-regular.otfDejaVuSans-ExtraLight.ttf