You are right, this seems to be a bad copy/paste.
I suggest you to change your patch to be even better with this :
computedStyle.size = fontSize / 0.75;
to avoid an operation.
Cheers
> Screen shot 2009-10-15 at 21.43.38.png
> 18KAfficherTélécharger
>
>
>
> When I look into the code I find on line 534 (current trunk):
>
> } else if (style.size.indexOf('pt') != -1) {
> computedStyle.size = canvasFontSize * (4/3) * fontSize;
>
> If I dump canvasFontSize and fontSize at that point I get
>
> canvasFontSize = 12
> fontSize = 10
>
> which results in
>
> 12 * (4/3) * 10 = 160
>
> Removing canvasFontSize from the formula, seem to produce about the
> same result as the HTML reference:
>
> Screen shot 2009-10-15 at 21.44.01.png
> 12KAfficherTélécharger
>
>
>
> When I google around for conversion between pt and px I find e.g.:
http://www.mobilefish.com/tutorials/css/css_quickguide_px_pt.html:
>
> Formula
> px = pt / 0.75
>
> So I would say that my "guess" (fontSize * 4/3) would be correct
> according to this source and maybe the canvasFontSize is a type/paste-
> error/something.
>
> For what it's worth, I have also attached this in a small diff.
>
> regards,
> Christophe VG
>
> excanvas-text.html
> < 1 000AfficherTélécharger
>
> excanvas.js.diff
> < 1 000AfficherTélécharger