TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Modern text rendering with Linux: Part 1

141 pointsby dawwalmost 6 years ago

9 comments

jack12almost 6 years ago
Nice, I&#x27;ve subscribed to the RSS feed. A little weird to see such old software versions being used in an article with &#x27;modern&#x27; in its title, but I suppose you have to pick a point that&#x27;s &#x27;modern enough&#x27; to have something the majority of people can follow along with when they&#x27;re all running old software too.<p>I wish it covered error handling a bit more than just &#x27;exit(EXIT_FAILURE)&#x27;. FreeType must have some sort of error code or error message function.<p>But that&#x27;s all just minor nitpicking. I like the simple and direct walkthrough of the FreeType API (and promising to include friends from the ecosystem in the future). I hope the blog series will continue!
评论 #20492187 未加载
okasakialmost 6 years ago
It seems that with high resolution displays, font rendering techniques are becoming less important. I remember spending days tweaking font rendering. Now with a 300 dpi display, everything looks great.
评论 #20493952 未加载
cbzehneralmost 6 years ago
What makes this approach &quot;modern&quot;? What is this approach the alternative to?<p>As someone broadly unfamiliar with text rendering it&#x27;s not clear to me. An introduction to these points would be very helpful
评论 #20493186 未加载
new_realistalmost 6 years ago
Can’t wait to hear about Linux’s gamma corrected antialiasing in future posts (or lack thereof).
评论 #20492154 未加载
评论 #20492390 未加载
Const-mealmost 6 years ago
I recently needed that, too: <a href="https:&#x2F;&#x2F;github.com&#x2F;Const-me&#x2F;nanovg&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Const-me&#x2F;nanovg&#x2F;</a><p>Also using FreeType, but unlike that article rendering on GPU, with ClearType.<p>No advanced typography features are supported, though.
angaraalmost 6 years ago
If you are following along with gcc on Linux and continuing to get linker errors even after adding -lfreetype, try passing it as the very last argument, e.g.<p><pre><code> gcc `pkg-config --cflags freetype2` -Wall -Werror -o main main.c -lfreetype</code></pre>
z3t4almost 6 years ago
While we have almost photo realistic live 3d, some text based app&#x27;s are very laggy. To their defence, even though it&#x27;s probably not the reason for the lag, rendering fonts are very slow and complicated.
bjournealmost 6 years ago
Small nitpick: Freetype works on Windows too. So the same code can be used to render fonts there. Though it is perhaps easier to use the native DirectWrite api.
评论 #20493193 未加载
评论 #20493300 未加载
评论 #20492778 未加载
drakmailalmost 6 years ago
Awesome, please continue!