Skip to content

Commit

Permalink
Version ab_glyph 0.1
Browse files Browse the repository at this point in the history
Add rusttype comparison to readme.
Update root readme.
  • Loading branch information
alexheretic committed May 8, 2020
1 parent a9cc2b2 commit 394f70f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ab-glyph
Glyph stuff.
## [ab_glyph](glyph) [![crates.io](https://img.shields.io/crates/v/ab_glyph.svg)](https://crates.io/crates/ab_glyph) [![Documentation](https://docs.rs/ab_glyph/badge.svg)](https://docs.rs/ab_glyph)
Fast API for loading, scaling, positioning and rasterizing OpenType font glyphs. [See readme](glyph).

## [ab_glyph_rasterizer](rasterizer) [![](https://img.shields.io/crates/v/ab_glyph_rasterizer.svg)](https://crates.io/crates/ab_glyph_rasterizer) [![](https://docs.rs/ab_glyph_rasterizer/badge.svg)](https://docs.rs/ab_glyph_rasterizer)
Zero dependency coverage rasterization for lines, quadratic & cubic beziers.
Zero dependency coverage rasterization for lines, quadratic & cubic beziers. [See readme](rasterizer).

## Minimum supported rust compiler
All crates maintained with [latest stable rust](https://gist.github.com/alexheretic/d1e98d8433b602e57f5d0a9637927e0c).
2 changes: 1 addition & 1 deletion glyph/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Unreleased
# 0.1
* Implement fast glyph layout, outline & drawing primitives.
2 changes: 1 addition & 1 deletion glyph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ab_glyph"
version = "0.0.0"
version = "0.1.0"
authors = ["Alex Butler <alexheretic@gmail.com>"]
edition = "2018"
description = "API for loading, scaling, positioning and rasterizing OpenType font glyphs."
Expand Down
17 changes: 17 additions & 0 deletions glyph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@ no_std environments are supported using `alloc` & [`libm`](https://github.com/ru
```toml
ab_glyph = { default-features = false, features = ["libm-math"] }
```

## Comparison with [`rusttype`](https://gitlab.redox-os.org/redox-os/rusttype)
ab_glyph is a rewrite of rusttype made after I added .otf support for the latter and saw some performance issue's
with the rusttype API.

ab_glyph is a more focussed API concentrating on high performance for both .ttf & .otf fonts.

When laying out glyphs into paragraph, ab_glyph is faster than rusttype using .ttf fonts &
**much** faster for .otf fonts.

```
group ab-glyph rusttype 0.9
----- -------- ------------
layout_a_sentence 1.00 19.3±0.14µs 1.31 25.3±0.35µs
layout_a_sentence (exo2-otf) 1.00 11.1±0.12µs 8.85 98.1±1.17µs
layout_a_sentence (exo2-ttf) 1.00 11.1±0.08µs 1.56 17.3±0.14µs
```

0 comments on commit 394f70f

Please sign in to comment.