en:docs:fapi:viosetfont

Differences

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

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:viosetfont [2021/09/05 03:14] – created prokusheven:docs:fapi:viosetfont [2021/11/04 12:36] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +
 +====== VioSetFont ======
 +
 This call downloads a display font. The font being set must be compatible with the current mode. This call downloads a display font. The font being set must be compatible with the current mode.
  
-==Syntax==+===== Syntax ===== 
 +<code c>
  VioSetFont (RequestBlock, VioHandle)  VioSetFont (RequestBlock, VioHandle)
 +</code>
 +===== Parameters =====
 +
 +  * RequestBlock ([[PVIOFONTINFO]]) - input: Address of the font structure containing the request.
 +  * VioHandle ([[HVIO]]) - input: Reserved word of 0s.
 +
 +===== Return Code =====
 +
 +rc (USHORT) - return:Return code descriptions are:
  
-===Parameters=== +  *0 NO_ERROR 
-;RequestBlock (P[[VIOFONTINFO]]) - input: Address of the font structure containing the request. +  *355 ERROR_VIO_MODE 
-;VioHandle ([[HVIO]]) - input: Reserved word of 0s.+  *421 ERROR_VIO_INVALID_PARMS 
 +  *436 ERROR_VIO_INVALID_HANDLE 
 +  *438 ERROR_VIO_INVALID_LENGTH 
 +  *465 ERROR_VIO_DETACHED 
 +  *467 ERROR_VIO_FONT 
 +  *468 ERROR_VIO_USER_FONT 
 +  *494 ERROR_VIO_EXTENDED_SG
  
-==Return Code== +===== Remarks =====
-;rc (USHORT) - return:Return code descriptions are: +
-*0 NO_ERROR +
-*355 ERROR_VIO_MODE +
-*421 ERROR_VIO_INVALID_PARMS +
-*436 ERROR_VIO_INVALID_HANDLE +
-*438 ERROR_VIO_INVALID_LENGTH +
-*465 ERROR_VIO_DETACHED +
-*467 ERROR_VIO_FONT +
-*468 ERROR_VIO_USER_FONT +
-*494 ERROR_VIO_EXTENDED_SG+
  
-==Remarks== 
 VioSetFont is applicable only for the enhanced graphics adapter, VGA or IBM Personal System/2 Display Adapter. VioSetFont is applicable only for the enhanced graphics adapter, VGA or IBM Personal System/2 Display Adapter.
  
-;Note: Although graphics mode support is provided in VioSetFont, this support is not provided by the Base Video Handlers provided with OS/2.+Note: Although graphics mode support is provided in VioSetFont, this support is not provided by the Base Video Handlers provided with OS/2.
  
 When VioSetFont is issued, the current code page is reset. If [[VioGetCp]] is subsequently issued, the error code ERROR_VIO_USER_FONT is returned. Return code, ERROR_VIO_USER_FONT represents a warning. It indicates that although the font could not be loaded into the adapter using the current mode, the font was saved as part of a special user font code page for use with a later [[VioSetMode]]. Successfully setting a user font sets the special user font code page, just as if a code page of -1 was specified using [[VioSetCp]]. When VioSetFont is issued, the current code page is reset. If [[VioGetCp]] is subsequently issued, the error code ERROR_VIO_USER_FONT is returned. Return code, ERROR_VIO_USER_FONT represents a warning. It indicates that although the font could not be loaded into the adapter using the current mode, the font was saved as part of a special user font code page for use with a later [[VioSetMode]]. Successfully setting a user font sets the special user font code page, just as if a code page of -1 was specified using [[VioSetCp]].
Line 31: Line 40:
 The special code page is used in the same way as those code pages specified on the CODEPAGE = statement in CONFIG.SYS. The special code page is used in the same way as those code pages specified on the CODEPAGE = statement in CONFIG.SYS.
  
-==Bindings== +===== Bindings ===== 
-===C=== + 
-<PRE>+====C==== 
 +<code c>
 typedef struct _VIOFONTINFO{ /* viofi */ typedef struct _VIOFONTINFO{ /* viofi */
   USHORT  cb;                /* length of this structure */   USHORT  cb;                /* length of this structure */
Line 51: Line 61:
  
 USHORT           rc;            /* return code */ USHORT           rc;            /* return code */
-</PRE>+</code>
  
-===MASM=== +====MASM==== 
-<PRE>+<code asm>
 VIOFONTINFO struc VIOFONTINFO struc
   viofi_cb      dw  ? ;length of this structure   viofi_cb      dw  ? ;length of this structure
Line 72: Line 82:
  
 Returns WORD Returns WORD
-</PRE>+</code>
  
-==Related Functions== +===== Related Functions ===== 
-*[[VioGetFont]]+ 
 +[[VioGetFont]]
  
 [[http://www.edm2.com/index.php/VioSetFont]] [[http://www.edm2.com/index.php/VioSetFont]]
 +
 +{{page>en:templates:fapi}}