如何在fyne-io/fyne中设置文本的字母间距?

huangapple go评论67阅读模式
英文:

How to set letter spacing for text in fyne-io/fyne?

问题

我使用了自定义字体,但字母间距看起来太拥挤了。

我正在尝试更改字母间距,但是我找不到配置项。
所以我想修改源代码,但是我不知道文字的字母间距是在哪里设置的。

英文:

I used a custom font, and the letter spacing looks too crowded.

I am trying to change the letter spacing, but I cannot find the configuration.
So I want to modify the source code, but I don't know where the letter spacing of text is set?

答案1

得分: 0

这是要翻译的内容:

它没有被特定地设置在任何地方,所以你找不到它。
这导致了旧的文本渲染代码和新的形状代码之间的不匹配。
在我们完全转向新的文本渲染之前,这个问题应该在2.4.0版本之前解决。

如果你查看源代码,你会发现TextDPI内部常量被设置为78,但是字形器是72DPI。
欢迎加入我们的Slack或Discord服务器/频道,链接在https://fyne.io/support/,以进行更多讨论。

英文:

It’s not set specifically anywhere, which is why you can’t find it.
This results in a mismatch between old text render code and newer shaping code.
This should be resolved before 2.4.0 as we move fully to new text rendering.

If you look into the source code you will find TextDPI internal constant set to 78 but the shaper is 72DPI.
Feel free to join our Slack or Discord servers/rooms linked at https://fyne.io/support/ to discuss more.

huangapple
  • 本文由 发表于 2023年5月10日 14:35:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/76215507.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定