Dear everyone,
We are trying to generate PDF files from our DWGs and we could not set our own ttf font. How can we do that?
Unfortunately the
CadImage::setDefaultFont("fontname")
does not work.
We tried to override the fonts in the styles that are in use in DWG file, without any success:
CadStylesList styles = image.getStyles();
for ( Object obj : styles )
{
CadStyleTableObject style = (CadStyleTableObject)obj;
if ( style.getPrimaryFontName() != null && lcFontReplacement.containsKey( style.getPrimaryFontName().toLowerCase() ) )
{
style.setPrimaryFontName( lcFontReplacement.get( style.getPrimaryFontName().toLowerCase() ));
}
}
Any other idea?
Thanks in advance.