VioQueryFonts: Difference between revisions
Created page with "==Description== Gets the position at which the presentation space maps to the window. ==Syntax== <PRE> #define INCL_VIO #include <os2.h> PULONG Remfonts; /* Number..." |
m Ak120 moved page OS2 API:CPI:VioQueryFonts to VioQueryFonts |
(No difference)
|
Revision as of 10:12, 10 January 2017
Description
Gets the position at which the presentation space maps to the window.
Syntax
#define INCL_VIO #include <os2.h> PULONG Remfonts; /* Number of fonts not returned. */ PFONTMETRICS Metrics; /* Font metrics. */ ULONG Metlen; /* Maximum length of data. */ PULONG Fonts; /* Number of fonts. */ PSZ Facename; /* Face name of fonts. */ ULONG Options; /* Controls which fonts are selected. */ HVIO hvps; /* VIO presentation-space handle. */ APIRET rc; /* Return code. */ rc = VioQueryFonts(Remfonts, Metrics, Metlen, Fonts, Facename, Options, hvps);
Parameters
- Remfonts (PULONG) - output
- Number of fonts not returned.
The number of fonts for which information is not returned.
- Metrics (PFONTMETRICS) - output
- Font metrics.
Matching font metrics are returned in this buffer.
- Metlen (ULONG) - input
- Maximum length of data.
The maximum length of data to be returned for each record.
- Fonts (PULONG) - in/out
- Number of fonts.
The location of the number of fonts to be returned on input. This is updated with the actual number of fonts returned on output.
- Facename (PSZ) - input
- Face name of fonts.
The face name of fonts desired, or NULL to indicate that all applicable fonts should be returned.
- Options (ULONG) - input
- Controls which fonts are selected.
Valid values are:
- VQF_PUBLIC Return only public fonts.
- VQF_PRIVATE Return only private fonts.
- VQF_ALL Return both public and private fonts.
- hvps (HVIO) - input
- VIO presentation-space handle.
This is either 0 to indicate the default VIO session, or a value returned by VioCreatePS.
Return Code
rc (APIRET) - returns
VioQueryFonts returns one of the following values:
- 0 NO_ERROR
- 421 ERROR_VIO_INVALID_PARMS
- 436 ERROR_VIO_INVALID_HANDLE
Remarks
By inspecting the returned font metrics, the application can choose the font that best meets its requirements.
All metrics are returned in pel coordinates.
In OS/2 2.x, hvps cannot be zero.