Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Jul 14, 2016
2 parents d3cc0d2 + e65f613 commit 077e101
Show file tree
Hide file tree
Showing 143 changed files with 2,736 additions and 1,057 deletions.
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<p align="center"><img src="https://raw.githubusercontent.com/caryll/design/master/caryll-logo-libs-githubreadme.png" width=200></p><h1 align="center">otfcc</h1><p align="center"><a target="_blank" href="https://travis-ci.org/caryll/otfcc"><img src="https://travis-ci.org/caryll/otfcc.svg?branch=master" alt=""></a> <a target="_blank" href="https://ci.appveyor.com/project/be5invis/otfcc"><img src="https://ci.appveyor.com/api/projects/status/github/caryll/otfcc?branch=master&amp;svg=true" alt=""></a> <a href="https://github.com/caryll/otfcc/releases"><img src="https://img.shields.io/github/release/caryll/otfcc.svg" alt="Version"></a> <a target="_blank" href="https://github.com/caryll/otfcc/blob/master/LICENSE"><img src="https://img.shields.io/github/license/caryll/otfcc.svg" alt=""></a></p>
<p align="center"><img src="https://raw.githubusercontent.com/caryll/design/master/caryll-logo-libs-githubreadme.png" width=200></p><h1 align="center">otfcc</h1><p align="center"><a target="_blank" href="https://travis-ci.org/caryll/otfcc"><img src="https://travis-ci.org/caryll/otfcc.svg?branch=master" alt=""></a> <a target="_blank" href="https://ci.appveyor.com/project/be5invis/otfcc"><img src="https://ci.appveyor.com/api/projects/status/github/caryll/otfcc?branch=master&amp;svg=true" alt=""></a> <a href="https://github.com/caryll/otfcc/releases"><img src="https://img.shields.io/github/release/caryll/otfcc.svg" alt="Version"></a> <a target="_blank" href="https://gitter.im/caryll/otfcc"><img src="https://img.shields.io/gitter/room/caryll/otfcc.svg" alt=""></a></p>

The `otfcc` is a C library and utility used for parsing and writing 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.
* 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.**

## Usage

Expand Down Expand Up @@ -65,6 +65,20 @@ otfccbuild [OPTIONS] [input.json] -o output.[ttf|otf]

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

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. Download and install [premake5](http://premake.github.io/) for Linux and make it available in your path.
3. Run the following from the command line:

```bash
premake5 gmake
cd build/gmake
make
```

### 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.
Expand All @@ -76,25 +90,20 @@ On Windows building `otfcc` is tested under the toolchains listed below. The def
cd build/gmake
make
```

* [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.8](http://clang.llvm.org/). Only Release build is tested. Run the following from the Visual C++ Command Prompt:

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

### Linux

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

1. Install the latest Clang/LLVM or GCC if you do not have it already.
2. Download and install [premake5](http://premake.github.io/) for Linux and make it available in your path.
3. Run the following from the command line:
premake5 provides ability to produce XCode projects. Simply type

```bash
premake5 gmake
cd build/gmake
make
premake5 xcode4
```

And you can find XCode project files under `build/xcode`.
Empty file modified dep/bin-osx/premake5
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion dep/extern/emyg-dtoa/emyg-dtoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ DiyFp DiyFp_from_double(double d) {
} u = {d};
DiyFp res;

int biased_e = (u.u64 & kDpExponentMask) >> kDpSignificandSize;
int biased_e = (int)((u.u64 & kDpExponentMask) >> kDpSignificandSize);
uint64_t significand = (u.u64 & kDpSignificandMask);
if (biased_e != 0) {
res.f = significand + kDpHiddenBit;
Expand Down
Loading

0 comments on commit 077e101

Please sign in to comment.