skip to main content

Library Routines : W$FONT : WFONT-GET-FONT

WFONT-GET-FONT
The WFONT-GET-FONT function loads a specific font. The font is loaded only if it matches exactly the characteristics requested.
In thin client environment, if the font exists on the server and the server has graphical interface, then the font is loaded both client and server side. This allows to use the font also for PDF print jobs created server-side (see WINPRINT-SET-PRINTER-AS for details).
Syntax:
 CALL "W$FONT" USING WFONT-GET-FONT
Parameters:
01  wfont-data.
    03 wfont-face-data.
       05 wfont-device                 handlevalue null.
          88 wfdevice-console          value null.
          88 wfdevice-printer          value 1.
       05 wfont-name                   pic x(33).
       05 wfont-char-set               pic x comp-x.
       05 wfont-size                   pic x comp-x.
       05 wfont-bold-state             pic x comp-x.
          88 wfont-bold                value 1false zero.
       05 wfont-italic-state           pic x comp-x.
          88 wfont-italic              value 1false zero.
       05 wfont-underline-state        pic x comp-x.
          88 wfont-underline           value 1false zero.
       05 wfont-strikeout-state        pic x comp-x.
          88 wfont-strikeout           value 1false zero.
       05 wfont-pitch-state            pic x comp-x.
          88 wfont-fixed-pitch         value 1false zero.
       05 wfont-family                 pic x comp-x.
    03 wfont-choose-data.
       05 wfont-choose-flags           pic x comp-x.
       05 wfont-choose-min-size        pic x comp-x.
       05 wfont-choose-max-size        pic x comp-x.
       05 wfont-choose-red             pic x comp-x.
       05 wfont-choose-green           pic x comp-x.
       05 wfont-choose-blue            pic x comp-x.
       05 wfont-choose-color-num       pic x comp-x.
    03 wfont-angle                     pic x(2comp-x.
    03 wfont-scale-x                   float value 0.
    03 wfont-scale-y                   float value 0.
Note - members not mentioned below are not used by this function.
When wfdevice-console is set to true, the function will load a font for the current screen configuration.
When wfdevice-printer is set to true, the function will load a font for the current printer configuration.
When wfont-bold is set to true, the font will be bold.
When wfont-italic is set to true, the font will be italic.
When wfont-underline is set to true, the font will be underlined.
When wfont-strikeout is set to true, the font will be stricken out.
When wfont-fixed-pitch is set to false, the function will load fonts with both fixed or variable pitch.
It is the scale factor on the X coordinate. A value of 0 or 1 means that no scale is performed. This setting should be used only for print fonts (wfont-device = wfdevice-printer) that are not rotated (wfont-angle = 0), otherwise the effects are unpredictable.
It is the scale factor on the Y coordinate. A value of 0 or 1 means that no scale is performed. This setting should be used only for print fonts (wfont-device = wfdevice-printer) that are not rotated (wfont-angle = 0), otherwise the effects are unpredictable.
Return code:
returnCode can be any signed numeric data item and provides additional information:

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