Re: error converting HTML into an attributed string
Re: error converting HTML into an attributed string
- Subject: Re: error converting HTML into an attributed string
- From: Rob Keniger <email@hidden>
- Date: Tue, 20 Nov 2007 11:14:16 +1000
On 20/11/2007, at 10:11 AM, Mark Sanvitale wrote:
<ilayer style="font-family: Courier;font-size: 20pt;color:
rgb(51,139,213);">
i.e. an inconsequential HTML tag that includes inline CSS properties
in order to specify the look of the text. The problem is that the
font size in the CSS does not result in an equivalent size in the
resulting attributed string. In this example, the resulting font
size is 27 (20 * 1 1/3 = 26.66666 = 27 with rounding).
(NOTE: I am in control of the HTML that my code is converting, so
if there is some way to fix this problem through a change to the
HTML then that will suffice.)
The problem is that point units in CSS are problematic, I recommend
simply converting all the point measurements to pixels:
<ilayer style="font-family: Courier;font-size: 20px;color:
rgb(51,139,213);">
This will probably give you the output you want.
BTW, ilayer is an extremely old deprecated element, I assume this is
legacy code because it is definitely no longer supported.
--
Rob Keniger
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden