如何将 Mac 字体映射到 Windows 字体
我需要在 Windows 计算机上显示来自 mac 的文件。
mac 文件中的字体名称是“Helvetica”。
Windows 没有 Helvetica,但有“Arial”,这是最接近的。 但是,如果我将“Helvetica”传递给 WPF 控件,则字体系列将被忽略。
如何以编程方式从 Windows 上的“Helvetica”获取最接近的字体?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
它们实际上是不同的字体,尽管差异很细微。 与任何痴迷的平面设计师交谈,他或她可能会开始抱怨 Arial 的自卑。 天哪,他们甚至还用它拍了一部电影。
http://www.helveticafilm.com/
这就是为什么没有“映射”的原因。 因为它们完全不同。 您必须想出自己的方式来选择要使用的字体(也就是说,您必须检测您拥有的字体,然后使用从操作系统获得的字体)。
They are actually different fonts, though the difference is subtle. Talk to any obsessed graphic designer and he or she will probably start ranting about Arial's inferiority. Hell, they even made a movie out of it.
http://www.helveticafilm.com/
So that's why there's no "mapping". Because they're just plain different. You'll have to come up with your own way of choosing which font you want to use (that is, you'll have to detect what you have and then use what you get from the OS).
某些字体包含嵌入的 PANOSE 编号,该编号可以直观地对字体进行分类,并可用于匹配相似的字体。 Windows 的“字体”文件夹使用它来按相似性列出字体。 但是,我不确定它的支持范围有多大。
据推测,您需要知道特定 Helvetica 字体的 PANOSE 编号,以便从您已安装的字体中找到近似匹配的字体。
请参阅 Wikipedia 上的 PANOSE 和 使用 PANOSE 编号。
Some fonts contain an embedded PANOSE number, which classifies fonts visually and can be used to match similar fonts. It's what Windows' Fonts folder uses to list fonts by similarity. However, I'm not sure how widely supported it is.
Presumably, you'd need to know a particular Helvetica font's PANOSE number in order to find the near matches from the fonts you have installed.
See PANOSE on Wikipedia and MSDN Library page on Using PANOSE Numbers.
或许可以将 Helvetica 转换为 Windows 格式,例如 transtype
然后您可以将该字体嵌入到您的 wpf 应用程序中。
不过,您在许可方面可能还很粗略!
codestyle.org 上有一个非常好的字体堆栈生成器,我在博客中介绍了如何使用它http://devsigner.co.uk/creating-a-good-css-font-stack/
希望这有帮助!
it may be possible to convert Helvetica into a windows something like transtype
you could then embed the font into your wpf app.
You may be on very sketchy ground in terms of licensing though!
There's a very good font stack generator over at codestyle.org, I've blogged about how to use it here http://devsigner.co.uk/creating-a-good-css-font-stack/
hope this helps!
这里有一些与 Helvetica 类似的信息,也许您可以将它们安装在您的 Windows 计算机上。 如果您担心与其他机器的兼容性,则不能使用它,因为它不会在其机器上显示字体(我相信它会默认为某种特定字体,可能是 Arial 或 Times)。
There's some information about some Helvetica look-alikes here, maybe you could install these on your Windows machine. If you're worried about compatibility with other machines, you can't use this though, as it won't display the font on their machines (I believe it will default to some specific font, perhaps Arial or Times).