Skip to content
New issue

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

文本对象显示问题 #303

Closed
SaitamaSiSi opened this issue Mar 28, 2024 · 3 comments
Closed

文本对象显示问题 #303

SaitamaSiSi opened this issue Mar 28, 2024 · 3 comments

Comments

@SaitamaSiSi
Copy link

你好,我想请教一下Idraw关于文本对象设置的问题。
image
当我如上图所示,borderWidth为0,文本框宽度为200,字号为99.9,可以完整显示两个文字内容。
image
但是当我将字号设置为100时,两个文字长度应该正好等于宽度,应该显示两个文字,但是却只显示了一个文字,是有什么内容占了1像素宽度吗?有办法可以去除吗?

@SaitamaSiSi
Copy link
Author

image
你好,我通过观察renderer/src/draw/text.ts文件中的drawText方法发现,当文字宽度正好等于框宽度时,会进入else语句中当作新的一行,是否可以在中间加入判断等于框宽度的情况,目前本地修改后测试可行。

@chenshenhai
Copy link
Member

@SaitamaSiSi 您好,感谢指出问题,本周末会修复和发布最新版本。

@chenshenhai
Copy link
Member

@SaitamaSiSi 已修复,请使用最新版本 v0.4.0-beta.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants