You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am attempting to embed TTF fonts in a DOCX file. In order to be compatible with a third-party library that is able to update the Table of Contents page, it appears I must also provide a value for the EmbedRegularFont.FontKey property. However, supplying a value for the FontKey elicits an error from Microsoft Word and the embedded fonts are no longer presented in the application. The Open XML SDK Productivity tool also elicits an error.
Am I supplying erroneous values for FontKey? Where would I find the correct values?
Screenshots
Word error:
Word found unreadable content in "report.docx". Do you want to recover the contents of this document? If you trust the source of this document, click Yes.
Word error, after clicking "Yes":
Word experienced an error trying to open the file. Try these suggestions. * Check the file permissions for the document or drive. * Make sure there is sufficient free memory and disk space. * Open the file with the Text Recovery Converter.
Open XML SDK 2.5 Productivity Tool for Microsoft Office error:
Cannot open the file: Specified part does not exist in the package.
To Reproduce
// Please add a self-contained, minimum viable repro of the issue.
// If you require external resources, please provide a gist or GitHub repro
// An Xunit style test is preferred, but a console application would work too.
I suspect the error messages elicited by Word and the productivity tool are appropriate. The third-party library I was referring to in the original report claims to have addressed whatever was requiring the FontKey to be provided. I have not had the time to verify this, yet.
Describe the bug
I am attempting to embed TTF fonts in a DOCX file. In order to be compatible with a third-party library that is able to update the Table of Contents page, it appears I must also provide a value for the
EmbedRegularFont.FontKey
property. However, supplying a value for theFontKey
elicits an error from Microsoft Word and the embedded fonts are no longer presented in the application. The Open XML SDK Productivity tool also elicits an error.Am I supplying erroneous values for
FontKey
? Where would I find the correct values?Screenshots
Word error:
Word error, after clicking "Yes":
Open XML SDK 2.5 Productivity Tool for Microsoft Office error:
To Reproduce
// Please add a self-contained, minimum viable repro of the issue.
// If you require external resources, please provide a gist or GitHub repro
// An Xunit style test is preferred, but a console application would work too.
Steps to reproduce the behavior:
Un-comment the line (below) to set the
FontKey
.Observed behavior
Microsoft Word and the Productivity Tool report they cannot open the DOCX file.
After Microsoft Word recovers the file, embedded fonts are no longer presented in the application.
Expected behavior
Applications should open the file without error. Embedded fonts should continue to be presented.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: