本文介绍了CoreText是否支持Small Caps?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果字体没有该功能,CoreText是否可以选择字体的SmallCaps变体或合成小字幕?我在CoreText文档中找不到任何关于小型大写字母的内容,尽管有处理字体变体/功能的工具。有人做过类似的事吗?

Does CoreText have any facility for selecting a SmallCaps variant of a font, or for synthesizing small caps if the font doesn't have that feature? I can't find anything in the CoreText documentation that talks about small caps, though there are facilities for dealing with font variations/features. Has anyone done anything similar to this?

推荐答案

一般来说最简单的方法是使用 CTFontDescriptorCreateCopyWithFeature 。正如您在自己的回答中提到的,这仅适用于实际实现您请求的功能的字体。

It's generally easiest to use CTFontDescriptorCreateCopyWithFeature. As you mentioned in your own answer, this will only work for fonts that actually implement the feature you are requesting.

这篇关于CoreText是否支持Small Caps?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 14:53