• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Linearly Scaling Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linearly Scaling Text


  • Subject: Re: Linearly Scaling Text
  • From: Aki Inoue <email@hidden>
  • Date: Wed, 25 May 2011 14:45:04 -0700

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@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

_______________________________________________

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

  • Follow-Ups:
    • Re: Linearly Scaling Text
      • From: Ajay Sabhaney <email@hidden>
References: 
 >Linearly Scaling Text (From: Ajay Sabhaney <email@hidden>)
 >Re: Linearly Scaling Text (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Linearly Scaling Text
  • Next by Date: Re: NSStream and NSRunModalForWindow
  • Previous by thread: Re: Linearly Scaling Text
  • Next by thread: Re: Linearly Scaling Text
  • Index(es):
    • Date
    • Thread