NSFont squashes my first two characters
NSFont squashes my first two characters
- Subject: NSFont squashes my first two characters
- From: Oron Cherry <email@hidden>
- Date: Sun, 09 Oct 2011 06:19:56 -0400
- Acceptlanguage: en-US
- Thread-topic: NSFont squashes my first two characters
I am trying to figure out why my string gets squashed sometimes in the first two characters.
Here's what I get: Here's what I get: http://a3.l3-images.myspacecdn.com/images02/127/4715903defac43d196c873a29fd6527d/l.jpg
Here's what I wish I could get: Here's what I wish I could get: http://a1.l3-images.myspacecdn.com/images02/148/6699adf99ae949428b97cfa74ae9e1a9/l.jpg
The following code shows the basics of what I am writing:
m_attribs is a NSMutableDictionary
...
font = [NSFont fontWithName:@"Geneva" size:10];
[m_attribs setObject:font forKey:NSFontAttributeName];
...
[m_string drawAtPoint:NSMakePoint (0,0) withAttributes:m_attribs];
"Geneva" font gives the problem shown in the above image. Other fonts such as "Helvetica" are fine.
What can be missing to make the string drawn with enough space between the first two characters and the rest? I tried to set NSFontFixedAdvanceAttribute, but then I get an unnatural spacing between all characters.
Thanks, Mr. C.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden