views:

14

answers:

0

SUMMARY

  1. Create a numbered list in a NSTextView
  2. Programmatically scale the text larger (by adjusting the NSFont for the attributed string)
  3. Save the attributed string as a webarchive

When the resulting webarchive is opened in a web view, the numbers in the list appear partially off the screen (to the left). This only happens if the text is programmatically scaled larger. I'm not sure if this is an idiosyncrasy of Apple's webarchive generating code or if there's something I need to do in addition to changing the font size...

I also tried using the "NSTextSizeMultiplierDocumentOption" to scale the text (rather than changing the NSFont attribute) and the exact same problem occurred.

I've created a simple Xcode project that clearly demonstrates the problem:

http://files.me.com/robchronos/wz7oc5