英文:
Flutter WebView font size is bigger than it should be
问题
I'm currently rendering this website using flutter_inappwebview
and everything works fine but I noticed some texts have bigger size than normal. This is happening throughout the app. We use rem
units to define font-size
in the css. Could this be related?
我目前正在使用 flutter_inappwebview
渲染此网站,一切都正常,但我注意到一些文本的大小比正常要大。这在整个应用程序中都发生。我们在CSS中使用 rem
单位来定义 font-size
,这可能与此有关吗?
I found android webview settings have minimumFontSize
but this problem is happening on iOS.
我发现 Android WebView 设置中有 minimumFontSize
,但这个问题发生在 iOS 上。
How it looks using Flutter Webview (ios simulator)
在Flutter Webview(iOS模拟器)上的显示方式
I already tried something like
crossPlatform: InAppWebViewOptions(
minimumFontSize: 1,
),
但我认为这只是一个真正影响 Android 设备的设置。
英文:
I'm currently rendering this website using flutter_inappwebview
and everything works fine but I noticed some texts have bigger size than normal. This is happening throughout the app. We use rem
units to define font-size
in the css. Could this be related?
I found android webview settings have minimumFontSize
but this problem is happening on iOS.
How it looks using Flutter Webview (ios simulator)
I already tried something like
crossPlatform: InAppWebViewOptions(
minimumFontSize: 1,
),
But I think this is a setting that only really affects android devices.
答案1
得分: 2
这不是一个关于Flutter/Webview的问题。事实上,在iOS的Safari应用中,您应该看到比正常情况下更大的字体。要解决这个问题,您可以参考与此问题相关的其他问题:https://stackoverflow.com/questions/62668640/why-is-font-size-different-on-ios-chrome-v-ios-safari
英文:
This is not a flutter/webview question. In fact in the safari app for iOS, you should see similar larger fonts than normal. To solve this, you can refer to other issues mentioned around this issue:
https://stackoverflow.com/questions/62668640/why-is-font-size-different-on-ios-chrome-v-ios-safari
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论