programaticaly嵌入字体家族.docx文件 [英] programaticaly embedding Font Family in .docx file

查看:279
本文介绍了programaticaly嵌入字体家族.docx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在的docx文件中插入的字体家族(而不是系统字体)。结果
我使用的OpenXML SDK来实现这一功能。结果
不知怎的,我能以获得从一个特定的docx文件的字体信息。但是,不能嵌入字体家族在文档结果是否有可能使用代码嵌入字体中的docx文件?

I am trying to insert the font family (not system fonts) in the docx file.
I am using openxml-sdk to achieve this functionality.
Somehow I am able to get the font information from a particular docx file. But not able to embed the font family in the document
Is it possible to embed the font in a docx file using code?

推荐答案

是的,平凡的DOCX。

Yes, it trivial for docx.

MS Word中具有该[的 http://www.howtogeek.com/howto/microsoft-office/嵌入真型字体,在文字和PowerPoint中-2007-文件/]

MS Word have check-box for that [http://www.howtogeek.com/howto/microsoft-office/embed-true-type-fonts-in-word-and-powerpoint-2007-documents/].

要做到这一点编程,调查第一个简单的DOCX使用和不使用的字体,并比较的差异。

To do this programmatically, investigate first simple DOCX with and without font, and compare the differences.

FYI:DOCX它只是.zip文件,只需更改扩展名这两个文件的为.zip和比较他们的内容。如果你做到了这一点 - 不是你会看到更多的字体目录中的字体文件,还有一个XML具有对它们的引用

FYI: docx it is just .zip file, just change extension of both files to .zip and compare they content. If you done this - than you will see additional "font" directory with font files, plus one XML which have references to them.

我没有代码,请但发展人会很简单。

I don't have please of code, but developing one will be simple.

请注意,并非所有的字体许可允许嵌入,像的 http://www.word-2010.com/embedding-fonts-in-word-2010/ ,但这是另外一个问题。

Note, not all font licenses allow embedding, like http://www.word-2010.com/embedding-fonts-in-word-2010/, but this is separate question.

这篇关于programaticaly嵌入字体家族.docx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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