• 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: NSTextView, NSTextStorage, NSParagraph and lineHeight
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView, NSTextStorage, NSParagraph and lineHeight


  • Subject: Re: NSTextView, NSTextStorage, NSParagraph and lineHeight
  • From: Keith Renz <email@hidden>
  • Date: Thu, 10 Oct 2002 19:43:32 -0400

Douglas,

Sorry. OS X 10.2.1, PB 2.0.1 (July 2002 Dev Tools). When I drag a selection down and then back up above where I started (one continuous movement), I get a broken selection highlight. The selection is actually correct (confirmed by dragging the selection), but the highlight is broken. Also, if I triple-click on a line, it ought to select the entire line. It does, but the highlight is never the entire line until I drag up or down.

I just did some experimenting in TextEdit. I set Courier 11pt and tightened the kerning. (This is not an issue with kerning, though.) With Courier 11pt, you cannot decrease the line spacing in TextEdit below 13pt. You can physically set it, but nothing happens to the text visually. (I suspect this is just adjusting the line spacing (leading) down to zero). I am programatically doing something different by setting the min and max line heights, which does have an effect on the vertical alignment below 13pt (unlike line spacing). So, it's not a valid comparison. But, if I copy text from my text view, whose line height I've adjusted, and paste it into a new TextEdit window, I get the exact same behavior in TextEdit as I do in my text view.

Keith

-----

On Thursday, October 10, 2002, at 06:58 PM, Douglas Davidson wrote:

On Thursday, October 10, 2002, at 03:32 PM, Keith Renz wrote:

I need to compact text in an NSTextView both horizontally (kerning) and vertically (line spacing (leading) and/or line height). The following code does what I want visually, but it really messes up the text selection highlighting. I've played with all sorts of combinations of line heights, line spacing, paragraph spacing, etc., but the highlighting problem exists whenever the line height is set to something smaller than the font's "natural" line height. Any >> ideas?

You don't say what sort of problems you're seeing, or what system version you are running. The effect of this should be reproducible in TextEdit by setting the font to Courier 11, setting the line spacing to fixed 11 pt, and tightening the kerning. I don't see obvious problems with that.

Douglas Davidson
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSTextView, NSTextStorage, NSParagraph and lineHeight
      • From: Douglas Davidson <email@hidden>
References: 
 >Re: NSTextView, NSTextStorage, NSParagraph and lineHeight (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: case-insensitive strings
  • Next by Date: Re: NSTextView, NSTextStorage, NSParagraph and lineHeight
  • Previous by thread: Re: NSTextView, NSTextStorage, NSParagraph and lineHeight
  • Next by thread: Re: NSTextView, NSTextStorage, NSParagraph and lineHeight
  • Index(es):
    • Date
    • Thread