Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pf/pfextentwidetext.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pf/pfextentwidetext.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pf/pfextentwidetext.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pf/pfextentwidetext.html on line 8
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);
- extent
- A pointer to a
PhRect_t
structure where the function can store the text extent.
The members are:
- ul.x — the left bearing.
- lr.x — the maximum x distance.
- ul.y — the ascender.
- lr.y — the descender.
- pos
- A pointer to a
PhPoint_t
structure that specifies an offset that you want the function to apply to the
resulting extent.
If pos is NULL, no offset is applied.
- font
- The name of the base font.
Create this name by calling
PfGenerateFontName().
- str
- A wide-character string.
- len
- The length of the string, in bytes.
If len is 0, the function assumes the string is null-terminated.
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
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pf/pfextentwidetext.html on line 183
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pf/pfextentwidetext.html on line 183