GlyphFormat.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 type used to describe the format of a given glyph image. Note that this version of FreeType only
  25. /// supports two image formats, even though future font drivers will be able to register their own format.
  26. /// </summary>
  27. [CLSCompliant(false)]
  28. public enum GlyphFormat : uint
  29. {
  30. /// <summary>
  31. /// The value 0 is reserved.
  32. /// </summary>
  33. None = 0,
  34. /// <summary>
  35. /// The glyph image is a composite of several other images. This format is only used with
  36. /// <see cref="LoadFlags.NoRecurse"/>, and is used to report compound glyphs (like accented characters).
  37. /// </summary>
  38. Composite = ('c' << 24 | 'o' << 16 | 'm' << 8 | 'p'),
  39. /// <summary>
  40. /// The glyph image is a bitmap, and can be described as an <see cref="FTBitmap"/>. You generally need to
  41. /// access the ‘bitmap’ field of the <see cref="GlyphSlot"/> structure to read it.
  42. /// </summary>
  43. Bitmap = ('b' << 24 | 'i' << 16 | 't' << 8 | 's'),
  44. /// <summary>
  45. /// The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an
  46. /// <see cref="Outline"/>; you generally want to access the ‘outline’ field of the <see cref="GlyphSlot"/>
  47. /// structure to read it.
  48. /// </summary>
  49. Outline = ('o' << 24 | 'u' << 16 | 't' << 8 | 'l'),
  50. /// <summary>
  51. /// The glyph image is a vectorial path with no inside and outside contours. Some Type 1 fonts, like those in
  52. /// the Hershey family, contain glyphs in this format. These are described as <see cref="Outline"/>, but
  53. /// FreeType isn't currently capable of rendering them correctly.
  54. /// </summary>
  55. Plotter = ('p' << 24 | 'l' << 16 | 'o' << 8 | 't')
  56. }
  57. }