-
Notifications
You must be signed in to change notification settings - Fork 480
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
文字的高度和宽度没有按比例缩放 #34
Comments
是不是有字体缩放之类的东西? |
暂时想不到原因 |
Container(
height: screenUtil.setWidth(50),
child: Text(
"周五",
strutStyle: StrutStyle(
forceStrutHeight: true,
fontSize: ScreenUtil().setSp(45),
),
style: TextStyle(color: color, fontSize: screenUtil.setSp(45)))
)
强制控制字体的高度应该可以解决你的问题 @danieldai |
@cixiu 非常感谢,我试一下 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我有一个布局需要在不同的手机上保持布局的比例,元素的高度和宽度都是用
setWidth
设置的,这在大部分元素上工作正常,但是当涉及到文字字体时,出了点问题。例如下面这段代码,在Android 1080x1920手机上显示正常,但是在 Android 1440x2960手机上,文字的底部显示不出来。(“五”字底部的那一横被截掉)
The text was updated successfully, but these errors were encountered: