<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Graphics Libraries &amp; Fonts on Embedded Systems Development</title><link>https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/</link><description>Recent content in Graphics Libraries &amp; Fonts on Embedded Systems Development</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/index.xml" rel="self" type="application/rss+xml"/><item><title>Graphics Library Landscape</title><link>https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/graphics-library-landscape/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/graphics-library-landscape/</guid><description>&lt;h1 id="graphics-library-landscape"&gt;Graphics Library Landscape&lt;a class="anchor" href="#graphics-library-landscape"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Choosing a graphics library for an embedded display is one of those decisions that shapes an entire project. The library determines the API, what displays can be supported, how much RAM and flash are needed, and whether features like touch input or widgets come built-in. Here is a practical overview of the major options.&lt;/p&gt;
&lt;h2 id="lvgl-light-and-versatile-graphics-library"&gt;LVGL (Light and Versatile Graphics Library)&lt;a class="anchor" href="#lvgl-light-and-versatile-graphics-library"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;LVGL is the most feature-rich option and the closest thing to a &amp;ldquo;real GUI framework&amp;rdquo; for MCUs. It provides widgets (buttons, sliders, charts, lists), a layout engine, themes, animations, and even a font converter. The tradeoff is resource usage: LVGL wants at least 64KB of flash and 16KB of RAM as a minimum, and realistically more like 128KB+ flash and 32KB+ RAM for a usable UI. It&amp;rsquo;s overkill for a simple sensor readout on a 128x64 OLED, but for a thermostat with a touchscreen TFT, LVGL is probably the right tool.&lt;/p&gt;</description></item><item><title>Font Rendering on Embedded Displays</title><link>https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/font-rendering/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/font-rendering/</guid><description>&lt;h1 id="font-rendering-on-embedded-displays"&gt;Font Rendering on Embedded Displays&lt;a class="anchor" href="#font-rendering-on-embedded-displays"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Text is the most common thing displayed on embedded screens, and the font rendering approach directly affects readability, aesthetics, and memory consumption. There&amp;rsquo;s a surprising amount of depth here beyond the default 5x7 pixel font that ships with every beginner library.&lt;/p&gt;
&lt;h2 id="bitmap-fonts"&gt;Bitmap Fonts&lt;a class="anchor" href="#bitmap-fonts"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The simplest and most common approach on MCUs: each glyph is stored as a fixed grid of pixels (a bitmap). A 5x7 font uses 7 bytes per character (one byte per row, with 5 bits used). A full 96-character ASCII set in 5x7 takes about 672 bytes of flash — trivial. Larger fonts consume more: a 16x24 font for the same character set is about 4.5KB. Bitmap fonts render fast (just copy pixels), scale poorly (they look terrible at non-native sizes), and have fixed spacing.&lt;/p&gt;</description></item><item><title>Drawing Primitives &amp; Sprites</title><link>https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/drawing-primitives/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/screens-displays/graphics-libraries-and-fonts/drawing-primitives/</guid><description>&lt;h1 id="drawing-primitives--sprites"&gt;Drawing Primitives &amp;amp; Sprites&lt;a class="anchor" href="#drawing-primitives--sprites"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Every embedded graphics library provides a core set of drawing primitives — the basic shapes and operations combined to build interfaces. Understanding what&amp;rsquo;s available and how the underlying algorithms work helps produce efficient display code and debug visual issues when things don&amp;rsquo;t look right.&lt;/p&gt;
&lt;h2 id="basic-primitives"&gt;Basic Primitives&lt;a class="anchor" href="#basic-primitives"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The standard set found in virtually every library:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pixel&lt;/strong&gt; — &lt;code&gt;drawPixel(x, y, color)&lt;/code&gt; — the atomic operation everything else builds on&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Line&lt;/strong&gt; — &lt;code&gt;drawLine(x0, y0, x1, y1, color)&lt;/code&gt; — usually Bresenham&amp;rsquo;s algorithm; watch out for endpoint handling at screen boundaries&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rectangle&lt;/strong&gt; — &lt;code&gt;drawRect()&lt;/code&gt; for outline, &lt;code&gt;fillRect()&lt;/code&gt; for solid — the fastest fill operation since it maps directly to row/column writes on most display controllers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Circle&lt;/strong&gt; — &lt;code&gt;drawCircle()&lt;/code&gt; and &lt;code&gt;fillCircle()&lt;/code&gt; — midpoint circle algorithm; filled circles are noticeably slower than filled rectangles&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Triangle&lt;/strong&gt; — &lt;code&gt;drawTriangle()&lt;/code&gt; and &lt;code&gt;fillTriangle()&lt;/code&gt; — filled triangles use scanline algorithms and are useful for arrow indicators and custom shapes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rounded rectangle&lt;/strong&gt; — &lt;code&gt;drawRoundRect()&lt;/code&gt; — quarter-circle corners connected by straight lines&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On most display controllers, &lt;code&gt;fillRect()&lt;/code&gt; is special because a column/row address window can be set and stream pixel data directly, which is much faster than setting individual pixels. Prefer rectangles for clearing regions and drawing backgrounds.&lt;/p&gt;</description></item></channel></rss>