File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,6 +391,9 @@ int baseline_font(struct LedFont *font);
391391// Read the height of a font
392392int height_font (struct LedFont * font );
393393
394+ // Get the width of a specific codepoint in the given font
395+ int character_width_font (struct LedFont * font , uint32_t unicode_codepoint );
396+
394397// Creates an outline font based on an existing font instance
395398struct LedFont * create_outline_font (struct LedFont * font );
396399
Original file line number Diff line number Diff line change @@ -256,6 +256,10 @@ int height_font(struct LedFont * font) {
256256 return to_font (font)->height ();
257257}
258258
259+ int character_width_font (struct LedFont *font, uint32_t unicode_codepoint) {
260+ return to_font (font)->CharacterWidth (unicode_codepoint);
261+ }
262+
259263struct LedFont *create_outline_font (struct LedFont * font) {
260264 rgb_matrix::Font* outlineFont = to_font (font)->CreateOutlineFont ();
261265 return from_font (outlineFont);
You can’t perform that action at this time.
0 commit comments