• 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: XHTML to AttribString conversion has wrong paragraph style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XHTML to AttribString conversion has wrong paragraph style


  • Subject: Re: XHTML to AttribString conversion has wrong paragraph style
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 7 Apr 2006 13:56:37 -0700


On Apr 7, 2006, at 1:43 PM, Glen Simmons wrote:

This works, but the resulting attrib string has an NSParagraphStyle whose ParagraphSpacing is set to the same as the font size, so it ends up looking double-spaced. How do I get it to not do that?


Paragraph spacing doesn't produce a double-spaced effect; it produces space between paragraphs, not between lines. You don't say what your XHTML looks like, but the default style sheet for HTML (see <http:// www.w3.org/TR/CSS21/sample.html>) has non-zero margins for most common block elements, including <p>, and paragraph spacing is the representation in attributed string format of those margins. I suspect you would see a similar spacing if you opened your XHTML in a browser.


Try reducing the margins on your elements, either inline or with an appropriate style sheet. If you can't do that, then you'll need to postprocess the attributed string that you get.

Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >XHTML to AttribString conversion has wrong paragraph style (From: Glen Simmons <email@hidden>)

  • Prev by Date: XHTML to AttribString conversion has wrong paragraph style
  • Next by Date: testing a cocoa widget
  • Previous by thread: XHTML to AttribString conversion has wrong paragraph style
  • Next by thread: testing a cocoa widget
  • Index(es):
    • Date
    • Thread