]> source.dussan.org Git - poi.git/commitdiff
Allow fetching and changing the character set, eg to support wingdings fonts (bug...
authorNick Burch <nick@apache.org>
Fri, 16 Jun 2006 14:48:09 +0000 (14:48 +0000)
committerNick Burch <nick@apache.org>
Fri, 16 Jun 2006 14:48:09 +0000 (14:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@414842 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/HSSFFont.java

index b760082af08aa93a6e34492508d0ee41c6d84a94..8d502d82acb0b538bf80000164336b5352ac2575 100644 (file)
@@ -114,6 +114,24 @@ public class HSSFFont
      */
 
     public final static byte   U_DOUBLE_ACCOUNTING = 0x22;
+
+    /**
+     * ANSI character set
+     */
+    public final static byte ANSI_CHARSET = 0;
+
+    /**
+     * Default character set.
+     */
+    public final static byte DEFAULT_CHARSET = 1;
+
+    /**
+     * Symbol character set
+     */
+    public final static byte SYMBOL_CHARSET = 2;
+
+
+
     private FontRecord         font;
     private short              index;
 
@@ -349,6 +367,31 @@ public class HSSFFont
         return font.getUnderline();
     }
 
+
+    /**
+     * get character-set to use.
+     * @return character-set
+     * @see #ANSI_CHARSET
+     * @see #DEFAULT_CHARSET
+     * @see #SYMBOL_CHARSET
+     */
+    public byte getCharSet()
+    {
+        return font.getCharset();
+    }
+
+    /**
+     * set character-set to use.
+     * @return character-set
+     * @see #ANSI_CHARSET
+     * @see #DEFAULT_CHARSET
+     * @see #SYMBOL_CHARSET
+     */
+    public void setCharSet(byte charset)
+    {
+        font.setCharset(charset);
+    }
+
     public String toString()
     {
         return "org.apache.poi.hssf.usermodel.HSSFFont{" +