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
48bdfca1c4
commit
83ff0e5ec4
@ -531,11 +531,19 @@ public class DrawTextParagraph implements Drawable {
|
|||||||
fallbackFont = font;
|
fallbackFont = font;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fontMap != null && fontMap.containsKey(mappedFont)) {
|
if (fontMap != null) {
|
||||||
|
if (fontMap.containsKey(mappedFont)) {
|
||||||
mappedFont = fontMap.get(mappedFont);
|
mappedFont = fontMap.get(mappedFont);
|
||||||
|
} else if (fontMap.containsKey("*")) {
|
||||||
|
mappedFont = fontMap.get("*");
|
||||||
}
|
}
|
||||||
if (fallbackMap != null && fallbackMap.containsKey(mappedFont)) {
|
}
|
||||||
|
if (fallbackMap != null) {
|
||||||
|
if (fallbackMap.containsKey(mappedFont)) {
|
||||||
fallbackFont = fallbackMap.get(mappedFont);
|
fallbackFont = fallbackMap.get(mappedFont);
|
||||||
|
} else if (fallbackMap.containsKey("*")) {
|
||||||
|
fallbackFont = fallbackMap.get("*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user