{"id":13721725,"url":"https://github.com/caryll/otfcc","last_synced_at":"2025-05-07T14:30:45.370Z","repository":{"id":37359636,"uuid":"50915190","full_name":"caryll/otfcc","owner":"caryll","description":"Optimized OpenType builder and inspector.","archived":true,"fork":false,"pushed_at":"2022-06-03T19:18:27.000Z","size":10555,"stargazers_count":425,"open_issues_count":14,"forks_count":64,"subscribers_count":40,"default_branch":"master","last_synced_at":"2024-11-14T11:39:38.630Z","etag":null,"topics":["cff-otf","clang","font","opentype-fonts","type-design","typeface","typography"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caryll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-02T11:13:22.000Z","updated_at":"2024-11-11T05:51:19.000Z","dependencies_parsed_at":"2022-07-12T05:30:37.869Z","dependency_job_id":null,"html_url":"https://github.com/caryll/otfcc","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caryll%2Fotfcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caryll%2Fotfcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caryll%2Fotfcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caryll%2Fotfcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caryll","download_url":"https://codeload.github.com/caryll/otfcc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895473,"owners_count":21821167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cff-otf","clang","font","opentype-fonts","type-design","typeface","typography"],"created_at":"2024-08-03T01:01:20.614Z","updated_at":"2025-05-07T14:30:42.845Z","avatar_url":"https://github.com/caryll.png","language":"C","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/caryll/design/master/caryll-logo-libs-githubreadme.png\" width=200\u003e\u003c/p\u003e\u003ch1 align=\"center\"\u003eotfcc\u003c/h1\u003e\u003cp align=\"center\"\u003e\u003ca target=\"_blank\" href=\"https://travis-ci.org/caryll/otfcc\"\u003e\u003cimg src=\"https://travis-ci.org/caryll/otfcc.svg?branch=master\" alt=\"\"\u003e\u003c/a\u003e \u003ca target=\"_blank\" href=\"https://ci.appveyor.com/project/be5invis/otfcc\"\u003e\u003cimg src=\"https://ci.appveyor.com/api/projects/status/github/caryll/otfcc?branch=master\u0026amp;svg=true\" alt=\"\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/caryll/otfcc/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/caryll/otfcc.svg\" alt=\"Version\"\u003e\u003c/a\u003e \u003ca target=\"_blank\" href=\"https://gitter.im/caryll/otfcc\"\u003e\u003cimg src=\"https://img.shields.io/gitter/room/caryll/otfcc.svg\" alt=\"\"\u003e\u003c/a\u003e\u003c/p\u003e\n\nThe `otfcc` is a C library and utility used for parsing and writing OpenType font files.\n\n## Key features\n\n* JSON serialization of TrueType and CFF OpenType fonts.\n* Building OpenType fonts from JSON.\n* Full support for OpenType features (`GSUB`, `GPOS` and `GDEF`), CID-keyed CFF, vertical metrics, and more.\n* **4× faster than `ttx` on CFF OTF, and 40× on TTF.**\n* **900× faster than `makeotf` for building a fully-optimized CFF OTF.**\n\n## Installation\n\n### Windows\n\nYou can download the prebuilt binaries [here](https://github.com/caryll/otfcc/releases).\n\n### Mac\n\nIf you have [Homebrew](http://brew.sh/), just run the following in your terminal.\n\n```bash\nbrew tap caryll/tap\nbrew install otfcc-mac64\n```\n\nNote: a full Xcode installation is required. Please refer to the instructions [here](https://stackoverflow.com/a/17980786/923437) if you see an error related to `xcode-select`.\n\nOtherwise, you may need to click the “Releases” above, and download the archives in it.\n\n### Arch Linux\n\nThe package `otfcc` can be found [here](https://aur.archlinux.org/packages/otfcc/).\n\n### Build from Source\n\nSee below.\n\n## Usage\n\n### `otfccdump` : Dump an OpenType font file into JSON\n```\notfccdump [OPTIONS] input.[otf|ttf|ttc]\n\n -h, --help              : Display this help message and exit.\n -v, --version           : Display version information and exit.\n -o \u003cfile\u003e               : Set output file path to \u003cfile\u003e. When absent the dump\n                           will be written to STDOUT.\n -n \u003cn\u003e, --ttc-index \u003cn\u003e : Use the \u003cn\u003eth subfont within the input font.\n --pretty                : Prettify the output JSON.\n --ugly                  : Force uglify the output JSON.\n --verbose               : Show more information when building.\n --ignore-glyph-order    : Do not export glyph order information.\n --glyph-name-prefix pfx : Add a prefix to the glyph names.\n --ignore-hints          : Do not export hinting information.\n --decimal-cmap          : Export 'cmap' keys as decimal number.\n --name-by-hash          : Name glyphs using its hash value.\n --add-bom               : Add BOM mark in the output. (It is default on Windows\n                           when redirecting to another program. Use --no-bom to\n                           turn it off.)\n```\n\n### `otfccbuild` : Build an OpenType font file from JSON\n```\nUsage : otfccbuild [OPTIONS] [input.json] -o output.[ttf|otf]\n\n input.json                : Path to input file. When absent the input will be\n                             read from the STDIN.\n\n -h, --help                : Display this help message and exit.\n -v, --version             : Display version information and exit.\n -o \u003cfile\u003e                 : Set output file path to \u003cfile\u003e.\n -s, --dummy-dsig          : Include an empty DSIG table in the font. For some\n                             Microsoft applications, DSIG is required to enable\n                             OpenType features.\n -O\u003cn\u003e                     : Specify the level for optimization.\n     -O0                     Turn off any optimization.\n     -O1                     Default optimization.\n     -O2                     More aggressive optimizations for web font. In this\n                             level, the following options will be set:\n                               --merge-features\n                               --short-post\n                               --subroutinize\n     -O3                     The most aggressive opptimization strategy will be\n                             used. In this level, these options will be set:\n                               --force-cid\n                               --ignore-glyph-order\n --verbose                 : Show more information when building.\n\n --ignore-hints            : Ignore the hinting information in the input.\n --keep-average-char-width : Keep the OS/2.xAvgCharWidth value from the input\n                             instead of stating the average width of glyphs.\n                             Useful when creating a monospaced font.\n --keep-unicode-ranges     : Keep the OS/2.ulUnicodeRange[1-4] as-is.\n --keep-modified-time      : Keep the head.modified time in the json, instead of\n                             using current time.\n\n --short-post              : Don't export glyph names in the result font.\n --ignore-glyph-order, -i  : Ignore the glyph order information in the input.\n --keep-glyph-order, -k    : Keep the glyph order information in the input.\n                             Use to preserve glyph order under -O2 and -O3.\n --dont-ignore-glyph-order : Same as --keep-glyph-order.\n --merge-features          : Merge duplicate OpenType feature definitions.\n --dont-merge-features     : Keep duplicate OpenType feature definitions.\n --merge-lookups           : Merge duplicate OpenType lookups.\n --dont-merge-lookups      : Keep duplicate OpenType lookups.\n --force-cid               : Convert name-keyed CFF OTF into CID-keyed.\n --subroutinize            : Subroutinize CFF table.\n --stub-cmap4              : Create a stub `cmap` format 4 subtable if format\n                             12 subtable is present.\n```\n\n## Building\n\n`otfcc` can be built on a number of platforms. It uses the [premake](http://premake.github.io/) build system.\n\nIt 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.\n\n### Linux (or other Unix-like)\n\nOn Linux, Either Clang/LLVM or GCC can be used to build `otfcc`.\n\n1. Install the latest Clang/LLVM or GCC if you do not have it already.\n2. Install [premake5](http://premake.github.io/) and make it available in your path.\n3. Run the following from the command line (Change config when necessary):\n\n```bash\npremake5 gmake\ncd build/gmake\nmake config=release_x64\n```\n\nIf you have [Ninja](https://ninja-build.org/) installed on your system, you can use ninja either:\n\n```bash\npremake5 ninja\ncd build/ninja\nninja otfccdump_release_x64 otfccbuild_release_x64\n```\n\nChange the targets above when necessary.\n\n### Windows\n\nOn 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.\n\n* 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):\n\n  ```bash\n  premake5 gmake\n  cd build/gmake\n  make config=release_x64\n  ```\n  To use Ninja like that in Linux, you need to specify the `--os=linux` when using `premake5 ninja`.\n\n* [Visual C++ Building Tools (Mar 2016)](https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcing-the-official-release-of-the-visual-c-build-tools-2015/) with [Clang/LLVM 3.9](http://clang.llvm.org/). Only Release build is tested. Run the following from the Visual C++ Command Prompt:\n\n  ```bat\n  premake5 vs2015\n  msbuild build\\vs\\otfcc.sln /property:Configuration=Release\n  ```\n\n\n### Mac OS\n\n[premake5](http://premake.github.io/) (can be installed via `brew install premake --devel`, or be found in the `dep/bin-osx` directory) provides ability to produce XCode projects. Run\n\n```bash\npremake5 xcode4\n```\n\nAnd then you can open `build/xcode/otfcc.xcworkspace` and build with XCode. You can find built binaries in `bin/`.\n\nPlease ensure that Xcode’s Developer Mode is enabled.\n\nTo build binaries in your terminal, run\n\n```bash\nxcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccbuild -configuration Release\nxcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccdump -configuration Release\n```\n\n","funding_links":[],"categories":["Font","C","Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaryll%2Fotfcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaryll%2Fotfcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaryll%2Fotfcc/lists"}