DirectWrite:代码指向字体映射 [英] DirectWrite: code point to font mapping

查看:92
本文介绍了DirectWrite:代码指向字体映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我注意到ID2D1RenderTarget :: DrawText仍将呈现给定IDWriteTextFormat描述的字体中不可用的代码点,因此必须选择其他字体来呈现那些代码点以某种方式。有没有办法检索
用于每个代码点的字体?

I've noticed that ID2D1RenderTarget::DrawText will still render code points that are not available in the font face described by the given IDWriteTextFormat, so it must select some other font to render those code points somehow. Is there a way to retrieve the font used for every code point?

在我们的用例中,我们需要知道每个代码点使用的TTF字体文件。

In our use case, we need to know what TTF font file is used for each code point.




推荐答案

我唯一能找到的方法是IDWriteFactory2接口。这是在Windows 8.1中添加的。

The only way I can find is with the IDWriteFactory2 interface. This was added with Windows 8.1 though.

在此之前,您可能需要检查系统后备字体以查看可用的内容。

Prior to this you probably needed to check the system fallback fonts to see what is available.


这篇关于DirectWrite:代码指向字体映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