[whatwg] Canvas lack of drawString method (p.s.)
Stefan Haustein
sh at kobjects.org
Tue Oct 17 15:42:31 PDT 2006
James,
the second image exposes exactly the problem that an alignment parameter
would solve:
"TR" and "1/2pi" could be drawn aligned "baseline right" to the
references point on the y-axis.
"0.97" and "pi" could be drawn aligned "top center" to the reference
points on the x-axis.
The badly rendered example image looks like single characters are placed
at fixed positions out of context.
Of course, this will lead to problems not only when the fonts are
substituted, but also for the slight differences in font sizes...
Best regards,
Stefan
James Graham wrote:
> Stefan Haustein wrote:
>> p.s.: To simplify coping with changing font sizes, it probably makes
>> sense to add an "align" parameter (left|center|right
>> top|center|baseline|bottom) to the drawString call...
>
> How does that solve the font substitution problem? This is a real
> problem that people actually have with exactly the use cases you
> propose (e.g. [1]).
>
> [1] http://golem.ph.utexas.edu/~distler/blog/archives/000888.html
More information about the whatwg
mailing list