【问题标题】:Is it possible for an Android and iOS app to display the exact same font?Android 和 iOS 应用程序是否可以显示完全相同的字体?
【发布时间】:2019-03-12 14:09:16
【问题描述】:

如果我有一个来自 Android 的 TextView 并给它一个自定义字体。然后从 iOS 获取一个 UITextView/UILabel 并给它相同的自定义字体。

两个操作系统显示的字体是否完全相同?

我能否在两个平台上截取屏幕截图(确保分辨率和屏幕尺寸相同),并且能够将文本相互叠加而不重叠?

【问题讨论】:

  • 您也可以在 iOS 和 android 平台上使用自定义字体。
  • 是的!您可以使用自定义字体文件在 android 和 iOS 中显示准确的字体。

标签: android ios fonts


【解决方案1】:

您需要为android和ios都使用特定字体的.ttf文件,然后才能在两个操作系统中显示相似的字体。

请参考以下链接以获取 ios 和 android:- https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app

Where should I put the "ttf" files in an Android project?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-27
    • 2016-04-11
    • 2012-05-01
    • 2018-11-27
    相关资源
    最近更新 更多