Hi ,
when we add custom fonts ASPOSE considering only custom fonts to replace when no fonts found. Its not considering the default fonts in the system.
Example: in word document we have two fonts one is claibri and barcode fonts. Both the fonts are not available in linux machine.
when two fonts are available ASPOSE using the linux default fonts to render.
But when we provide the custom font barcode, ASPOSE considering only barcode font and applying this font for entire document (ASPOSE using barcode in place of claibri, its not using linux default font when no claibri font found).
Below is the code snippet that we are using for custom fonts
FontSourceBase[] fontSources = FontSettings.getDefaultInstance().getFontsSources();
FolderFontSource customFonts = new FolderFontSource( “custom fonts location”, true );
List newFontSources = new ArrayList<>();
if ( fontSources != null )
{
for ( FontSourceBase src : fontSources )
{
newFontSources.add( src );
}
}
newFontSources.add( customFonts );
FontSettings.getDefaultInstance()
.setFontsSources( newFontSources.toArray( new FontSourceBase[newFontSources.size()] ) );
Thanks,
Nagendra.