Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PfLoadFont(), PfLoadFontCx()
Preload a font within the font server
Synopsis:
#include <photon/Pf.h>
int PfLoadFont( const char *font,
unsigned flags,
FontName fontused );
#include <font_api.h>
int PfLoadFontCx( struct _Pf_ctrl * context,
const char * font,
unsigned flags,
FontName fontused );
Arguments:
- context
- (PfLoadFontCx() only) A pointer to the font context to use, returned by PfAttachCx() or PfAttachDllCx().
- font
- The name of the desired font, as created by PfGenerateFontName() or PfGenerateFontNameCx().
- flags
- Any combination of:
- PHFONT_LOAD_METRICS -- load the font metrics.
- PHFONT_LOAD_IMAGES -- load the font bitmaps.
If you don't specify any flags, the function checks the validity of the input font name.
- fontused
- NULL, or a buffer where the function can store the real name of the font, which may be different from the input if the font is unknown or is mapped as an alias to another font (via the fontmap file).
Library:
- PfLoadFont()
- ph
- PfLoadFontCx()
- font
Description:
This function preloads a font (from disk into memory) within the font server to speed up subsequent use of the font. By default, a font is loaded only when required by PgExtentText() or PgDrawText().
Returns:
- 0
- Success.
- -1
- An error occurred (errno is set).
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PfGenerateFontName(), PfGenerateFontNameCx(), PgDrawText(), PgExtentText()
Fonts chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)