#OpenDiskFont()
I wanted to specify a text font and size in a program under development. So I
(successfully) open diskfont.library and save its address as DFLbase. Then I
attempt to open the font, with the following code:
move.l ascfont,a0 my TextAttr structure
move.l DFLbase,a6
SYS OpenDiskFont(a6)
move.l d0,txtfnt
beq close [Followed by the rest of the program] [Then down in the data
section I have this:]
cnop 0,2 ascfont: dc.l fontname fntheight: dc.w 18
dc.b 0,1 ta_Style(0=normal),ta_Flags(1=on disk) fontname:
dc.b 'times.font',0
cnop 0,2
I compile with CAPE2.5, and run the program from RAM: in WShell. OpenDiskFont
fails, and the program closes neatly without doing anything.
I have tried other fontnames. Noticing that "times.font" is not in Fonts: I
tried just "times." I have also tried "topaz.font," as in the examples in RKM
_Libraries_, even though there is no "topaz.font" in Fonts:. And I have tried
some things that are listed as "xxx.font" in Fonts:, all to no avail. Can
anyone see what I am doing wrong?
Thanks for reading this.
Bart Mathias