skip to main content

Library Routines : W$FONT

W$FONT
The W$FONT library routine provides a number of functions to manage fonts.
Note: isCOBOL can handle only TrueType fonts.
Syntax:
 CALL "W$FONT" USING opCode
Parameters:
Return code:
returnCode definition and meaning depend on the opcode.
Examples:
Example - Load the Arial font to be used on video
working-storage section.
copy "isfonts.def".  
77  wfont-status            pic s99. 
77  h-font                  handle of font.
procedure division.
  initialize wfont-data
  move "Arial" to wfont-name
  move "11"    to wfont-size
  call "w$font" using wfont-get-font, h-font, wfont-data
       giving wfont-status
  if wfont-status < 0
     display message "w$font error: " wfont-status
  end-if.
Example - Load the Arial font to be used for printing
working-storage section.
copy "isfonts.def".  
77  wfont-status            pic s99. 
77  h-font                  handle of font.
procedure division.
  initialize wfont-data
  move "Arial"             to wfont-name
  move "11"                to wfont-size
  set wfdevice-win-printer to true
  call "w$font" using wfont-get-font, h-font, wfont-data
       giving wfont-status
  if wfont-status < 0
     display message "w$font error: " wfont-status
  end-if.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left