• 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: Best way to compare NSParagraphStyles?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Best way to compare NSParagraphStyles? (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: Stopping double clicking of a file
  • Next by Date: Re: How do I know when my Core Data app is up and running?
  • Previous by thread: Best way to compare NSParagraphStyles?
  • Next by thread: Re: Best way to compare NSParagraphStyles?
  • Index(es):
    • Date
    • Thread