Re: Best way to compare NSParagraphStyles?
Re: Best way to compare NSParagraphStyles?
- Subject: Re: Best way to compare NSParagraphStyles?
- From: Douglas Davidson <email@hidden>
- Date: Wed, 4 Oct 2006 14:04:14 -0700
On Oct 4, 2006, at 1:56 PM, Keith Blount wrote:
I do this by comparing the NSParagraphStyle in the
typing attributes dictionary with the paragraph styles
in the attributes inside my preset dictionary. This
works fine until a file is saved to disk (as RTFD) and
then reloaded. Once this happens, it seems that the
reloaded text is no longer the same as it used to be.
For instance, the paragraph style's first line head
indent and normal head indent can be off by a
fraction. Also, NSLeftTextAlignment can become
NSNaturalTextAlignment after a save and load (and I
bet this could also happen to NSRightTextAlignment
where that was natural for the used script).
These and other imprecisions are related to peculiarities of the RTF
format. For example, RTF stores many length measurements as integral
multiples of 1/20 of a point, colors as 24-bit RGB, etc. If you know
that you are going to be using RTF, then you can account for these
individually, as you have been doing.
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