[libbluray-devel] FontIndexData: style is optional. Initialize to -1.

hpi1 git at videolan.org
Sun Nov 23 13:19:55 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Nov 21 13:01:41 2014 +0200| [fdc2344cb8e5648eb6449d1043c52b01d31e550d] | committer: hpi1

FontIndexData: style is optional. Initialize to -1.

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=fdc2344cb8e5648eb6449d1043c52b01d31e550d
---

 src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java |    4 ++++
 src/libbluray/bdj/java/org/videolan/FontIndexData.java  |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java b/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java
index d6389c2..fbdd163 100644
--- a/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java
+++ b/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java
@@ -63,6 +63,10 @@ public class FontFactory {
                     throw new IOException("error caching font");
                 }
 
+                if (data.getStyle() == -1) {
+                    logger.unimplemented("readDiscFonts(): font with all styles not supported");
+                }
+
                 Font font = Font.createFont(Font.TRUETYPE_FONT, fontFile);
                 font = font.deriveFont(data.getStyle(), data.getMaxSize());
 
diff --git a/src/libbluray/bdj/java/org/videolan/FontIndexData.java b/src/libbluray/bdj/java/org/videolan/FontIndexData.java
index 66b3939..e834d9f 100644
--- a/src/libbluray/bdj/java/org/videolan/FontIndexData.java
+++ b/src/libbluray/bdj/java/org/videolan/FontIndexData.java
@@ -59,5 +59,5 @@ public class FontIndexData {
     protected String filename;
     protected int minSize;
     protected int maxSize;
-    protected int style;
+    protected int style = -1; /* optional */
 }



More information about the libbluray-devel mailing list