Encoding.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #region MIT License
  2. /*Copyright (c) 2012 Robert Rouhani <robert.rouhani@gmail.com>
  3. SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team
  4. Permission is hereby granted, free of charge, to any person obtaining a copy of
  5. this software and associated documentation files (the "Software"), to deal in
  6. the Software without restriction, including without limitation the rights to
  7. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  8. of the Software, and to permit persons to whom the Software is furnished to do
  9. so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in all
  11. copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  18. SOFTWARE.*/
  19. #endregion
  20. using System;
  21. namespace SharpFont
  22. {
  23. /// <summary>
  24. /// An enumeration used to specify character sets supported by charmaps.
  25. /// Used in the FT_Select_Charmap API function.
  26. /// </summary>
  27. /// <remarks><para>
  28. /// Despite the name, this enumeration lists specific character repertories
  29. /// (i.e., charsets), and not text encoding methods (e.g., UTF-8, UTF-16,
  30. /// etc.).
  31. /// </para><para>
  32. /// Other encodings might be defined in the future.
  33. /// </para></remarks>
  34. [CLSCompliant(false)]
  35. public enum Encoding : uint
  36. {
  37. /// <summary>
  38. /// The encoding value 0 is reserved.
  39. /// </summary>
  40. None = 0,
  41. /// <summary>
  42. /// Corresponds to the Microsoft Symbol encoding, used to encode
  43. /// mathematical symbols in the 32..255 character code range.
  44. /// </summary>
  45. /// <see href="http://www.ceviz.net/symbol.htm"/>
  46. MicrosoftSymbol = ('s' << 24 | 'y' << 16 | 'm' << 8 | 'b'),
  47. /// <summary><para>
  48. /// Corresponds to the Unicode character set. This value covers all
  49. /// versions of the Unicode repertoire, including ASCII and Latin-1.
  50. /// Most fonts include a Unicode charmap, but not all of them.
  51. /// </para><para>
  52. /// For example, if you want to access Unicode value U+1F028 (and the
  53. /// font contains it), use value 0x1F028 as the input value for
  54. /// FT_Get_Char_Index.
  55. /// </para></summary>
  56. Unicode = ('u' << 24 | 'n' << 16 | 'i' << 8 | 'c'),
  57. /// <summary>
  58. /// Corresponds to Japanese SJIS encoding.
  59. /// </summary>
  60. /// <see href="http://langsupport.japanreference.com/encoding.shtml"/>
  61. Sjis = ('s' << 24 | 'j' << 16 | 'i' << 8 | 's'),
  62. /// <summary>
  63. /// Corresponds to an encoding system for Simplified Chinese as used
  64. /// used in mainland China.
  65. /// </summary>
  66. GB2312 = ('g' << 24 | 'b' << 16 | ' ' << 8 | ' '),
  67. /// <summary>
  68. /// Corresponds to an encoding system for Traditional Chinese as used
  69. /// in Taiwan and Hong Kong.
  70. /// </summary>
  71. Big5 = ('b' << 24 | 'i' << 16 | 'g' << 8 | '5'),
  72. /// <summary>
  73. /// Corresponds to the Korean encoding system known as Wansung.
  74. /// </summary>
  75. /// <see href="http://www.microsoft.com/typography/unicode/949.txt"/>
  76. Wansung = ('w' << 24 | 'a' << 16 | 'n' << 8 | 's'),
  77. /// <summary>
  78. /// The Korean standard character set (KS C 5601-1992), which
  79. /// corresponds to MS Windows code page 1361. This character set
  80. /// includes all possible Hangeul character combinations.
  81. /// </summary>
  82. Johab = ('j' << 24 | 'o' << 16 | 'h' << 8 | 'a'),
  83. /// <summary>
  84. /// Corresponds to the Adobe Standard encoding, as found in Type 1,
  85. /// CFF, and OpenType/CFF fonts. It is limited to 256 character codes.
  86. /// </summary>
  87. AdobeStandard = ('A' << 24 | 'D' << 16 | 'O' << 8 | 'B'),
  88. /// <summary>
  89. /// Corresponds to the Adobe Expert encoding, as found in Type 1, CFF,
  90. /// and OpenType/CFF fonts. It is limited to 256 character codes.
  91. /// </summary>
  92. AdobeExpert = ('A' << 24 | 'D' << 16 | 'B' << 8 | 'E'),
  93. /// <summary>
  94. /// Corresponds to a custom encoding, as found in Type 1, CFF, and
  95. /// OpenType/CFF fonts. It is limited to 256 character codes.
  96. /// </summary>
  97. AdobeCustom = ('A' << 24 | 'D' << 16 | 'B' << 8 | 'C'),
  98. /// <summary>
  99. /// Corresponds to a Latin-1 encoding as defined in a Type 1 PostScript
  100. /// font. It is limited to 256 character codes.
  101. /// </summary>
  102. AdobeLatin1 = ('l' << 24 | 'a' << 16 | 't' << 8 | '1'),
  103. /// <summary>
  104. /// This value is deprecated and was never used nor reported by
  105. /// FreeType. Don't use or test for it.
  106. /// </summary>
  107. [Obsolete("Never used nor reported by FreeType")]
  108. OldLatin2 = ('l' << 24 | 'a' << 16 | 't' << 8 | '2'),
  109. /// <summary>
  110. /// Corresponds to the 8-bit Apple roman encoding. Many TrueType and
  111. /// OpenType fonts contain a charmap for this encoding, since older
  112. /// versions of Mac OS are able to use it.
  113. /// </summary>
  114. AppleRoman = ('a' << 24 | 'r' << 16 | 'm' << 8 | 'n'),
  115. }
  116. }