font substitution and NSUnarchiver
font substitution and NSUnarchiver
- Subject: font substitution and NSUnarchiver
- From: Robert Clair <email@hidden>
- Date: Thu, 17 Feb 2005 11:59:16 -0500
I store archived attributed strings in my data files.
Assume I have save a string that has the font set to, say, Optima.
If I do the following sequence of operations:
1) Start the app, no document.
2) Disable the Optima font with the FontBook.
3) open the document containing the archived Optima string
everything is fine - the system substitutes Lucida for the unavailable
font
when drawing, but it doesn't change the font attribute of the string.
If the user
edits something else and re-saves the file, the Optima string will
still be in Optima
if the file is later opened on a system that does have Optima enabled.
If I reverse the order of 1 and 2:
1) Disable the Optima font with the FontBook.
2) Start the app, no document.
3) open the document containing the archived Optima string
The the string comes out with the font attribute set to Lucida at
instant it is returned by the unarchiver. This is disastrous behavior!
If the user inadvertently re-saves the file the original font info is
now corrupted.
Is there anyway to control this ? The alternative - saving the font
info separately
myself - is fairly unpleasant.
Thanks,
Bob
_______________________________________________
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