Visible to Intel only — GUID: GUID-B2F872C7-5C9D-4206-91CF-970AA92BD757
Special Naming Convention for Certain QuickWin and Windows* Graphics Routines
Comparing QuickWin with Windows*-Based Applications
Using Windows API Routines with QuickWin
Types of QuickWin Programs
The QuickWin User Interface
USE Statement Needed for Fortran QuickWin Applications
Creating QuickWin Windows
Using QuickWin Graphics Library Routines
Selecting Display Options
Checking the Current Graphics Mode
Setting the Graphics Mode
Setting Figure Properties
Understanding Coordinate Systems
Adding Color
Writing a Graphics Program
Displaying Graphics Output
Storing and Retrieving Images
Customizing QuickWin Applications
QuickWin Programming Precautions
Simulating Nonblocking I/O
Visible to Intel only — GUID: GUID-B2F872C7-5C9D-4206-91CF-970AA92BD757
SHOWFONT.F90 Example
The program SHOWFONT.F90 displays text in the fonts available on your system. (Once the screen fills with text, press Enter to display the next screen.) An abbreviated version follows. SHOWFONT calls SETFONT to specify the typeface. MOVETO then establishes the starting point for each text string. The program sends a message of sample text to the screen for each font initialized:
! Abbreviated version of SHOWFONT.F90. USE IFQWIN INTEGER(2) grstat, numfonts,indx, curr_height TYPE (xycoord) xyt TYPE (fontinfo) f CHARACTER(6) str ! 5 chars for font num ! (max. is 32767), 1 for 'n' ! Initialization. numfonts=INITIALIZEFONTS( ) IF (numfonts.LE.0) PRINT *,"INITIALIZEFONTS error" IF (GRSTATUS().NE.$GROK) PRINT *,'INITIALIZEFONTS GRSTATUS error.' CALL MOVETO (0,0,xyt) grstat=SETCOLORRGB(#FF0000) grstat=FLOODFILLRGB(0, 0, #00FF00) grstat=SETCOLORRGB(0) ! Get default font height for comparison later. grstat = SETFONT('n1') grstat = GETFONTINFO(f) curr_height = f.pixheight ! Done initializing, start displaying fonts. DO indx=1,numfonts WRITE(str,10)indx grstat=SETFONT(str) IF (grstat.LT.1) THEN CALL OUTGTEXT('SetFont error.') ELSE grstat=GETFONTINFO(f) grstat=SETFONT('n1') CALL OUTGTEXT(f.facename(:len_trim(f.facename))) CALL OUTGTEXT(' ') ! Display font. grstat=SETFONT(str) CALL OUTGTEXT('ABCDEFGabcdefg12345!@#$%') END IF ! Go to next line. IF (f.pixheight .GT. curr_height) curr_height=f.pixheight CALL GETCURRENTPOSITION(xyt) CALL MOVETO(0,INT2(xyt.ycoord+curr_height),xyt) END DO 10 FORMAT ('n',I5.5) END
Parent topic: Using Fonts from the Graphics Library