All Projects → yeslogic → Allsorts

yeslogic / Allsorts

Licence: apache-2.0
Font parser, shaping engine, and subsetter implemented in Rust

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Allsorts

uharfbuzz
An opinionated HarfBuzz Python binding
Stars: ✭ 42 (-90.02%)
Mutual labels:  opentype
Tehreer-Cocoa
Standalone text engine for iOS
Stars: ✭ 31 (-92.64%)
Mutual labels:  opentype
rapid-arrows-font
OTF comic font
Stars: ✭ 30 (-92.87%)
Mutual labels:  opentype
variable-font-collection-test
Variable Font Collection Test
Stars: ✭ 26 (-93.82%)
Mutual labels:  opentype
opentype-shaping-documents
Documentation of OpenType shaping behavior
Stars: ✭ 121 (-71.26%)
Mutual labels:  opentype
emojione-color
OpenType-SVG font of EmojiOne 2.3
Stars: ✭ 112 (-73.4%)
Mutual labels:  opentype
xits
XITS - OpenType implementation of STIX fonts with math support
Stars: ✭ 299 (-28.98%)
Mutual labels:  opentype
Xits
XITS - OpenType implementation of STIX fonts with math support
Stars: ✭ 257 (-38.95%)
Mutual labels:  opentype
opentype-features
The Complete CSS Demo for OpenType Features
Stars: ✭ 36 (-91.45%)
Mutual labels:  opentype
Bopomofo on Web
本計劃嘗試透過Web與OpenType字體技術來顯示注音符號。
Stars: ✭ 56 (-86.7%)
Mutual labels:  opentype
SheenFigure
An implementation of advanced typographic tables of OpenType specification.
Stars: ✭ 24 (-94.3%)
Mutual labels:  opentype
opentype-feature-bundle
Syntax highlighting and snippets for OpenType feature development in TextMate/Sublime Text
Stars: ✭ 35 (-91.69%)
Mutual labels:  opentype
bitsnpicas
Bits'N'Picas - Bitmap & Emoji Font Creation & Conversion Tools
Stars: ✭ 171 (-59.38%)
Mutual labels:  opentype
otfed
An OpenType font format encoder & decoder written in OCaml
Stars: ✭ 15 (-96.44%)
Mutual labels:  opentype
pixel font
All-in-one tool for creating TrueType outline fonts from bitmap glyph data, purely written in Elixir.
Stars: ✭ 16 (-96.2%)
Mutual labels:  opentype
ttf-explorer
A simple tool to explore a TrueType font content as a tree
Stars: ✭ 22 (-94.77%)
Mutual labels:  opentype
font-v
Font version string reporting and modification library + executable tool
Stars: ✭ 15 (-96.44%)
Mutual labels:  opentype
Opentype.js
Read and write OpenType fonts using JavaScript.
Stars: ✭ 3,393 (+705.94%)
Mutual labels:  opentype
text-rendering-tests
Unicode’s test suite for text rendering engines
Stars: ✭ 135 (-67.93%)
Mutual labels:  opentype
typedesigner
Unified Font Object Editor for macOS
Stars: ✭ 20 (-95.25%)
Mutual labels:  opentype


Allsorts

Font parser, shaping engine, and subsetter for OpenType, WOFF, and WOFF2 implemented in Rust


Allsorts is a font parser, shaping engine, and subsetter for OpenType, WOFF, and WOFF2 written entirely in Rust. It was extracted from Prince, a tool that typesets and lays out HTML and CSS documents into PDF.

The Allsorts shaping engine was developed in conjunction with a specification for OpenType shaping, which aims to specify OpenType font shaping behaviour.

Features

  • Parse TrueType (ttf), OpenType (otf), WOFF, and WOFF2 files.
  • Shape Arabic, Cyrillic, Greek, Hebrew, Indic scripts (Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Malayalam, Oriya, Tamil, Telugu), Latin, Syriac, and other scripts.
  • Subset from TrueType, OpenType, WOFF, and WOFF2 files into OpenType.

What is font shaping?

Font shaping is the process of taking text in the form of Unicode codepoints and a font, and laying out glyphs from the font according to the text. This involves honouring kerning, ligatures, and substitutions specified by the font. For some languages this is relatively straightforward. For others, such as Indic scripts it is quite complex. After shaping, another library such as Pathfinder or FreeType is responsible for rendering the glyphs. To learn more about text rendering, Andrea Cognolato has a good overview of modern font rending on Linux. The concepts remain similar on other platforms.

Examples

Refer to the Allsorts Tools repository for a trio of tools that exercise Allsorts font parsing, shaping, and subsetting.

Unimplemented Features / Known Issues

We don't currently support:

  • Shaping Khmer, Mongolian, Sinhala, and Tibetan.
  • Apple's morx table.
  • Unicode normalisation.

Known limitations:

  • The crate is not well documented yet (#5).
  • Allsorts does not do font lookup/matching. For this something like font-kit is recommended.
  • The subsetting implementation is tailored towards PDF font embedding (mostly the cmap0 argument to the subset function) at the moment.

Development Status

Allsorts is still under active development but has reached its first release milestone with its inclusion in Prince 13. In Prince it is responsible for all font loading, and font shaping.

Currently the font parsing code is handwritten. It is planned for this to eventually be replaced by machine generated code via our declarative data definition language project.

Platform Support

Allsorts CI runs tests on Linux, macOS, and Windows. Via Prince it is also built for FreeBSD.

Building and Testing

Minimum Supported Rust Version: 1.38.0

To build the crate ensure you have Rust 1.38.0 or newer installed.

Build with cargo build and run the tests with cargo test.

Contributing

Contributions are welcome, please refer to the contributing document for more details.

Code of Conduct

We aim to uphold the Rust community standards:

We are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, disability, ethnicity, religion, or similar personal characteristic.

We follow the Rust code of conduct.

Acknowledgements

License

Allsorts is distributed under the terms of the Apache License (Version 2.0).

See LICENSE for details.

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].