Microsoft KB Archive/47061

From BetaArchive Wiki
Knowledge Base


Font Table Correction for QuickBASIC: Helvetica=21, Courier=22

Article ID: 47061

Article Last Modified on 11/21/2006

This article was previously published under Q47061

SUMMARY

The following two corrections apply to Table D.5, "Fonts Accessible from BASIC," on Page 397 of "Microsoft QuickBASIC for Apple Macintosh: Language Reference":

  1. The font number for Courier is 22 (not 21).
  2. The font number for Helvetica is 21 (not 22).

This information applies to Microsoft QuickBASIC for Apple Macintosh Version 1.00.

MORE INFORMATION

For a program that lists the names and sizes of all currently installed fonts, look for a separate article by searching on the following word:

REALFONT


The corrected table is shown below, with a few font numbers added for reference. Changes are marked with an asterisk.

   Table D.5

   Fonts Accessible from BASIC
   ---------------------------
   Font No.    Font Name
   --------    ---------

    0          System font
    1          Application font
    2          New York
    3          Geneva
    4          Monaco
    5          Venice
    6          London
    7          Athens
    8          San Francisco
    9          Toronto
   10          Seattle
   11          Cairo
   12          Los Angeles    (* Added for reference)
   20          Times          (* Added for reference)
   21          Helvetica      (* number switch)
   22          Courier        (* number switch)
                

You must run Apple's "Font/DA Mover" program (where DA=Desk Accessory) to install most of these fonts, since only a few of them are installed in the System file, which comes on the Apple System disk for your Macintosh. Note that Microsoft QuickBASIC is not shipped with System or Finder files. Font numbers are assigned by Apple.

If you CALL TEXTFONT(n) and font n is not currently installed, then QuickBASIC uses the default application font (font 1, Geneva size 12).

Below is an illustration of using various fonts. The fonts first need to be installed with Apple's Font/DA Mover program.

PRINT "This is the default application font."
CALL TEXTFONT(1)
PRINT "This is also the default application font."
CALL TEXTFONT(12)
PRINT "This is Los Angeles font."
CALL TEXTFONT(20)
PRINT "This is Times font."
CALL TEXTFONT(21)
PRINT "This is Helvetica. Helvetica is 21, not 22."
CALL TEXTFONT(22)
PRINT "This is Courier. Courier is 22, not 21. Courier is"
PRINT "      monospaced and columns should line up."
PRINT "Press any key to end."
WHILE INKEY$="" : WEND
                


Additional query words: MQuickB

Keywords: KB47061