Default attributes when creating NSAttributedString from HTML?
Default attributes when creating NSAttributedString from HTML?
- Subject: Default attributes when creating NSAttributedString from HTML?
- From: Jim Correia <email@hidden>
- Date: Tue, 7 Mar 2006 21:30:47 -0500
The documentation for NSAttributedString says that if
NSWebPreferencesDocumentOption is unset that a default set of
preferences are used. Is that default set documented?
It appears different than the WebKit/Safari default. If I load an
unstyled HTML document into TextEdit, the basefont size appears to be
Times 12. That same document loaded into Safari results in Times 16.
Is this intentional?
By adding either of the following to the document options (in my
modified copy of TextEdit)
WebPreferences *webPreferences = [WebPreferences standardPreferences];
[options setObject: webPreferences forKey:
NSWebPreferencesDocumentOption];
-or-
[options setObject: [NSNumber numberWithFloat: 96.0/72.0f] forKey:
NSTextSizeMultiplierDocumentOption];
the basefont used ends up being identical to Safari.
Thanks,
Jim
_______________________________________________
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