Symbol font unexpectedly appears in output Word document

I am loading a Word document template (.dot) file, filling in the text of various bookmarks, and saving the result as a .docx file. In the resulting .docx file, for two of the bookmarks, the inserted text appears in Symbol font, instead of Arial which was expected. Oddly, when I save the document as a PDF, the text does appear in Arial, though it is bolded when it should not be.

I would appreciate any help with this, and would be glad to attach the files if I could see how.

Hi Dirk,

Yes, please send us your file by submitting a support ticket or sending us an email.
Please check the Contact page.

Regards,
Mario

Thank you. The files have been sent by e-mail, reference number: 25510.

Hi Dirk,

Please try again with this bugfix:
https://www.gemboxsoftware.com/document/nightlybuilds/GBD33v1374.zip

Or this NuGet package:
Install-Package GemBox.Document -Version 33.0.1374-hotfix

Does this solve your issue?

Regards,
Mario

That is much better, thank you! The text now appears in Arial as expected. But there is still a problem, which may be related, or may not.

In the original Word .dot template, there are a number of “bullets”, calling out various points. I’m not sure technically what character code is used for these, but these bullets were presumably created in Word as part of a bulleted list, by pressing Alt+0149, or by using the Insert->Symbol dialog.

However they were created, they show in the template as Arial font. In the output .docx, they show properly as bullets, but as Symbol font. And in the .pdf, they do not show properly, but rather as empty boxes. Is this something you can fix?

I very much appreciate your support, and the quick turnaround.

DIrk

H Dirk,

If you double click those bullets in your template document, you will get this:

bullet-symbol

Nevertheless, the problem with PDF output occurs because GemBox.Document currently doesn’t support simulating bold and/or italic glyphs.

When the text specifies Bold and/or Italic style, the used font must have Italic or Bold glyphs (font face), otherwise GemBox.Document will fall back to some other font that does have them.

Microsoft Word can simulate bold weight and italic geometry (it can render bold and/or italic content) by using just a regular font face.
Unfortunately, GemBox.Document currently doesn’t have support for this. But we have an internal support ticket for this feature and I’ve added your report to it as well to increase its priority.

We do plan to provide this feature sometime in the future, but I’m afraid that at this moment I cannot say exactly when that will be.

For now, can you use the following as a workaround:

FontSettings.FontSelection += (sender, e) =>
{
    if (e.Font == null && e.FontName == "Symbol")
        e.Font = FontSettings.Fonts.First(f => f.FamilyName == "Symbol");
};

var document = DocumentModel.Load("TESTDisclosure20.dot");
document.Save("output.pdf");

I hope this helps.

Regards,
Mario

Thank you, Mario, that workaround does solve the problem with the bullets.

I have now discovered one more problem, hopefully the last one. It has to do with graphics, and I’ll open a separate ticket for it.

Hi,

Regarding the previous ticket, we have actually now resolved this issue, removed searching for a fallback font for a symbolic simulated font.

So, please try again with this bugfix:
https://www.gemboxsoftware.com/document/nightlybuilds/GBD33v1376.zip

Or this NuGet package:
Install-Package GemBox.Document -Version 33.0.1376-hotfix

Does this solve your issue?

Regards,
Mario

That new hotfix does indeed fix the problem. Thank you very much indeed.

Dirk

Hi Mario

For some odd reason, bullets that used to work absolutely fine are now being replaced by this text when converting from Word to HTML:

<span style="font-family:Symbol;font-size:10pt;">?</span>

Is this related to this change, or is this a new issue? I have tried converting from RTF/DOC/DOCX, but they all have the same result.

I have just upgraded the system to GemBox.Document 35.0.1130, but to no avail.

Many thanks

Todd

I am also getting this sort of artefact at the top of our Word->HTML conversions:

?
<!DOCTYPE html>

I have tried several search and replace attempts to repair it, but without success. :slightly_frowning_face:

Hi Mario
Please ignore this thead for a moment. I think that the problem exists with an encoding issue with my system … it seems like coincidence that it is just affecting GemBox.

I’ll close off on this as soon as I have confirmed.

Very sorry for wasting your time.

Todd