Jump to content

VioQueryFonts: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==Description==
Gets the position at which the presentation space maps to the window.
Gets the position at which the presentation space maps to the window.
==Syntax==
==Syntax==
<PRE>
  VioQueryFonts (Remfonts, Metrics, Metlen, Fonts, Facename, Options, hvps)
#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);
 
</PRE>


==Parameters==
==Parameters==
; Remfonts (PULONG) - output : Number of fonts not returned.
;Remfonts (PULONG) - output : Number of fonts not returned.
The number of fonts for which information is not returned.  
:The number of fonts for which information is not returned.
 
;Metrics (PFONTMETRICS) - output : Font metrics.
; Metrics (PFONTMETRICS) - output : Font metrics.
:Matching font metrics are returned in this buffer.
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.
; Metlen (ULONG) - input : Maximum length of data.
;Fonts (PULONG) - in/out : Number of fonts.
The maximum length of data to be returned for each record.  
: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.
; Fonts (PULONG) - in/out : Number of fonts.
:The face name of fonts desired, or NULL to indicate that all applicable fonts should be returned.
The location of the number of fonts to be returned on input. This is updated with the actual number of fonts returned on output.  
;Options (ULONG) - input : Controls which fonts are selected.
 
:Valid values are:
; Facename (PSZ) - input : Face name of fonts.
:* VQF_PUBLIC - Return only public fonts.
The face name of fonts desired, or NULL to indicate that all applicable fonts should be returned.  
:* VQF_PRIVATE - Return only private fonts.
 
:* VQF_ALL - Return both public and private fonts.
; Options (ULONG) - input : Controls which fonts are selected.
;hvps (HVIO) - input : VIO presentation-space handle.
Valid values are:
:This is either 0 to indicate the default VIO session, or a value returned by VioCreatePS.
 
* 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==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
VioQueryFonts returns one of the following values:
VioQueryFonts returns one of the following values:
*0 NO_ERROR
*421 ERROR_VIO_INVALID_PARMS
*436 ERROR_VIO_INVALID_HANDLE


* 0          NO_ERROR
* 421        ERROR_VIO_INVALID_PARMS
* 436        ERROR_VIO_INVALID_HANDLE
==Remarks==
==Remarks==
By inspecting the returned font metrics, the application can choose the font that best meets its requirements.
By inspecting the returned font metrics, the application can choose the font that best meets its requirements.
Line 58: Line 35:
All metrics are returned in pel coordinates.
All metrics are returned in pel coordinates.


In OS/2 2.x, hvps cannot be zero.  
In OS/2 2.x, hvps cannot be zero.
==Example Code==
<PRE>
 
</PRE>
 
==Related Functions==


[[Category:The OS/2 API Project]]
[[Category:Vio]]

Latest revision as of 00:36, 9 November 2022

Gets the position at which the presentation space maps to the window.

Syntax

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.