Account confirmers, Anti-spam team, Confirmed users, Bureaucrats and Sysops emeriti
4,925
edits
(add my humble opinion, some minor wiki markup changes.) |
(→API) |
||
Line 42: | Line 42: | ||
* taken: IMHO, if implements this as not a part of spec, mozilla should use custom context like opera, such as moz-2dtext. --[[User:Taken|Taken]] 04:56, 22 April 2006 (PDT) | * taken: IMHO, if implements this as not a part of spec, mozilla should use custom context like opera, such as moz-2dtext. --[[User:Taken|Taken]] 04:56, 22 April 2006 (PDT) | ||
* gerv: I think we should sidestep the complexity problem by implementing drawElement(), to match drawWindow(). This way we can leverage all of the text styling and handling capabilities of Gecko (left-to-right, kerning, line breaking, CSS text properties etc. etc.), encourage people to provide fallback accessible content (because the divs they are filling with text and using for drawElement() can be inside the canvas tag). It's easy enough to use, as well, and far less heavyweight than doing the same thing using drawWindow(). And I doubt you can have a transparent background on a window, anyway. You can also get the metrics you need to fit the text to wherever you want to put it, just be reading the width and height of the div. And it leverages existing code in drawWindow(). |