Also, you should disable screen font substitution via -[NSLayoutManager 
setUsesScreenFont:NO].

This is the main source of glyph advancement differences you're seeing.

Aki

On 2011/05/25, at 14:41, Douglas Davidson wrote:

> 
> On May 25, 2011, at 2:37 PM, Ajay Sabhaney wrote:
> 
>> - Instead of trying to scale text linearly, use a transformation to scale 
>> the NSTextView and image representation appropriately.  While this is easy 
>> to do with an image, I am having some issues scaling an NSTextView.  I've 
>> tried subclassing NSTextView, then in the drawRect method, I apply an affine 
>> transformation, then call the super's drawRect.  This almost works, except 
>> the caret acts as if no transformation was applied - it's size and position 
>> are unchanged even though the text is not.  I've also tried using the NSView 
>> method scaleUnitSquareToSize: - however this produces fuzzy text.
> 
> Try taking a look at the source code for TextEdit--it's available as sample 
> code, and it gives an example of scaling for NSTextViews.
> 
> Douglas Davidson
> 
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/aki%40apple.com
> 
> This email sent to [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to