poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1772816 - /poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
Date Tue, 06 Dec 2016 00:21:22 GMT
Author: kiwiwings
Date: Tue Dec  6 00:21:22 2016
New Revision: 1772816

URL: http://svn.apache.org/viewvc?rev=1772816&view=rev
Log:
Add "*" option to font_map/fallback to provide a catch-all configuration

Modified:
    poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java

Modified: poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java?rev=1772816&r1=1772815&r2=1772816&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java Tue Dec  6 00:21:22 2016
@@ -531,11 +531,19 @@ public class DrawTextParagraph implement
                     fallbackFont = font;
                 }
             } else {
-                if (fontMap != null && fontMap.containsKey(mappedFont)) {
-                    mappedFont = fontMap.get(mappedFont);
+                if (fontMap != null) {
+                    if (fontMap.containsKey(mappedFont)) {
+                        mappedFont = fontMap.get(mappedFont);
+                    } else if (fontMap.containsKey("*")) {
+                        mappedFont = fontMap.get("*");
+                    }
                 }
-                if (fallbackMap != null && fallbackMap.containsKey(mappedFont)) {
-                    fallbackFont = fallbackMap.get(mappedFont);
+                if (fallbackMap != null) {
+                    if (fallbackMap.containsKey(mappedFont)) {
+                        fallbackFont = fallbackMap.get(mappedFont);
+                    } else if (fallbackMap.containsKey("*")) {
+                        fallbackFont = fallbackMap.get("*");
+                    }
                 }
             }
             



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message