All Projects → caryll → Otfcc

caryll / Otfcc

Licence: apache-2.0
Optimized OpenType builder and inspector.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Otfcc

typeface-minecraft
Minecraft typeface and colors
Stars: ✭ 20 (-94.25%)
Mutual labels:  font, typeface, typography
Plusjakartasans
+Jakarta Sans is a open-source fonts. Designed for Jakarta "City of collaboration" program in 2020.
Stars: ✭ 136 (-60.92%)
Mutual labels:  font, typography, typeface
Qiji Font
齊伋體 - typeface from Ming Dynasty woodblock printed books
Stars: ✭ 536 (+54.02%)
Mutual labels:  font, typography, typeface
Typefaces
NPM packages for Open Source typefaces
Stars: ✭ 2,581 (+641.67%)
Mutual labels:  font, typography, typeface
Google Type
Collaborative typography project using select passages from Aesop's Fables set to Google Fonts
Stars: ✭ 971 (+179.02%)
Mutual labels:  font, typography, typeface
Urbanist
Urbanist is a low-contrast, geometric sans-serif inspired by Modernist design and typography.
Stars: ✭ 374 (+7.47%)
Mutual labels:  font, typeface, typography
amiri
Amiri (أميري) is a body text Naskh typeface
Stars: ✭ 291 (-16.38%)
Mutual labels:  font, typeface
chiron-sans-hk
昭源黑體:現代筆形風格,平衡標準字形和印刷體慣用筆形的免費開源黑體字型
Stars: ✭ 131 (-62.36%)
Mutual labels:  font, typeface
font
Font toolbox
Stars: ✭ 14 (-95.98%)
Mutual labels:  typeface, typography
font-v
Font version string reporting and modification library + executable tool
Stars: ✭ 15 (-95.69%)
Mutual labels:  font, typeface
Fonts
A curation of fonts from all over the world.
Stars: ✭ 144 (-58.62%)
Mutual labels:  font, typeface
Epilogue
2 axes/Variable/18 styles/Sans
Stars: ✭ 104 (-70.11%)
Mutual labels:  font, typography
baseline
New method for creating leading on the web
Stars: ✭ 31 (-91.09%)
Mutual labels:  font, typography
ttf2hershey
Convert True Type Fonts (.ttf) to Hershey vector fonts
Stars: ✭ 29 (-91.67%)
Mutual labels:  font, typography
plex
The package of IBM’s typeface, IBM Plex.
Stars: ✭ 7,977 (+2192.24%)
Mutual labels:  font, typeface
Bellota-Font
An ornamented Sans Serif font family
Stars: ✭ 21 (-93.97%)
Mutual labels:  font, typography
Commissioner
Commissioner is a variable and static sans typeface.
Stars: ✭ 147 (-57.76%)
Mutual labels:  font, typography
Kepler-452b
Futuristic / minimal font family.
Stars: ✭ 13 (-96.26%)
Mutual labels:  font, typeface
hkcs
香港民間字集 Hong Kong Character Set Project (HKCS)
Stars: ✭ 29 (-91.67%)
Mutual labels:  font, typeface
Agave
sappy monospaced programming font
Stars: ✭ 235 (-32.47%)
Mutual labels:  font, typeface

otfcc

Version

The otfcc is a C library and utility used for parsing and writing OpenType font files.

Key features

  • JSON serialization of TrueType and CFF OpenType fonts.
  • Building OpenType fonts from JSON.
  • Full support for OpenType features (GSUB, GPOS and GDEF), CID-keyed CFF, vertical metrics, and more.
  • 4× faster than ttx on CFF OTF, and 40× on TTF.
  • 900× faster than makeotf for building a fully-optimized CFF OTF.

Installation

Windows

You can download the prebuilt binaries here.

Mac

If you have Homebrew, just run the following in your terminal.

brew tap caryll/tap
brew install otfcc-mac64

Otherwise, you may need to click the “Releases” above, and download the archives in it.

Arch Linux

The package otfcc can be found here.

Build from Source

