This is the second issue for which I'm looking for an existing API call.  

I have two ranges from an NSAttributedString. I want to compare their fonts and 
attributes in such a way as to derive a dictonary containing only the 
differences. Does a font-and-attribute comparison method already exist?

What I'm thinking of writing is a function to create a dictonary and toss in 
FamilyName, PointSize, plus everything in the range's associated attributes 
dictionary. Generate one of these for each attribute range, and then just write 
a dictionary-comparison function which will return a new dictionary containing 
only those attributes which differ.

The purpose is to find out where characters in a paragraph differ from the 
paragraph's overall style, so that my XML data file can store difference ranges 
and attributes only where necessary to recreate the original, rather than 
having to store a lot of redundant information.  

—  

Charles

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to