Gasp.cs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. /// A list of values and/or bit-flags returned by the FT_Get_Gasp function.
  25. /// </summary>
  26. /// <remarks><para>
  27. /// The bit-flags <see cref="Gasp.DoGridfit"/> and <see cref="Gasp.DoGray"/> are to be used for standard font
  28. /// rasterization only. Independently of that, <see cref="Gasp.SymmetricSmoothing"/> and
  29. /// <see cref="Gasp.SymmetricGridfit"/> are to be used if ClearType is enabled (and <see cref="Gasp.DoGridfit"/>
  30. /// and <see cref="Gasp.DoGray"/> are consequently ignored).
  31. /// </para><para>
  32. /// ‘ClearType’ is Microsoft's implementation of LCD rendering, partly protected by patents.
  33. /// </para></remarks>
  34. [Flags]
  35. public enum Gasp
  36. {
  37. /// <summary>
  38. /// This special value means that there is no GASP table in this face. It is up to the client to decide what to
  39. /// do.
  40. /// </summary>
  41. NoTable = -1,
  42. /// <summary>
  43. /// Grid-fitting and hinting should be performed at the specified ppem. This really means TrueType bytecode
  44. /// interpretation. If this bit is not set, no hinting gets applied.
  45. /// </summary>
  46. DoGridfit = 0x01,
  47. /// <summary>
  48. /// Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.
  49. /// </summary>
  50. DoGray = 0x02,
  51. /// <summary>
  52. /// If set, smoothing along multiple axes must be used with ClearType.
  53. /// </summary>
  54. SymmetricSmoothing = 0x08,
  55. /// <summary>
  56. /// Grid-fitting must be used with ClearType's symmetric smoothing.
  57. /// </summary>
  58. SymmetricGridfit = 0x10
  59. }
  60. }