See below.

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>. When absent the dump
                           will be written to STDOUT.
 -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.
 --verbose               : Show more information when building.
 --ignore-glyph-order    : Do not export glyph order information.
 --glyph-name-prefix pfx : Add a prefix to the glyph names.
 --ignore-hints          : Do not export hinting information.
 --decimal-cmap          : Export 'cmap' keys as decimal number.
 --name-by-hash          : Name glyphs using its hash value.
 --add-bom               : Add BOM mark in the output. (It is default on Windows
                           when redirecting to another program. Use --no-bom to
                           turn it off.)

otfccbuild : Build an OpenType font file from JSON

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

 input.json                : Path to input file. When absent the input will be
                             read from the STDIN.

 -h, --help                : Display this help message and exit.
 -v, --version             : Display version information and exit.
 -o <file>                 : Set output file path to <file>.
 -s, --dummy-dsig          : Include an empty DSIG table in the font. For some
                             Microsoft applications, DSIG is required to enable
                             OpenType features.
 -O<n>                     : Specify the level for optimization.
     -O0                     Turn off any optimization.
     -O1                     Default optimization.
     -O2                     More aggressive optimizations for web font. In this
                             level, the following options will be set:
                               --merge-features
                               --short-post
                               --subroutinize
     -O3                     The most aggressive opptimization strategy will be
                             used. In this level, these options will be set:
                               --force-cid
                               --ignore-glyph-order
 --verbose                 : Show more information when building.

 --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.
 --keep-unicode-ranges     : Keep the OS/2.ulUnicodeRange[1-4] as-is.
 --keep-modified-time      : Keep the head.modified time in the json, instead of
                             using current time.

 --short-post              : Don't export glyph names in the result font.
 --ignore-glyph-order, -i  : Ignore the glyph order information in the input.
 --keep-glyph-order, -k    : Keep the glyph order information in the input.
                             Use to preserve glyph order under -O2 and -O3.
 --dont-ignore-glyph-order : Same as --keep-glyph-order.
 --merge-features          : Merge duplicate OpenType feature definitions.
 --dont-merge-features     : Keep duplicate OpenType feature definitions.
 --merge-lookups           : Merge duplicate OpenType lookups.
 --dont-merge-lookups      : Keep duplicate OpenType lookups.
 --force-cid               : Convert name-keyed CFF OTF into CID-keyed.
 --subroutinize            : Subroutinize CFF table.
 --stub-cmap4              : Create a stub `cmap` format 4 subtable if format
                             12 subtable is present.

Building

otfcc can be built on a number of platforms. It uses the premake build system.

It was developed and optimized for Clang/LLVM, therefore it is strongly recommended to compile with Clang/LLVM, but if that's not possible GCC is also supported, GCC version 5.1 or later being the preferred choice for performance.

Linux (or other Unix-like)

On Linux, Either Clang/LLVM or GCC can be used to build otfcc.

  1. Install the latest Clang/LLVM or GCC if you do not have it already.
  2. Install premake5 and make it available in your path.
  3. Run the following from the command line (Change config when necessary):
premake5 gmake
cd build/gmake
make config=release_x64

If you have Ninja installed on your system, you can use ninja either:

premake5 ninja
cd build/ninja
ninja otfccdump_release_x64 otfccbuild_release_x64

Change the targets above when necessary.

Windows

On Windows, building otfcc is tested under the toolchains listed below. The default premake5 vs2015 will produce a Visual Studio solution using Clang-CL as its compiler.

  • GCC 5.1 included in TDM-GCC, or GCC 6.1.0 in MinGW-W64. Run the following from the command line (Change the config when necessary):

    premake5 gmake
    cd build/gmake
    make config=release_x64
    

    To use Ninja like that in Linux, you need to specify the --os=linux when using premake5 ninja.

  • Visual C++ Building Tools (Mar 2016) with Clang/LLVM 3.9. Only Release build is tested. Run the following from the Visual C++ Command Prompt:

    premake5 vs2015
    msbuild build\vs\otfcc.sln /property:Configuration=Release
    

Mac OS

premake5 (can be installed via brew install premake --devel, or be found in the dep/bin-osx directory) provides ability to produce XCode projects. Run

premake5 xcode4

And then you can open build/xcode/otfcc.xcworkspace and build with XCode. You can find built binaries in bin/.

Please ensure that Xcode’s Developer Mode is enabled.

To build binaries in your terminal, run

xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccbuild -configuration Release
xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccdump -configuration Release
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].