You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FontCharset.java 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.ss.usermodel;
  16. /**
  17. * Charset represents the basic set of characters associated with a font (that it can display), and
  18. * corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language.
  19. *
  20. * @author Gisella Bronzetti
  21. */
  22. public enum FontCharset {
  23. ANSI(0),
  24. DEFAULT(1),
  25. SYMBOL(2),
  26. MAC(77),
  27. SHIFTJIS(128),
  28. HANGEUL(129),
  29. JOHAB(130),
  30. GB2312(134),
  31. CHINESEBIG5(136),
  32. GREEK(161),
  33. TURKISH(162),
  34. VIETNAMESE(163),
  35. HEBREW(177),
  36. ARABIC(178),
  37. BALTIC(186),
  38. RUSSIAN(204),
  39. THAI(222),
  40. EASTEUROPE(238),
  41. OEM(255);
  42. private int charset;
  43. private FontCharset(int value){
  44. charset = value;
  45. }
  46. /**
  47. * Returns value of this charset
  48. *
  49. * @return value of this charset
  50. */
  51. public int getValue(){
  52. return charset;
  53. }
  54. private static FontCharset[] _table = new FontCharset[256];
  55. static {
  56. for (FontCharset c : values()) {
  57. _table[c.getValue()] = c;
  58. }
  59. }
  60. public static FontCharset valueOf(int value){
  61. return _table[value];
  62. }
  63. }