diff options
author | Nick Burch <nick@apache.org> | 2006-06-16 14:48:09 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2006-06-16 14:48:09 +0000 |
commit | bee5d25e0c0be2cc78e3eab9cb520b3d6cea43fc (patch) | |
tree | ff6b689d9fadf8298129ba92207be24b4ad2c6d0 /src/java/org | |
parent | 5aee7710b41939d03a9581e3d01e34a458419363 (diff) | |
download | poi-bee5d25e0c0be2cc78e3eab9cb520b3d6cea43fc.tar.gz poi-bee5d25e0c0be2cc78e3eab9cb520b3d6cea43fc.zip |
Allow fetching and changing the character set, eg to support wingdings fonts (bug #39389)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@414842 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/poi/hssf/usermodel/HSSFFont.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java index b760082af0..8d502d82ac 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java @@ -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{" + |