.net 如何更改字体的元数据(特别是标题)?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5930217/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 15:33:01  来源:igfitidea点击:

How do I change a font's metadata (specifically a title)?

.netfontstrue-type-fonts

提问by Jarrett

I need a way to dynamically change the name of a font, and I cannot find a way to do so in .net. I am not concerned about the font file type, so otf, fon, ttf are all open.

我需要一种动态更改字体名称的方法,但在 .net 中找不到这样做的方法。我不关心字体文件类型,所以otf,fon,ttf都是打开的。

Things I've tried:

我尝试过的事情:

  1. Using dsofile.dll / OleDocument Properties Reader. These are not the same properties used by whatever accesses the name of fonts.
  2. Changing the name directly in the registry.
  1. 使用 dsofile.dll / OleDocument 属性阅读器。这些与访问字体名称的任何人使用的属性不同。
  2. 直接在注册表中更改名称。

I've read that .fon files are just dlls in disguise, (one example), so perhaps that is a way to get to it?

我读过 .fon 文件只是伪装的 dll,(一个例子),所以也许这是一种方法?

回答by M. Junaid Salaat

  • Import your font file in the online Glyphrstudio font editor
  • Click the hamburger icon on the top left
  • Select font settingand change title and meta data from there

Hope it helps.

希望能帮助到你。

回答by rickchristie

To change the font name, you will have to open the font with a real font editor and rename it, then re-export it to the format you need.

要更改字体名称,您必须使用真正的字体编辑器打开字体并重命名,然后将其重新导出为您需要的格式。

Install FontForgeand then you can open the font from your computer and using "Font Info"under the "Element"menu, you can change the font metadata, including the font name and font family.

安装FontForge,然后您可以从您的计算机打开字体并使用元素”菜单下的“字体信息”,您可以更改字体元数据,包括字体名称和字体系列。

回答by Keith

FontForge Does not allow you to open fonts you have saved to a different HDD. I NEVER save anything to my C: drive, and FontForge only searches C:, in particular I think the Default search folder is Documents.

FontForge 不允许您打开已保存到不同 HDD 的字体。我从不将任何内容保存到我的 C: 驱动器,并且 FontForge 只搜索 C:,特别是我认为默认搜索文件夹是 Documents。