baronz@caen.engin.umich.edu (Aaron L Richards) (02/19/91)
Hello all!, I am using version 2.3 of W.G.J. Langeveld's RexxArpLibrary to make a very simple notepad type word processor. In trying to get it to show different fonts, I am using RexxArpLibrary's call SetFont command to set the current font. I am using both the call Text and call WindowText to output text in a given font, but they are printing the text I ask them to print in the default font (topaz). I do not receive any errors in my code during a trace or standard execution. Here is a rough idea of the order of events in my program. call createhost call OpenWindow() call SetFont(FASTHOST, "courier.font",24) /* Are args correct?*/ call Text call WindowText /* Thought that I would cover all of the angles with both calls */ Above I haven't written out arguments for the statements for which I believe my syntax is correct. I do question whether or not my SetFont() call is correct. Is there a statement that I should be using instead of call Text or call WindowText to output my text in a different font? Thanks for your assistance, Aaron -- * President MACRO on Campus * * (Michigan's Amiga Computer Resource Organization) * * Senior Computer Consultant -> Organizational Studies Lab * * Amiga Student Representative on Campus * * baronz@caen.engin.umich.edu * * Aaron_l._Richards.ubmts.cc.umich.edu *
WGLP09@SLACVM.SLAC.STANFORD.EDU (02/20/91)
Gee, that's the first time I've heard of someone trying to use rexxarplib's SetFont. I'll have to play around, don't know if it works these days or not. I would definitely expect it to work with Text, but not with WindowText, since WindowText always uses Topaz I think. I'll try to remember to reply to you with details... Willy.
WGLP09@SLACVM.SLAC.STANFORD.EDU (02/20/91)
Okay, after playing around and consulting the documentation (aka the source code 8) I have found the following: Setfont is, um, broken. It first does an OpenFont, and if that succeeds uses the font without checking it got the right thing. Only if it *doesn't* succeed does it call OpenDiskFont. So while you can actually open different fonts (such as courier 11), you can't open the same font at a different size once another size is already in memory. Worse than that (red face) it doesn't even close the font before opening a new one! Shows you how often Setfont gets used around here, I guess... If there's ever a new version of rexxarplib, that'll be fixed, of course... Willy. ---------- Willy Langeveld - Bitnet: WGLP09 @ SLACVM - BIX: langeveld