Page 1 of 1

Error about Couldn't get font

PostPosted: Fri Feb 03, 2017 8:13 pm
by SMoltok
Hello,

Using docx4j works very well, but sometimes users could have those king of errors :

2017-02-03 09:49:15,894 ajp-bio-20139-exec-2 ERROR org.docx4j.fonts.GlyphCheck username=xxx Couldn't get font Calibri
2017-02-03 09:49:15,895 ajp-bio-20139-exec-2 ERROR org.docx4j.fonts.GlyphCheck username=xxx Couldn't get font MS Gothic


How to handle it ? How to not let those erros appears in the logs ?

Re: Error about Couldn't get font

PostPosted: Fri Feb 03, 2017 8:53 pm
by jason
GlyphCheck checks the character in available in the specified font. If it isn't you'd need to use a font which has it. Otherwise you see a '?' or a square box.

But the error you are seeing is saying those fonts aren't installed (or weren't detected) at all: https://github.com/plutext/docx4j/blob/ ... k.java#L60

Re: Error about Couldn't get font

PostPosted: Fri Feb 03, 2017 9:30 pm
by SMoltok
HI Jason,

First at all, thanks for the 3.3.2 version which has resolved our memory usage problem in production !

Well according to you, what can we do to avoid this log.error which send those error mail ?

Re: Error about Couldn't get font

PostPosted: Tue Feb 07, 2017 1:10 pm
by jason
Option 1: use only fonts you know are installed on device running docx4j

Option 2: alter your logging config.