poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r414842 - /jakarta/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
Date Fri, 16 Jun 2006 14:48:10 GMT
Author: nick
Date: Fri Jun 16 07:48:09 2006
New Revision: 414842

URL: http://svn.apache.org/viewvc?rev=414842&view=rev
Log:
Allow fetching and changing the character set, eg to support wingdings fonts (bug #39389)

Modified:
    jakarta/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java

Modified: jakarta/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java?rev=414842&r1=414841&r2=414842&view=diff
==============================================================================
--- jakarta/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java (original)
+++ jakarta/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java Fri Jun 16 07:48:09
2006
@@ -114,6 +114,24 @@
      */
 
     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;
 
@@ -347,6 +365,31 @@
     public byte getUnderline()
     {
         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()



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message