private Font getFont(AttributedCharacterIterator aci) {
Font[] fonts = ACIUtils.findFontsForBatikACI(aci, nativeTextHandler.getFontInfo());
- return fonts[0];
+ return fonts == null ? null : fonts[0];
}
private float getStringWidth(String str, Font font) {
}
private boolean hasUnsupportedGlyphs(String str, Font font) {
+ if (font == null) {
+ return true;
+ }
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (!((c == ' ') || (c == '\n') || (c == '\r') || (c == '\t'))) {
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Fonts" dev="MH" type="add" fixes-bug="54120">
+ Created a simple mechanism to avoid NPEs when AWT fonts are requested from Batik
+ for AFP output.
+ </action>
<action context="Renderers" dev="VH" type="add" fixes-bug="54081">
PDF accessibility: properly tag hyphenated words.
</action>