Good day, dear colleagues.
Could you please help me to understand why is this error appears when the spring boot app is packed into the jar and no cause when app is being debugged from IDE?
var is = getClass().getResourceAsStream("/fonts/2211.ttf");
byte[] b = new byte[is.available()];
is.read(b);
var fontProgram = FontProgramFactory.createFont(b); // <-- com.itextpdf.io.IOException: Type of font is not recognized.
My thought was that maybe *.ttf got corrupted being packed into jar, so I tried to get is as a byte array from resources, and further comparison says they are identical with the original *.ttf file outside of jar.
Any ideas?