• 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
Fonts getting scaled when going XHTML -> NSAttribString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fonts getting scaled when going XHTML -> NSAttribString


  • Subject: Fonts getting scaled when going XHTML -> NSAttribString
  • From: Glen Simmons <email@hidden>
  • Date: Fri, 18 Nov 2005 11:40:28 -0600

I'm creating an NSAttributedString from XHTML that includes style attributes like this:
<p><font face="Times New Roman" size="4"><span style="font-size: 16pt">Times New Roman 16</span></font></p>
The attributed string gets created with the correct font, but the size is wrong; it's increased by 33%.


Also, when I ask the attributed string for html data, it gives me this:
<p><font face="Times New Roman" size="6" style="font: 21.3px Times New Roman">Times New Roman 16</font></p>
which uses "px" instead of "pt". I need it to be "pt".


Any ideas on either of these?

Thanks,
Glen Simmons
_______________________________________________
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


  • Follow-Ups:
    • Re: Fonts getting scaled when going XHTML -> NSAttribString
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Encrypt a string
  • Next by Date: Access another application's recent document list
  • Previous by thread: Picking up Fragment Specifier
  • Next by thread: Re: Fonts getting scaled when going XHTML -> NSAttribString
  • Index(es):
    • Date
    • Thread