Canvas 之文字自动换行 — Wrap text into multiple lines in HTML5 Canvas

写了一个简单的程序,来使 Canvas 里的文字在指定的宽度内自动换行。代码量很少,一看就懂了。

Here are several lines of code to make text be wrapped automatically in canvas with specified width.

参考并改进于这里

With enhancement to the artical

1 thought on “Canvas 之文字自动换行 — Wrap text into multiple lines in HTML5 Canvas”

  1. I have noticed you don’t monetize your page, don’t waste
    your traffic, you can earn additional bucks every month because you’ve got hi quality content.
    If you want to know how to make extra bucks,
    search for: Ercannou’s essential adsense alternative

Comments are closed.