skip to main content

Library Routines : W$CREATEFONT

W$CREATEFONT
The W$CREATEFONT library routine loads a font into memory even if it is not installed on the host system.
Note - Fonts used on video by controls titles and more generally by controls where user input is not possible (such as grid headings) require the font to be installed in the system as their text is rendered through HTML by the Framework.
Syntax:
 CALL "W$CREATEFONT" USING fontName
Parameters:
Return code:
returnCode can be any numeric data item and provides additional information:
Examples:
Example - Enable a font from its disk .ttf file
working-storage section.
copy "isfonts.def".  
77  wfont-status            pic s99. 
77  h-font                  handle of font.
procedure division.
  call "w$createfont" using "files/fsex2p00_public.ttf"
  if wfont-status = 0
     display message "w$createfont error: " wfont-status
  end-if.
  initialize wfont-data
  move "Fixedsys Excelsior 2.00" 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.

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