Free Support Forum - groupdocs.com

Font substitution algorithm?


#1

our customers are seeing some strange font substitution choices in document conversions to PDF. i’m wondering if someone could tell me how GroupDocs decides which font to substitute?

we are running on ubuntu and java groupdocs (latest)

thanks!
-bk


#2

@bkirkby,

Thank you for your inquiry.
Can you please share the problematic file, sample code and environment details (OS, version) for this particular scenario?
Please note that if default font substitution is not working well (for this particular case), you can load font directory or install new fonts in the environment. That could resolve this issue.

conversionConfig.getFontDirectories().add(fontsPath);

However, we are further looking into this and update you ASAP. Your investigation ID is CONVERSIONJAVA-517.


#3

thanks atirtahir3, i do add some fonts to the path, but that only uses them if those fonts are used in the documents.

what i’d really like is for the public domain Noto font family (https://en.wikipedia.org/wiki/Noto_fonts) to be the default because it was built to have all the characters of all languages (it has over 100,000 characters).

thanks,
-bk


#4

@bkirkby,

We are investigating this scenario. Could you please further share the required files/details:

  • OS version
  • Problematic file
  • Sample code

#5

sure:

OS: Ubuntu 14.04.5 (Trusty Tahr)
Problem File: (see attached international_characters.docx)

you should be able to duplicate this as we are talking about default font replacement.

international_characters.zip (610.6 KB)


#6

@bkirkby,

Thanks for sharing the sample file.
We are further investigating this scenario. We’ll let you know if Noto font family could be set as default font in the API.
However, did you try to load Noto font from the font directory (by downloading it)? And how accurate you would say that output is?
This is the output we got from loading Noto font from font directory - international_characters.pdf (202.4 KB)


#7

@bkirkby,

GroupDocs.Conversion for Java API will be extended to give the users full control of font substitution in upcoming release that is expected sometime in August 18. As we have any further update on it, we shall notify you.