roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
font_adafruit_fixed_5x7.h
Go to the documentation of this file.
1#pragma once
2
3#include "font.h"
4
5namespace roo_display {
6
7/// Fixed-width 5x7 font (Adafruit classic).
8class FontAdafruitFixed5x7 : public Font {
9 public:
10 /// Construct the font.
12
13 void drawGlyph(const Surface& s, char32_t code, FontLayout layout,
14 Color color) const override;
15
16 void drawHorizontalString(const Surface &s, const char *utf8_data,
17 uint32_t size, Color color) const override;
18
20 GlyphMetrics *result) const override;
21
23 uint32_t size) const override;
24
27 uint32_t offset,
28 uint32_t max_count) const override;
29};
30
31} // namespace roo_display
ARGB8888 color stored as a 32-bit unsigned integer.
Definition color.h:16
Fixed-width 5x7 font (Adafruit classic).
GlyphMetrics getHorizontalStringMetrics(const char *utf8_data, uint32_t size) const override
Return metrics of the specified UTF-8 string as if it were a single glyph.
void drawGlyph(const Surface &s, char32_t code, FontLayout layout, Color color) const override
Draw a single glyph.
uint32_t getHorizontalStringGlyphMetrics(const char *utf8_data, uint32_t size, GlyphMetrics *result, uint32_t offset, uint32_t max_count) const override
Return metrics for consecutive glyphs in the UTF-8 string.
void drawHorizontalString(const Surface &s, const char *utf8_data, uint32_t size, Color color) const override
Draw a UTF-8 string horizontally.
bool getGlyphMetrics(char32_t code, FontLayout layout, GlyphMetrics *result) const override
Retrieve glyph metrics for a code point and layout.
Abstract font interface.
Definition font.h:185
Per-glyph metrics (bounding box and advance).
Definition font.h:139
Low-level handle used to draw to an underlying device.
Definition drawable.h:60
Defines 140 opaque HTML named colors.
FontLayout
Glyph layout direction.
Definition font.h:16