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
headhheamaxpOS/2postglyfandlocahmtxvheavmtxfpgmprepcvtgaspGSUBGPOSGDEF
1          
            Comments
- 
            Is the advantage of this over TTX that JSON might be easier to parse?0
 - 
            
OP is writing a JS app and needed some C parser to have something that runs fast enough, from what I got.James Puckett said:Is the advantage of this over TTX that JSON might be easier to parse?0 - 
            
Hmmm, yes, JSON is much simpler than XML, and integrating with other programs will be much easier. You can even use command line like thisJames 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:
headhheamaxpOS/2postglyfandlocahmtxvheavmtxfpgmprepcvt gaspGSUBGPOSGDEFCFF BASE
0 
Categories
- All Categories
 - 46 Introductions
 - 3.9K Typeface Design
 - 485 Type Design Critiques
 - 561 Type Design Software
 - 1.1K Type Design Technique & Theory
 - 654 Type Business
 - 853 Font Technology
 - 29 Punchcutting
 - 519 Typography
 - 119 Type Education
 - 323 Type History
 - 77 Type Resources
 - 112 Lettering and Calligraphy
 - 33 Lettering Critiques
 - 79 Lettering Technique & Theory
 - 550 Announcements
 - 91 Events
 - 114 Job Postings
 - 170 Type Releases
 - 174 Miscellaneous News
 - 276 About TypeDrawers
 - 54 TypeDrawers Announcements
 - 120 Suggestions and Bug Reports
 

