Re: REPOST: disabling ligatures & implicit font changes
Re: REPOST: disabling ligatures & implicit font changes
- Subject: Re: REPOST: disabling ligatures & implicit font changes
- From: Cryx <email@hidden>
- Date: Thu, 9 May 2002 21:00:24 -0500
On Thursday, May 9, 2002, at 07:42 PM, Andy wrote:
Cryx wrote:
Am I doing some wrong, or are the documented ligature methods really
no-ops?
On Saturday, May 4, 2002, at 11:38 PM, Cryx wrote:
Unless I explicitly set the attribute NSFontAttributeName on all
attributed strings that I append to the view, certain characters
(probably unrenderable in the current font, but that's fine in my
case)
will cause unwanted font changes to dark gray "Hiragino Kaku Gothic
Pro"?! What is the best and/or most efficient way to prevent this
behaviour?
I'm sorry I can't answer your ligatures question, but yes, the font
substitution is normal, and annoying.
Most of us detect it's happened and reject the result.
I'm curious about the "Unless I explicitly set the attribute
NSFontAttributeName" part... you have a method for getting the
substitution not to happen? I'd like to see how you do that.
I maintain a dictionary, which contains NSFontAttributeName, and use
initWithString:attributes: to create an attributed string (using that
dictionary) that is later appended to the view's text storage. If you
don't need to manipulate other values like I do,
addAttribute:value:range: might be more sensible.
It's documented under the Attributed Strings topic, Accessing Attributes
tasks.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.