Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!gtss!chas From: chas@gtss.UUCP (Charles Cleveland) Newsgroups: comp.sys.amiga Subject: font structures Message-ID: <196@gtss.UUCP> Date: 19 Jan 88 05:17:17 GMT Reply-To: chas@gtss.UUCP (Charles Cleveland) Organization: Georgia Tech School of Physics Lines: 50 This is about fonts and structures which indicate them. Here is a newly opened Window. Its structure has a pointer to a Rastport structure which contains a pointer to a TextFont structure. The Window also contains a pointer to its parent Screen's structure. This structure contains a pointer to a TextAttr structure along with a pointer to the Screen's Rastport structure which of course also contains a pointer to a TextFont structure. Perhaps there are other related TextAttr/TextFont structures I have overlooked. If so, I would like to know of them. I am interested in knowing how the values of these structures are related to one another. What determines Window's Rastport's TextFont when it is opened? Are the Screen's TextAttr and its Rastport's TextFont related, perhaps only during the latter's initialization? In what (possibly independent) ways are the Screen's TextAttr & its RastPort's TextFont used? For example, my Addison-Wesley Intuition Reference Manual says that a string gadget "inherits ... the font of the screen in which it appears." Well, which font is that? Can I in any way change the font for my String Gadgets without changing a default font for my entire Screen? Apart from a desire to understand the relations between these structures for future use, I simply want to set the font used by Text() in the window (ala SetFont) to that which will be use by Intuition string gadgets, regardless of the mindless antics someone may have played with SetFont or its equivalents. I would also like to know which font structure has been thereby set (or which structure it was set from) so that I can determine its size for scaling purposes. ------------- I have had embarrassingly inordinate difficulty opening a TextFont from the Screen's TextAttr structure. Apparently, (from memory) tf = (struct TextFont *)OpenFont(WindowPointer->WScreen->Font); results in a Guru with an illegal instruction error. I will shortly explore this further. Undoubtedly I am doing something stupid that invokes the Guru, but it keeps me from testing out some of the alternatives which might enable me to sort this out by myself [Lattice 3.03 -- I promise I'll upgrade soon :-)]. In the meantime I would appreciate any info about how these structures relate to one another and their uses. Perhaps that will inspire comprehension as to why my OpenFont call fails. Best regards to all. -- -Life would be so much easier if we could just look at the source code.- Charles Cleveland Georgia Tech School of Physics Atlanta, GA 30332 UUCP: ...!gatech!gtss!chas INTERNET: chas@ss.physics.gatech.edu