Calculate the extent rectangle of a wide-character string
#include <photon/Pf.h> PhRect_t *PfExtentWideText( PhRect_t *extent, PhPoint_t const *pos, const char *font, const uint16_t *str, int len);
ph
This function calculates the extent rectangle of a text string of wide characters.
This function assumes each character is represented by 2 bytes that conform to the ISO/IEC 10646-1 UCS-2 double-byte format. |
The font determines the ascender and descender values of the extent. The width is dependent on the string — the actual font used by characters within the string may be different than this base font (as specified in the fontext and fontmap files).
If metrics for the base font have been loaded locally (see PfLoadMetrics()) then this extent may be calculated internally; otherwise a request is sent to the font server.
A pointer to the extent rectangle (i.e the same pointer as extent), or NULL if an error occurred.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PfExtent(), PfExtentCx(), PfExtentText(), PfExtentTextToRect(), PfFractionalExtentText(), PfGenerateFontName(), PfLoadMetrics(), PfWideTextWidthBytes(), PfWideTextWidthChars(), PgExtentText(), PhPoint_t, PhRect_t
Fonts chapter of the Photon Programmer's Guide