pango-coverage.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* Pango
  2. * pango-coverage.h: Coverage sets for fonts
  3. *
  4. * Copyright (C) 2000 Red Hat Software
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. */
  21. #ifndef __PANGO_COVERAGE_H__
  22. #define __PANGO_COVERAGE_H__
  23. #include <glib.h>
  24. #include <pango/pango-version-macros.h>
  25. G_BEGIN_DECLS
  26. /**
  27. * PangoCoverage:
  28. *
  29. * The #PangoCoverage structure represents a map from Unicode characters
  30. * to #PangoCoverageLevel. It is an opaque structure with no public fields.
  31. */
  32. typedef struct _PangoCoverage PangoCoverage;
  33. /**
  34. * PangoCoverageLevel:
  35. * @PANGO_COVERAGE_NONE: The character is not representable with the font.
  36. * @PANGO_COVERAGE_FALLBACK: The character is represented in a way that may be
  37. * comprehensible but is not the correct graphical form.
  38. * For instance, a Hangul character represented as a
  39. * a sequence of Jamos, or a Latin transliteration of a Cyrillic word.
  40. * @PANGO_COVERAGE_APPROXIMATE: The character is represented as basically the correct
  41. * graphical form, but with a stylistic variant inappropriate for
  42. * the current script.
  43. * @PANGO_COVERAGE_EXACT: The character is represented as the correct graphical form.
  44. *
  45. * Used to indicate how well a font can represent a particular Unicode
  46. * character point for a particular script.
  47. */
  48. typedef enum {
  49. PANGO_COVERAGE_NONE,
  50. PANGO_COVERAGE_FALLBACK,
  51. PANGO_COVERAGE_APPROXIMATE,
  52. PANGO_COVERAGE_EXACT
  53. } PangoCoverageLevel;
  54. PANGO_AVAILABLE_IN_ALL
  55. PangoCoverage * pango_coverage_new (void);
  56. PANGO_AVAILABLE_IN_ALL
  57. PangoCoverage * pango_coverage_ref (PangoCoverage *coverage);
  58. PANGO_AVAILABLE_IN_ALL
  59. void pango_coverage_unref (PangoCoverage *coverage);
  60. PANGO_AVAILABLE_IN_ALL
  61. PangoCoverage * pango_coverage_copy (PangoCoverage *coverage);
  62. PANGO_AVAILABLE_IN_ALL
  63. PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage,
  64. int index_);
  65. PANGO_AVAILABLE_IN_ALL
  66. void pango_coverage_set (PangoCoverage *coverage,
  67. int index_,
  68. PangoCoverageLevel level);
  69. PANGO_AVAILABLE_IN_ALL
  70. void pango_coverage_max (PangoCoverage *coverage,
  71. PangoCoverage *other);
  72. PANGO_AVAILABLE_IN_ALL
  73. void pango_coverage_to_bytes (PangoCoverage *coverage,
  74. guchar **bytes,
  75. int *n_bytes);
  76. PANGO_AVAILABLE_IN_ALL
  77. PangoCoverage *pango_coverage_from_bytes (guchar *bytes,
  78. int n_bytes);
  79. G_END_DECLS
  80. #endif /* __PANGO_COVERAGE_H__ */