Table of Contents

This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

2021/09/17 04:47 · prokushev · 0 Comments
2021/08/20 03:18 · prokushev · 0 Comments

VioGetFont

This call returns either the font table of the size specified or the font in use.

Syntax

VioGetFont (RequestBlock, VioHandle)

Parameters

Return Code

rc (USHORT) - return:Return code descriptions are:

Remarks

For reqtype = 1, return ROM font, the font size requested must be supported by the display adapter installed. The 8×8, 8×14, 9×14, 8×16, or 9×16 character font may be requested for the VGA or PS/2 Display Adapters. The 8×8, 8×14, or 9×14 font may be requested for the enhanced graphics adapter. The 8×8 font may be requested for the colour graphics adapter.

Note: Although graphics mode support is provided in VioGetFont, this support is not provided by the Base Video Handlers provided with OS/2.

For reqtype = 1, return ROM font, the far address returned is a ROM pointer only for those fonts where the font table for the full 256-character set is actually contained in ROM. Otherwise, the far address returned is a RAM pointer. Note that for 8×8 on the CGA, the font table for the full 256-character set is returned. For 9×14 or 9×16 the font table for the full 256-character set is also returned. Partial fonts are not returned. The 9×14 and 9×16 fonts are derived from variations of the 8×14 and 8×16 fonts, respectively, where the definitions of fonts for those characters that are different, are replaced.

For VioGetFont specifying reqtype = 1, return ROM font, the font returned is derived from the fonts contained in the system, EGA, VGA, and PS/2 Display Adapter BIOS data areas as applicable. There is an exception for the EGA, VGA and PS/2 Display Adapter when VioSetCp or VioSetFont has been issued. In that case, the font of the size requested is returned from the active code page or the list of user fonts already set.

Bindings

C

typedef struct _VIOFONTINFO { /* viofi */
  USHORT  cb;                 /* length of this structure */
  USHORT  type;               /* request type */
  USHORT  cxCell;             /* pel columns in character cell */
  USHORT  cyCell;             /* pel rows in character cell */
  PVOID   pbData;             /* requested font table (returned) */
  USHORT  cbData;             /* length of caller supplied data area (in bytes) */
} VIOFONTINFO;
 
#define INCL_VIO
 
USHORT  rc = VioGetFont(RequestBlock, VioHandle);
 
PVIOFONTINFO     RequestBlock;  /* Request block */
HVIO             VioHandle;     /* Vio handle */
 
USHORT           rc;            /* return code */

MASM

VIOFONTINFO struc
  viofi_cb      dw  ? ;length of this structure
  viofi_type    dw  ? ;request type
  viofi_cxCell  dw  ? ;pel columns in character cell
  viofi_cyCell  dw  ? ;pel rows in character cell
  viofi_pbData  dd  ? ;requested font table (returned)
  viofi_cbData  dw  ? ;length of caller supplied data area (in bytes)
VIOFONTINFO ends
 
EXTRN  VioGetFont:FAR
INCL_VIO            EQU 1
 
PUSH@  OTHER   RequestBlock  ;Request block
PUSH   WORD    VioHandle     ;Vio handle
CALL   VioGetFont
 
Returns WORD

http://www.edm2.com/index.php/VioGetFont