Re: XHTML to AttribString conversion has wrong paragraph style
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