
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
Fast API for loading, scaling, positioning and rasterizing OpenType font glyphs.
use ab_glyph::{FontRef, Font, Glyph, point};
let font = FontRef::try_from_slice(include_bytes!("../../dev/fonts/Exo2-Light.otf"))?;
// Get a glyph for 'q' with a scale & position.
let q_glyph: Glyph = font.glyph_id('q').with_scale_and_position(24.0, point(100.0, 0.0));
// Draw it.
if let Some(q) = font.outline_glyph(q_glyph) {
q.draw(|x, y, c| { /* draw pixel `(x, y)` with coverage: `c` */ });
}
no_std environments are supported using alloc & libm.
ab_glyph = { default-features = false, features = ["libm"] }
rusttypeab_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 (exo2-ttf) 1.00 11.1±0.08µs 1.56 17.3±0.14µs
layout_a_sentence (exo2-otf) 1.00 11.1±0.12µs 8.85 98.1±1.17µs
Note: Numbers from May-2020 benchmarks, ab-glyph performance is also expected to have improved since then.
FAQs
Unknown package
We found that ab-glyph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.