Article View: comp.sys.amiga.tech
Article #1179Re: Using multiple fonts with Intuition
From: Usenet file owner
Date: Fri, 08 Sep 1989 16:04
Date: Fri, 08 Sep 1989 16:04
43 lines
1368 bytes
1368 bytes
In article <1317@jimi.cs.unlv.edu> jack@jimi.cs.unlv.edu (The Prism) writes:
Before you can use a font, you Must open it.
Since the font you want is on disk, you must load it before the
graphics.library (called by intuition) can see it.
Please note that the OpenFont call cann return a font of a different
height than you specify, if that size was not available.
struct TextFont *font;
->struct TextAttr biggerfont = {
-> "courier.font",
-> 18,
-> FS_NORMAL,
-> FPB_DISKFONT,
->};
->
->struct IntuiText IT2 = {
-> WHITE, 0,
-> JAM1, 100, 100,
-> &biggerfont,
-> "This is a test",
-> NULL,
->}
init() {
DiskfontBase=OpenLibrary("diskfont.library",version);
if(DiskfontBase==0) barf();
}
playwithfonts() {
...
font=OpenDiskFont(&biggerfont););
if(font==0) barf();
/* Now you can use your new font pointed to by "font" */
...
Closefont(font);
}
REAL NAME: Joe Porkka jap@frith.cl.msu.edu
Technical Details
Message-ID:
<4527@cps3xx.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!uxc.cso.uiuc.edu!tank!eecae!cps3xx!usenetReferences:
<1317@jimi.cs.unlv.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!uxc.cso.uiuc.edu!tank!eecae!cps3xx!usenet From: usenet@cps3xx.UUCP (Usenet file owner) Newsgroups: comp.sys.amiga.tech Subject: Re: Using multiple fonts with Intuition Message-ID: <4527@cps3xx.UUCP> Date: 8 Sep 89 16:04:35 GMT References: <1317@jimi.cs.unlv.edu> Reply-To: porkka@frith.UUCP (Joe Porkka) Organization: Michigan State University Lines: 43