Quantcast
Channel: TypeDrawers
Viewing all articles
Browse latest Browse all 4153

Open-source OpenType serializer and builder, otfcc

$
0
0
My OpenType dumper and builder reaches its first public beta.

Currently only TrueType-outlined font files are supported, while Clerk Ma is working on the CFF parser/builder. It can build a 24MB Chinese font within 6 seconds, while ttx takes 4 minutes.

Project homepage: https://github.com/caryll/otfcc
Releases: https://github.com/caryll/otfcc/releases

 ------ README ------

otfcc is an high-performance open-source C library and utility used for parsing and building OpenType font files.

Key features

  • Read an OpenType font, (TrueType is supported as well)
  • And dump its data into JSON.
  • Or parse a dump of an OpenType font,
  • And build an OpenType font according to it.

Usage

otfccdump : Dump an OpenType font file into JSON

otfccdump [OPTIONS] input.[otf|ttf|ttc]

 -h, --help              : Display this help message and exit.
 -v, --version           : Display version information and exit.
 -o <file>               : Set output file path to <file>.
 -n <n>, --ttc-index <n> : Use the <n>th subfont within the input font.
 --pretty                : Prettify the output JSON.
 --ugly                  : Force uglify the output JSON.
 --time                  : Time each substep.
 --ignore-glyph-order    : Do not export glyph order information.
 --ignore-hints          : Do not export hingint information.
 --add-bom               : Add BOM mark in the output. (This is default
                           on Windows when redirecting to another program.
                           Use --no-bom to turn it off.)

otfccbuild : Build an OpenType font file from JSON

otfccbuild [OPTIONS] input.json -o output.[ttf|otf]

 -h, --help                : Display this help message and exit.
 -v, --version             : Display version information and exit.
 -o <file>                 : Set output file path to <file>.
 --time                    : Time each substep.
 --ignore-glyph-order      : Ignore the glyph order information in the input.
 --ignore-hints            : Ignore the hinting information in the input.
 --keep-average-char-width : Keep the OS/2.xAvgCharWidth value from the input
                             instead of stating the average width of glyphs.
                             Useful when creating a monospaced font.
 --short-post              : Don't export glyph names in the result font. It
                             will reduce file size.
 --dummy-DSIG              : Include an empty DSIG table in the font. For
                             some Microsoft applications, a DSIG is required
                             to enable OpenType features.

Currently supported tables

  • head
  • hhea
  • maxp
  • OS/2
  • post
  • glyf and loca
  • hmtx
  • vhea
  • vmtx
  • fpgm
  • prep
  • cvt
  • gasp
  • GSUB
  • GPOS
  • GDEF


Viewing all articles
Browse latest Browse all 4153

Trending Articles