6#include "roo_backport.h"
7#include "roo_backport/byte.h"
17 typename std::enable_if<!std::is_same<U, roo::byte>::value,
28 Color color)
const override;
44 bool rle()
const {
return compression_method_ > 0; }
45 int16_t kerning(
char32_t left,
char32_t right)
const;
52 const roo::byte*
PROGMEM findGlyph(
char32_t code)
const;
53 const roo::byte*
PROGMEM findKernPair(
char32_t left,
char32_t right)
const;
58 const roo::byte*
PROGMEM data,
const Box& clip_box,
72 void drawKernedGlyphsModeFill(
76 const GlyphMetrics& right_metrics,
bool right_compressed,
82 int glyph_metadata_size_;
85 int font_metric_bytes_;
87 int compression_method_;
88 int kerning_pairs_count_;
89 int glyph_kerning_size_;
90 char32_t default_glyph_;
91 int default_space_width_;
Axis-aligned integer rectangle.
ARGB8888 color stored as a 32-bit unsigned integer.
The abstraction for drawing to a display.
Interface for objects that can be drawn to an output device.
const FontMetrics & metrics() const
Return font metrics.
Per-glyph metrics (bounding box and advance).
Anti-aliased font implementation based on PROGMEM data.
int16_t getKerning(char32_t left, char32_t right) const override
Return kerning adjustment for a pair of code points.
SmoothFont(const U *font_data PROGMEM)
Legacy constructor for fonts using uint8_t byte data.
void drawHorizontalString(const Surface &s, const char *utf8_data, uint32_t size, Color color) const override
Draw a UTF-8 string horizontally.
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.
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.
bool getGlyphMetrics(char32_t code, FontLayout layout, GlyphMetrics *result) const override
Retrieve glyph metrics for a code point and layout.
void drawGlyph(const Surface &s, char32_t code, FontLayout layout, Color color) const override
Draw a single glyph.
Low-level handle used to draw to an underlying device.
Defines 140 opaque HTML named colors.
BlendingMode
Porter-Duff style blending modes.
FontLayout
Glyph layout direction.
BlendingMode blending_mode