粗体和普通字体渲染

发布于 2024-09-10 17:53:16 字数 203 浏览 0 评论 0原文

在 Verdana 的某些字体中观察到,粗体文本和普通文本的渲染对于给定文本并不占据相同的宽度。 在我的应用程序中,我使用了一种这样的字体,并且有带有列表和突出显示的项目的 UI。 对于突出显示的项目,字体与粗体属性相同,由于上述字体问题,当列表滚动时,文本似乎水平移动(放大并占用更多空间)。 我可以使用粗体字体,字体大小少一点,看起来不错,但并不完美 有没有什么纠正措施可以解决这个问题?

It is observed in some fonts sat Verdana, that the rendering for bold and normal text does not occupy the same width for a given text.
In my application i am making use of one such font ,and there is UI with list and highlighted item.
for highlighted item the font is same with bold attribute ,because of above mentioned font issue the text appears to move(enlarge and occupy more space )horizontally when the list is scrolled.
I can use bold font with one less in font size which seem ok but not perfect
Is there any corrective measure to resolve this?

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

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

发布评论

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

评论(2

西瓜 2024-09-17 17:53:16

您所描述的是大多数比例字体的默认属性。如果增加字符串宽度看起来很难看,请尝试使用其他视觉方法来引起对所选项目的注意,例如更改背景颜色。

What you describe is the default attribute of most proportional fonts. If having the string width increased seems ugly, try using other visual methods to draw attention to the selected item, such as changing the background color.

梦里梦着梦中梦 2024-09-17 17:53:16

您可以使列表项足够宽,以适应其变为粗体时大小的增加。

如果突出显示必须是粗体,那么您唯一的选择很可能是使用比例字体(不需要是 courier,您可能会发现一些无衬线比例字体可以接受)。

You could make the list items wide enough to accommodate size increase when it becomes bold.

If the highlight has to be bold, most likely your only option is using a proportional font (doesn't need to be courier, you may find some sans-serif proportional fonts acceptable).

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