简体   繁体   English

一种字体的一个字形没有相应地缩放

[英]One glyph of a font does not scale accordingly

I'm using a font (not mine) for writing things on an image by code.我正在使用一种字体(不是我的)通过代码在图像上写东西。

Though every glyph scales well with each other, one does not (in that particular case, the number 2).尽管每个字形都可以很好地相互缩放,但一个字形却不能(在这种特殊情况下,数字 2)。

See as the number 2 scales differently comparing to the other glyphs (top left-hand corner).与其他字形(左上角)相比,数字 2 的比例有所不同。

I don't know much about how fonts work but I tried opening it in a font editing software.我不太了解 fonts 是如何工作的,但我尝试在字体编辑软件中打开它。
However, I couldn't notice any striking difference between the number 2 and other glyphs (at first glance).但是,我没有注意到数字 2 和其他字形之间有任何显着差异(乍一看)。

Any help would be very appreciated.任何帮助将不胜感激。 Thank you!谢谢!

What is most likely happening is that the glyph for 2 in that font has hinting data that is poorly implemented.最有可能发生的情况是该字体中 2 的字形具有未充分实现的提示数据。 Hints make adjustments to outlines and how they get rasterized for particular sizes.提示可以调整轮廓以及它们如何针对特定尺寸进行栅格化。 When hints are poorly implemented, you can see really strange artefacts that change at different sizes.当提示实施不当时,您会看到非常奇怪的人工制品,它们会以不同的大小变化。

This is a risk of using free fonts: you get what you pay for.这是使用免费 fonts 的风险:一分钱一分货。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM