en:ibm:prcp:vio:getfont

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:ibm:prcp:vio:getfont [2016/02/04 10:45] – created valeriusen:ibm:prcp:vio:getfont [2016/09/15 05:08] (current) valerius
Line 1: Line 1:
 ==== VioGetFont ==== ==== VioGetFont ====
  
-**Bindings**: C, MASM +**Bindings**: [[getfont#bindings|C]][[getfont#MASM bindings|MASM]]
  
 This call returns either the font table of the size specified or the font in use.  This call returns either the font table of the size specified or the font in use. 
Line 58: Line 58:
  
 For [[en:ibm:prcp:vio:getfont|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 [[en:ibm:prcp:vio:setcp|VioSetCp]] or [[en:ibm:prcp:vio:setfont|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.  For [[en:ibm:prcp:vio:getfont|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 [[en:ibm:prcp:vio:setcp|VioSetCp]] or [[en:ibm:prcp:vio:setfont|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. 
 +
 +=== C bindings ===
 +
 +<code 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 */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +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
 +</code>