<story><title>Inside font-rs, a font renderer written in Rust</title><url>https://medium.com/@raphlinus/inside-the-fastest-font-renderer-in-the-world-75ae5270c445#.uttzi87qp</url></story><parent_chain><item><author>nathancahill</author><text>Neat. I can&amp;#x27;t help but wonder if this will fall victim to the &amp;quot;last 10% is the hardest&amp;quot; rule? Will going from tech demo to production ready remove the performance gain?&lt;p&gt;It sounds like you&amp;#x27;re claiming that FreeType is slower because the parsing&amp;#x2F;accumulation implementations are slower. It&amp;#x27;s far from my area of expertise, but wouldn&amp;#x27;t 20 y&amp;#x2F;o open source software as prevalent as FreeType have optimized those code paths?&lt;p&gt;Edit: Author is a heavyweight in font rendering circles. Excuse my ignorance. Just wary of &amp;quot;10x faster with 90% of functionality!&amp;quot; benchmarks.</text></item></parent_chain><comment><author>elcapitan</author><text>Author:&lt;p&gt;&amp;gt; The current state of the code is quite rough. The code isn&amp;#x27;t well organized, and it&amp;#x27;s basically not ready for prime time.&lt;p&gt;From what I can see in &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;google&amp;#x2F;font-rs&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;src&amp;#x2F;font.rs&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;google&amp;#x2F;font-rs&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;src&amp;#x2F;font.rs&lt;/a&gt;, this is what is missing:&lt;p&gt;* support of CFF-based fonts (that is &amp;quot;postscript-flavored outlines&amp;quot; (i.e. cubic) OTF files)&lt;p&gt;* &amp;quot;Advanced Typographic Tables&amp;quot; (see Opentype spec: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.microsoft.com&amp;#x2F;typography&amp;#x2F;otspec&amp;#x2F;otff.htm&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.microsoft.com&amp;#x2F;typography&amp;#x2F;otspec&amp;#x2F;otff.htm&lt;/a&gt;), 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&lt;p&gt;* support for the kerning table&lt;p&gt;* support for slightly more exotic TTF variations like EOT and WOFF for webfonts&lt;p&gt;* hinting support for smaller rendering sizes&lt;p&gt;Most of these things are supported by Freetype, and are probably a considerable 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.&lt;p&gt;Having said that, it&amp;#x27;s still a nice implementation and easy to read, something I wouldn&amp;#x27;t necessarily say about Freetype ;)</text></comment>
<story><title>Inside font-rs, a font renderer written in Rust</title><url>https://medium.com/@raphlinus/inside-the-fastest-font-renderer-in-the-world-75ae5270c445#.uttzi87qp</url></story><parent_chain><item><author>nathancahill</author><text>Neat. I can&amp;#x27;t help but wonder if this will fall victim to the &amp;quot;last 10% is the hardest&amp;quot; rule? Will going from tech demo to production ready remove the performance gain?&lt;p&gt;It sounds like you&amp;#x27;re claiming that FreeType is slower because the parsing&amp;#x2F;accumulation implementations are slower. It&amp;#x27;s far from my area of expertise, but wouldn&amp;#x27;t 20 y&amp;#x2F;o open source software as prevalent as FreeType have optimized those code paths?&lt;p&gt;Edit: Author is a heavyweight in font rendering circles. Excuse my ignorance. Just wary of &amp;quot;10x faster with 90% of functionality!&amp;quot; benchmarks.</text></item></parent_chain><comment><author>brohee</author><text>&amp;gt; wouldn&amp;#x27;t 20 y&amp;#x2F;o open source software as prevalent as FreeType have optimized those code paths?&lt;p&gt;The tradeoffs that made the most sense 20 years ago are not those that would lead to the fastest implementation on current hardware. This is not so much the Freetype is unoptimized, it&amp;#x27;s that old, possibly wrong optimizations are pretty much baked in now...&lt;p&gt;Modern CPU have massively more cache and have vectorization instructions, which make the optimal solution very different from the one optimal for the Pentium II that was top of the line when Freetype was first conceived... It&amp;#x27;s also acceptable to use vastly more memory, Freetype dates from a time where a beefy desktop machine had maybe 32Mb of RAM...</text></comment>