自行安装的字体在 UILabel 中的行高错误

发布于 2024-11-15 16:56:49 字数 237 浏览 5 评论 0原文

我在我的 iPhone 应用程序中安装了两种自定义 TTF 字体(Cardo 和 New Athena Unicode)。它们用于多行 UILabel,但由于某种原因,行高似乎很混乱:行有很多重叠。

什么可能导致这种情况?是 UILabel 的 bug 还是字体不对?如何编辑或检查 TTF 字体文件的内容?

有问题的重叠文本

I have installed two custom TTF fonts in my iPhone app (Cardo and New Athena Unicode). These are used in a multi-line UILabel, but for some reason the line height seems messed up: the lines have a lot of overlap.

What could cause this? Is it a bug in UILabel, or are the fonts not right? How can I edit or examine the contents of a TTF font file?

The overlapping text in question

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不醒的梦 2024-11-22 16:56:49

应该是字体的问题吧请尝试仅更改应用程序中使用的字体。使用附带的 iOS 字体。如果仅通过更改所使用的字体即可正确显示标签,则这是字体的问题。如果没有,请发布代码,以便我们找到问题所在。

您可以使用许多程序编辑字体,例如 Fontlab、Fontographer、TypeTool、FontForge 等。正如 BobC 在评论中提到的,可能存在许可问题。

It's probably the fonts. Please try changing only the font used in your app. Use an included iOS font. If the label displays correctly by just changing the fonts used, it is the font's fault. If not, post the code so we can track down the problem.

You can edit fonts with a number of programs such as Fontlab, Fontographer, TypeTool, FontForge, etc. As BobC mentions in a comment, there may be licensing issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文