We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
场景:项目海报生成的同一行文字,字体大小不同,根据设计稿给定位置绘制后会发生重叠 需要检测前一串文字的长度,动态计算后面文字的位置 方案:CanvasRenderingContext2D.measureText() 这个方法完美解决,而且兼容性还棒棒哒 参考:https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/measureText
The text was updated successfully, but these errors were encountered:
No branches or pull requests
场景:项目海报生成的同一行文字,字体大小不同,根据设计稿给定位置绘制后会发生重叠
需要检测前一串文字的长度,动态计算后面文字的位置
方案:CanvasRenderingContext2D.measureText() 这个方法完美解决,而且兼容性还棒棒哒
参考:https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/measureText
The text was updated successfully, but these errors were encountered: