mirror of https://github.com/apache/poi.git
Add "*" option to font_map/fallback to provide a catch-all configuration
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1772816 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
714d9d666b
commit
f09674c8e2
|
@ -531,11 +531,19 @@ public class DrawTextParagraph implements Drawable {
|
||||||
fallbackFont = font;
|
fallbackFont = font;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fontMap != null && fontMap.containsKey(mappedFont)) {
|
if (fontMap != null) {
|
||||||
mappedFont = fontMap.get(mappedFont);
|
if (fontMap.containsKey(mappedFont)) {
|
||||||
|
mappedFont = fontMap.get(mappedFont);
|
||||||
|
} else if (fontMap.containsKey("*")) {
|
||||||
|
mappedFont = fontMap.get("*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (fallbackMap != null && fallbackMap.containsKey(mappedFont)) {
|
if (fallbackMap != null) {
|
||||||
fallbackFont = fallbackMap.get(mappedFont);
|
if (fallbackMap.containsKey(mappedFont)) {
|
||||||
|
fallbackFont = fallbackMap.get(mappedFont);
|
||||||
|
} else if (fallbackMap.containsKey("*")) {
|
||||||
|
fallbackFont = fallbackMap.get("*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue