CALL "W$CREATEFONT" USING ttfName fontLogicalName GIVING returnCode |
ttfName | PIC X(n) | Specifies the physical file name of the font resource. It must include the file extension. Unless the file has been included in the program class file through the COPY RESOURCE statement, the framework will look for the file on disk. During the search on disk, if ttfName specifies relative pathname, the framework will resolve the relative pathname in the current working directory. In a thin client environment the disc file is searched on the server and the font resource is then available on both server side and client side. |
fontLogicalName | PIC X(n) | Receives the logical name to be used with the WFONT-GET-FONT function. |
0 | Operation failed. |
1 | Operation successful. |
working-storage section. copy "isfonts.def". 77 wfont-status pic s99. 77 h-font handle of font. procedure division. main. call "w$createfont" using "files/fsex2p00_public.ttf" "Fixedsys Excelsior 2.00" giving wfont-status if wfont-status = 0 display message "w$createfont error: " wfont-status goback 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 goback end-if. ... |