table of contents
- experimental 3~git20240320~6e260a2+ds-1
TTF_GlyphMetrics(3) | SDL_ttf3 FUNCTIONS | TTF_GlyphMetrics(3) |
NAME¶
TTF_GlyphMetrics - Query the metrics (dimensions) of a font's 16-bit glyph.
SYNOPSIS¶
#include "SDL3_ttf/SDL_ttf.h"
int TTF_GlyphMetrics(TTF_Font *font, Uint16 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance);
DESCRIPTION¶
To understand what these metrics mean, here is a useful link:
https://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html
Note that this version of the function takes a 16-bit character code, which covers the Basic Multilingual Plane, but is insufficient to cover the entire set of possible Unicode values, including emoji glyphs. You should use TTF_GlyphMetrics32 () instead, which offers the same functionality but takes a 32-bit codepoint instead.
The only reason to use this function is that it was available since the beginning of time, more or less.
FUNCTION PARAMETERS¶
AVAILABILITY¶
This function is available since SDL_ttf 3.0.0.
SEE ALSO¶
SDL_ttf 3.0.0 | SDL_ttf |