|
From: | Fred Kiefer |
Subject: | Re: System fonts |
Date: | Sat, 28 Aug 2004 03:01:42 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 |
Adrian Robert wrote:
To still be able to display as many characters as possible on the output device the Cocoa specification relies on the method [NSMutableAttributeString fixFontAttributeInRange:] to correct the font assigned to a character and on the text system, which should generate an exisiting glyph for one or multiple characters by selecting an apropriate font.Some of this is currently missing in GNUstep, which really is a shame (and not the great fontconfig implementation in xlib by Derek Zhou). If you really need this functionality don't complain about the NSFont implementations, sit down and write this missing code.I assume you are referring to this?http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ Java/Classes/NSMutableAttributedString.html#//apple_ref/doc/uid/ 20000526/fixFontAttributeInRange_NSMutableAttributedString
Yes.
When does this method get called, however? Is there some Cocoa best practice for apps to call fixFontAttributeInRange before displaying text, or is this done automatically within AppKit itself?
Yes the later, it is called from fixAttributesInRange:, which again gets called from [NSTextStorage invalidateAttributesInRange:].
Where do the "default fonts" to be substituted in times of need get specified?There is a method on NSFont called setPreferredFontNames:. So far things are implemented, but the rest, and this is a big gap, is missing. In Cocoa there is now a new method [NSFont coveredCharacterSet] which could be helpful in implementing font substitution. The main problem is not to implement it somehow, but to get it fast enough right from the start. If font substitution or even just the check, if it is needed take to much time, the whole GNUstep text system will be come unusable.
[Prev in Thread] | Current Thread | [Next in Thread] |