Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: newcon, setfont questions Summary: Keep for your notes file Message-ID: <98492@sun.Eng.Sun.COM> Date: 11 Apr 89 22:03:24 GMT References: <2111@pur-phy> <6561@cbmvax.UUCP> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Distribution: comp.sys.amiga Organization: Sun Microsystems, Mountain View Lines: 32 In article <2111@pur-phy>, (Timothy Lee Meisenheimer) writes: > I use courier 13 (font) all the time ... Xoper ... shows the > courier font ... listed THREE times... In article <6561@cbmvax.UUCP> daveh@cbmvax.UUCP (Dave Haynie) remarks: [Essentially that he uses fonts correctly in SetFont 2.5 so that shouldn't be the cause. ] Here is a word of warning for folks that use fonts in their programs other than the ROM fonts. How you open a font is _very_ important. You should always use the sequence : tf = OpenFont(&font_i_want); if (! tf) { tf = OpenDiskFont(&font_i_want); if (! tf) { WarnTheUser("Can't get your font."); optional_exit(); } } Many programs simply call OpenDiskFont() first which does not check the in memory font lists and instead does just what it's name implies, opens the font from disk. This is arguably a bug, however since using it in the above manner will cause it to work correctly, if you are using non-ROM fonts you should note this behaviour. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you. "A most excellent barbarian ... Genghis Kahn!"