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.
 
 
 
 
 
 

113 lines
4.0 KiB

  1. /* Pango
  2. * pangoft2.h:
  3. *
  4. * Copyright (C) 1999 Red Hat Software
  5. * Copyright (C) 2000 Tor Lillqvist
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Library General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Library General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Library General Public
  18. * License along with this library; if not, write to the
  19. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20. * Boston, MA 02111-1307, USA.
  21. */
  22. #ifndef __PANGOFT2_H__
  23. #define __PANGOFT2_H__
  24. #include <fontconfig/fontconfig.h>
  25. #include <pango/pango-layout.h>
  26. #include <pango/pangofc-font.h>
  27. G_BEGIN_DECLS
  28. #ifndef PANGO_DISABLE_DEPRECATED
  29. #define PANGO_RENDER_TYPE_FT2 "PangoRenderFT2"
  30. #endif
  31. #define PANGO_TYPE_FT2_FONT_MAP (pango_ft2_font_map_get_type ())
  32. #define PANGO_FT2_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT_MAP, PangoFT2FontMap))
  33. #define PANGO_FT2_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_FONT_MAP))
  34. typedef struct _PangoFT2FontMap PangoFT2FontMap;
  35. typedef void (*PangoFT2SubstituteFunc) (FcPattern *pattern,
  36. gpointer data);
  37. /* Calls for applications */
  38. void pango_ft2_render (FT_Bitmap *bitmap,
  39. PangoFont *font,
  40. PangoGlyphString *glyphs,
  41. gint x,
  42. gint y);
  43. void pango_ft2_render_transformed (FT_Bitmap *bitmap,
  44. const PangoMatrix *matrix,
  45. PangoFont *font,
  46. PangoGlyphString *glyphs,
  47. int x,
  48. int y);
  49. void pango_ft2_render_layout_line (FT_Bitmap *bitmap,
  50. PangoLayoutLine *line,
  51. int x,
  52. int y);
  53. void pango_ft2_render_layout_line_subpixel (FT_Bitmap *bitmap,
  54. PangoLayoutLine *line,
  55. int x,
  56. int y);
  57. void pango_ft2_render_layout (FT_Bitmap *bitmap,
  58. PangoLayout *layout,
  59. int x,
  60. int y);
  61. void pango_ft2_render_layout_subpixel (FT_Bitmap *bitmap,
  62. PangoLayout *layout,
  63. int x,
  64. int y);
  65. GType pango_ft2_font_map_get_type (void) G_GNUC_CONST;
  66. PangoFontMap *pango_ft2_font_map_new (void);
  67. void pango_ft2_font_map_set_resolution (PangoFT2FontMap *fontmap,
  68. double dpi_x,
  69. double dpi_y);
  70. void pango_ft2_font_map_set_default_substitute (PangoFT2FontMap *fontmap,
  71. PangoFT2SubstituteFunc func,
  72. gpointer data,
  73. GDestroyNotify notify);
  74. void pango_ft2_font_map_substitute_changed (PangoFT2FontMap *fontmap);
  75. #ifndef PANGO_DISABLE_DEPRECATED
  76. PangoContext *pango_ft2_font_map_create_context (PangoFT2FontMap *fontmap);
  77. #endif
  78. /* API for rendering modules
  79. */
  80. #ifndef PANGO_DISABLE_DEPRECATED
  81. PangoContext *pango_ft2_get_context (double dpi_x,
  82. double dpi_y);
  83. PangoFontMap *pango_ft2_font_map_for_display (void);
  84. void pango_ft2_shutdown_display (void);
  85. PangoGlyph pango_ft2_get_unknown_glyph (PangoFont *font);
  86. int pango_ft2_font_get_kerning (PangoFont *font,
  87. PangoGlyph left,
  88. PangoGlyph right);
  89. FT_Face pango_ft2_font_get_face (PangoFont *font);
  90. PangoCoverage *pango_ft2_font_get_coverage (PangoFont *font,
  91. PangoLanguage *language);
  92. #endif /* PANGO_DISABLE_DEPRECATED */
  93. G_END_DECLS
  94. #endif /* __PANGOFT2_H__ */