HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
raphlinus
font-rs
Rust2016–2023
raphlinus / font-rs

font-rs

Discover this repository through its Hacker News conversations.

5Distinct people
5Mentions
0Explicit recommenders
773GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A public description has not been verified.

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2016-06-30 12:43:10 UTC to 2023-01-18 16:04:28 UTC.

01232016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC303
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

5 sources
So for sub-pixel accurate font rasterization in Rust there are [1], [2], [3] and now the one from Typist, [4]. Possibly there are more (I know Raph Linus stopped maintaining [5] so that one is out). All of these crates are actively maintained. Are people re-inventing the wheel? [1] https://gitlab.redox-os.org/redox-os/rusttype [2] https://github.com/alexheretic/ab-glyph [3] https://github.com/mooman219/fontdue [4] https://github.com/typst/pixglyph [5] https://github.com/raphlinus/font-rs
In Typst: A Programmable Markup Language for Typesetting [pdf]
There's some cool things to note about Xi which make me more excited about it: * It's being written by Raph Levien, known for his work on Inconsolata, Ghostscript, and font-rs[1] among other things. * The design goals include incredibly high performance, beauty, reliability and developer friendliness[2]. * It's very fast at handling large files, though the editor is still missing a lot of functionality. Raph was also interviewed on the New Rustacean podcast[3] and talks a fair bit about Xi. [1]: https://github.com/google/font-rs [2]: https://github.com/google/xi-editor#a-modern-editor-with-a-backend-written-in-rust [3]: http://www.newrustacean.com/show_notes/interview/_2/part_1/index.html
In Oni: An IDE powered by Neovim
Author: > The current state of the code is quite rough. The code isn't well organized, and it's basically not ready for prime time. From what I can see in https://github.com/google/font-rs/blob/master/src/font.rs, this is what is missing: * support of CFF-based fonts (that is "postscript-flavored outlines" (i.e. cubic) OTF files) * "Advanced Typographic Tables" (see Opentype spec: https://www.microsoft.com/typography/otspec/otff.htm), this is what is needed to render more complex non-latin languages like Arabic etc, because it defines context-specific replacements and positioning, but also opentype-level kerning * support for the kerning table * support for slightly more exotic TTF variations like EOT and WOFF for webfonts * hinting support for smaller rendering sizes Most of these things are supported by Freetype, and are probably a cons
Read the rest
iderable amount of work to add. Once you add them into the rendering calculations, the abstractions in the code would have to be refactored and the code would become more complex and probably slower. Having said that, it's still a nice implementation and easy to read, something I wouldn't necessarily say about Freetype ;)
In Inside font-rs, a font renderer written in Rust
> Those manual use/optimization of SIMD are done in C anyway. C seems to be used only for SSE intrinsics support. ~16 LoC of "C". This is all C in the whole project, if you really think you can call it as such: https://github.com/google/font-rs/blob/master/src/accumulate... void accumulate_sse(const float *in, uint8_t *out, uint32_t n) { __m128 offset = _mm_setzero_ps(); __m128i mask = _mm_set1_epi32(0x0c080400); __m128 sign_mask = _mm_set1_ps(-0.f); for (int i = 0; i < n; i += 4) { __m128 x = _mm_load_ps(&in[i]); x = _mm_add_ps(x, _mm_castsi128_ps(_mm_slli_si128(_mm_castps_si128(x), 4))); x = _mm_add_ps(x, _mm_shuffle_ps(_mm_setzero_ps(), x, 0x40)); x = _mm_add_ps(x, offset); __m128 y = _mm_andnot_ps(sign_mask, x); // fabs(x) y = _mm_min_ps(y, _mm_set1_ps(1.0f)); y = _mm_mul_ps
Read the rest
(y, _mm_set1_ps(255.0f)); __m128i z = _mm_cvtps_epi32(y); z = _mm_shuffle_epi8(z, mask); _mm_store_ss((float *)&out[i], (__m128)z); offset = _mm_shuffle_ps(x, x, _MM_SHUFFLE(3, 3, 3, 3)); } } Also consider top level: https://github.com/google/font-rs/tree/master/src > What is the main benefit of using Rust? Safety and performance. From the article: "With the SIMD speedup, font-rs is approximately 7.6x faster than FreeType in larger sizes (keep in mind that 42 pixels/em is the default for xxhdpi Android devices)."
In Inside font-rs, a font renderer written in Rust

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.