rezoner / CanvasQuery

Canvas for 2d gamedevelopers. Out of box canvas, keyboard, mouse, events.
http://canvasquery.com
586 stars 52 forks source link

text size #25

Closed alshuriga closed 10 years ago

alshuriga commented 10 years ago

How do I change the size of ".wrappedText(...)"?

rezoner commented 10 years ago

wrappedText same as fillText uses a font defined by using:

cq().font("32px Arial")

In wrapped text you can define the max allowed width wrappedText ( text, x, y, maxWidth )

To find out the exact size taken by wrapped text use textBoundaries

http://canvasquery.com/textBoundaries