Ian Martin said the following at 10/06/2011 04:08 AM : > Sorry about the delay. > Not a problem at all... I'm fitting this project in spare time and as it happens I have had zero of that (spare time) this week. And I definitely appreciate all the help I can get. >> Ian Martin said the following at 10/02/2011 06:52 PM : >> <example elided> We're getting a bit away from the original question now, because now we're talking about attributes (which I'm sure will be useful to know about later, so it's not at all wasted information), but the original request was about discovering what font is actually loaded when some particular font is requested. The actual case that I am struggling with is that "Courier New" is requested, but the system doesn't have Courier New available. So *some* font is loaded, and I know it's not Courier New -- and in fact it's a monospaced font, so something somewhere seems to be smart enough to know that Courier New is monospaced even though it's not available, and then performs a match to find a monospoaced font that is available -- but I haven't figured out yet which font is being used. I could doubtless discover the answer manually by simply looking carefully at all the monospaced fonts and comparing them to what override_font() is loading, but it seemed a lot more elegant to ask programatically what font actually got loaded. And that's where I got stuck, since there doesn't seem to be a function that simply provides a description of the font that was actually loaded. I interpreted your original message to say that I should call get_attributes() and look at the family name. But, as I said, the documentation seems to suggest (and so does your most recent e-mail) that get_attributes() simply returns what was set with set_attributes() ... but if that's true then it can't possibly give me information I don't already have, such as the name of the font that's actually in use. Maybe I'll get time to experiment later today (I live in hope of time expanding :-) ). Doc -- Web: http://www.sff.net/people/N7DR
Attachment:
signature.asc
Description: OpenPGP digital signature