subcalls.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
VioQueryFonts (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_AVIO
 
USHORT VioQueryFonts(pcbMetrics, pfm, cbMetrics, pcFonts, pszFacename,
    flOptions, hvps)
PLONG pcbMetrics;    /* pointer to variable for structure length */
PFONTMETRICS pfm;    /* pointer to structure for font metrics    */
LONG cbMetrics;      /* length of structure                      */
PLONG pcFonts;       /* pointer to variable for number of fonts  */
PSZ pszFacename;     /* pointer to string for face name          */
ULONG flOptions;     /* enumeration options                      */
HVPS hvps;           /* presentation-space handle                */
 
The VioQueryFonts function retrieves a font-metrics structure (or
structures) that contains characteristics of the fonts that match the
specified face name. These characteristics, or font metrics, are returned
for as many matching fonts as will fit in the structure pointed to by the
pfm parameter.
 
After examining the returned data, the application selects the font most
appropriate for its requirements, and if necessary, forces selection of a
particular font by specifying the lMatch field (as returned in the pfm
parameter) in the FATTRS structure for the VioCreateLogFont function.
 
By specifying zero for the pcFonts parameter and then examining the value
returned, the application determines how many fonts match the specified face
name.
 
All sizes are returned in world coordinates. For more information, see the
Microsoft Operating System/2 Programmer's Reference, Volume 1.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
pcbMetrics   Points to the variable that receives the length (in bytes) of
             each FONTMETRICS structure. The structure pointed to by the
             pfm parameter must contain the number of bytes given by
             pcFonts x pcMetrics.
 
pfm          Points to the FONTMETRICS structure that receives the font
             metrics of the specified matching fonts. The format for each
             record is as defined in the GpiQueryFontMetrics function.
 
cbMetrics    Specifies the length (in bytes) of the font-metrics
             structure(s).
 
pcFonts      Points to the variable that receives the number of fonts for
             which the application requires metrics.
 
pszFacename  Points to the null-terminated string that specifies the face
             name.
 
flOptions    Specifies whether to enumerate public or private fonts. This
             parameter may be any combination of the following values:
 
             Value        Meaning
             ───────────────────────────────────────────────────────────────
             VQF_PUBLIC   Enumerate public fonts.
 
             VQF_PRIVATE  Enumerate private fonts.
 
hvps         Identifies the advanced video-input-and-output (AVIO)
             presentation space. This handle must have been created
             previously by using the VioCreatePS function.
 
Return Value
 
The return value is the number of fonts not retrieved. The return value is
-1 if an error occurs.
 
See Also
 
GpiQueryFonts, GpiQueryFontMetrics, VioCreateLogFont, VioCreatePS, FATTRS,
FONTMETRICS