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

【BUG】Hilo.Text创建的文本在IOS/安卓下展示不一致 #160

Open
lmzhu opened this issue Mar 24, 2020 · 1 comment
Open

【BUG】Hilo.Text创建的文本在IOS/安卓下展示不一致 #160

lmzhu opened this issue Mar 24, 2020 · 1 comment

Comments

@lmzhu
Copy link

lmzhu commented Mar 24, 2020

调试发现,安卓下canvas.fillText绘制的文本line-height强制为1
IOS下强制为normal
不得不在使用的时候做适配
const createHiloFontSize = (fontSize) => `${fontSize}px/${isIOS() ? 'normal' : `${fontSize}px`}`;
建议优化Hilo.Text.measureFontHeight 方法来修复问题

@wickedcode01
Copy link

字体大小怎么控制,setFont设置根本没用啊。。

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