Open-source OpenType serializer and builder, otfcc

Belleve Invis
Posts: 269
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
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
andloca
hmtx
vhea
vmtx
fpgm
prep
cvt
gasp
GSUB
GPOS
GDEF
1
Comments
-
Is the advantage of this over TTX that JSON might be easier to parse?0
-
James Puckett said:Is the advantage of this over TTX that JSON might be easier to parse?0
-
James Puckett said:Is the advantage of this over TTX that JSON might be easier to parse?
otfccdump from.ttf | whatever-program-manipulates-json | otfccbuild to.ttf
to manipulate fonts.1 -
Current table support set:
head
hhea
maxp
OS/2
post
glyf
andloca
hmtx
vhea
vmtx
fpgm
prep
cvt
gasp
GSUB
GPOS
GDEF
CFF
BASE
0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 815 Font Technology
- 1.1K Technique and Theory
- 630 Type Business
- 450 Type Design Critiques
- 548 Type Design Software
- 30 Punchcutting
- 138 Lettering and Calligraphy
- 85 Technique and Theory
- 53 Lettering Critiques
- 497 Typography
- 307 History of Typography
- 116 Education
- 74 Resources
- 511 Announcements
- 82 Events
- 107 Job Postings
- 154 Type Releases
- 167 Miscellaneous News
- 271 About TypeDrawers
- 53 TypeDrawers Announcements
- 117 Suggestions and Bug Reports