编写字体查看器 - 获取字体属性,动态加载 ttf [英] writing a font viewer - getting font properties, loading ttf dynamically
问题描述
我正在尝试使用 VB6/VB5 代码(在 Windows 下)为 TrueType/OpenType 字体编写字体查看器.
I'm trying to write a font viewer for TrueType / OpenType fonts with VB6 / VB5 code (under Windows).
出奇的困难:
1) 在 VB/winAPI 中,我没有找到如何提取字体名称或一般字体属性.
1) in VB / winAPI, i did not find how to extract the font's name, or font properties in general.
2) 我可以安装字体(使用 AddFontResource API 函数),但必须卸载它.但是,虽然 (AddFontResource" 需要 pathname,但删除字体需要字体的 name,我不知道.
2) i can install the font (using AddFontResource API function), but then have to uninstall it. However, while (AddFontResource" expects a pathname, removing the font requires the font's name which is unknown to me.
有没有办法使用未安装的字体 ttf)?
is there a way to use an non-installed font ttf) ?
有没有办法使用 vb6 提取字体的属性?
is there a way to extract a font's properties using vb6 ?
(我可以用 wxPython 编写程序,但我对 Python 字体的了解甚至比 VB 还要少)
(I can write the program in wxPython but i know even less about fonts in python than with VB)
推荐答案
您可以使用 FreeType 库.
这篇关于编写字体查看器 - 获取字体属性,动态加载 ttf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!