2 // Automatically generated from "/usr/share/gir-1.0/PangoFT2-1.0.gir"
5 public import gtk2
.glib2
;
6 alias gtk2
.glib2 GLib2
;
7 public import gtk2
.gobject2
;
8 alias gtk2
.gobject2 GObject2
;
9 public import gtk2
.pango
;
10 alias gtk2
.pango Pango
;
11 public import gtk2
.cairo
;
12 alias gtk2
.cairo cairo
;
13 public import gtk2
.fontconfig2
;
14 alias gtk2
.fontconfig2 fontconfig2
;
15 public import gtk2
.freetype22
;
16 alias gtk2
.freetype22 freetype22
;
18 // package: "freetype2";
20 // c:symbol-prefixes: ["pango_ft2"]
21 // c:identifier-prefixes: ["PangoFT2"]
25 struct FontMap
/* : Pango.FontMap */ {
26 alias method_parent
this;
27 alias method_parent super_
;
28 alias method_parent fontmap
;
29 Pango
.FontMap method_parent
;
31 static FontMap
* /*new*/ new_() {
32 return pango_ft2_font_map_new();
34 // Unintrospectable function: for_display() / pango_ft2_font_map_for_display()
35 static Pango
.FontMap
* for_display() {
36 return pango_ft2_font_map_for_display();
38 // Unintrospectable method: create_context() / pango_ft2_font_map_create_context()
39 Pango
.Context
* create_context() {
40 return pango_ft2_font_map_create_context(&this);
42 void set_default_substitute(SubstituteFunc func
, void* data
, GLib2
.DestroyNotify notify
) {
43 pango_ft2_font_map_set_default_substitute(&this, func
, data
, notify
);
45 void set_resolution(double dpi_x
, double dpi_y
) {
46 pango_ft2_font_map_set_resolution(&this, dpi_x
, dpi_y
);
48 void substitute_changed() {
49 pango_ft2_font_map_substitute_changed(&this);
53 extern (C
) alias void function (fontconfig
.Pattern
* pattern
, void* data
) SubstituteFunc
;
56 // Unintrospectable function: font_get_coverage() / pango_ft2_font_get_coverage()
57 // Gets the #PangoCoverage for a #PangoFT2Font. Use
58 // pango_font_get_coverage() instead.
59 // RETURNS: a #PangoCoverage.
60 // <font>: a #PangoFT2Font.
61 // <language>: a language tag.
62 static Pango
.Coverage
* font_get_coverage(Pango
.Font
* font
, Pango
.Language
* language
) {
63 return pango_ft2_font_get_coverage(font
, language
);
67 // Unintrospectable function: font_get_face() / pango_ft2_font_get_face()
68 // Returns the native FreeType2 <type>FT_Face</type> structure used for this #PangoFont.
69 // This may be useful if you want to use FreeType2 functions directly.
70 // Use pango_fc_font_lock_face() instead; when you are done with a
71 // face from pango_fc_font_lock_face() you must call
72 // pango_fc_font_unlock_face().
73 // or %NULL if @font is %NULL.
74 // RETURNS: a pointer to a <type>FT_Face</type> structure, with the size set correctly,
75 // <font>: a #PangoFont
76 static freetype2
.Face
font_get_face(Pango
.Font
* font
) {
77 return pango_ft2_font_get_face(font
);
81 // Retrieves kerning information for a combination of two glyphs.
82 // Use pango_fc_font_kern_glyphs() instead.
83 // the given combination of glyphs.
84 // RETURNS: The amount of kerning (in Pango units) to apply for
85 // <font>: a #PangoFont
86 // <left>: the left #PangoGlyph
87 // <right>: the right #PangoGlyph
88 static int font_get_kerning(Pango
.Font
* font
, Pango
.Glyph left
, Pango
.Glyph right
) {
89 return pango_ft2_font_get_kerning(font
, left
, right
);
92 // Unintrospectable function: get_context() / pango_ft2_get_context()
93 static Pango
.Context
* get_context(double dpi_x
, double dpi_y
) {
94 return pango_ft2_get_context(dpi_x
, dpi_y
);
98 // Return the index of a glyph suitable for drawing unknown characters with
99 // If you want to draw an unknown-box for a character that is not covered
101 // use PANGO_GET_UNKNOWN_GLYPH() instead.
102 // RETURNS: a glyph index into @font, or %PANGO_GLYPH_EMPTY
103 // <font>: a #PangoFont
104 static Pango
.Glyph
get_unknown_glyph(Pango
.Font
* font
) {
105 return pango_ft2_get_unknown_glyph(font
);
108 static void render(freetype2
.Bitmap
* bitmap
, Pango
.Font
* font
, Pango
.GlyphString
* glyphs
, int x
, int y
) {
109 pango_ft2_render(bitmap
, font
, glyphs
, x
, y
);
112 static void render_layout(freetype2
.Bitmap
* bitmap
, Pango
.Layout
* layout
, int x
, int y
) {
113 pango_ft2_render_layout(bitmap
, layout
, x
, y
);
116 static void render_layout_line(freetype2
.Bitmap
* bitmap
, Pango
.LayoutLine
* line
, int x
, int y
) {
117 pango_ft2_render_layout_line(bitmap
, line
, x
, y
);
120 static void render_layout_line_subpixel(freetype2
.Bitmap
* bitmap
, Pango
.LayoutLine
* line
, int x
, int y
) {
121 pango_ft2_render_layout_line_subpixel(bitmap
, line
, x
, y
);
124 static void render_layout_subpixel(freetype2
.Bitmap
* bitmap
, Pango
.Layout
* layout
, int x
, int y
) {
125 pango_ft2_render_layout_subpixel(bitmap
, layout
, x
, y
);
128 static void render_transformed(freetype2
.Bitmap
* bitmap
, Pango
.Matrix
* matrix
, Pango
.Font
* font
, Pango
.GlyphString
* glyphs
, int x
, int y
) {
129 pango_ft2_render_transformed(bitmap
, matrix
, font
, glyphs
, x
, y
);
132 static void shutdown_display() {
133 pango_ft2_shutdown_display();
140 FontMap
* /*new*/ pango_ft2_font_map_new();
141 Pango
.FontMap
* pango_ft2_font_map_for_display();
142 Pango
.Context
* pango_ft2_font_map_create_context(FontMap
* this_
);
143 void pango_ft2_font_map_set_default_substitute(FontMap
* this_
, SubstituteFunc func
, void* data
, GLib2
.DestroyNotify notify
);
144 void pango_ft2_font_map_set_resolution(FontMap
* this_
, double dpi_x
, double dpi_y
);
145 void pango_ft2_font_map_substitute_changed(FontMap
* this_
);
146 Pango
.Coverage
* pango_ft2_font_get_coverage(Pango
.Font
* font
, Pango
.Language
* language
);
147 freetype2
.Face
pango_ft2_font_get_face(Pango
.Font
* font
);
148 int pango_ft2_font_get_kerning(Pango
.Font
* font
, Pango
.Glyph left
, Pango
.Glyph right
);
149 Pango
.Context
* pango_ft2_get_context(double dpi_x
, double dpi_y
);
150 Pango
.Glyph
pango_ft2_get_unknown_glyph(Pango
.Font
* font
);
151 void pango_ft2_render(freetype2
.Bitmap
* bitmap
, Pango
.Font
* font
, Pango
.GlyphString
* glyphs
, int x
, int y
);
152 void pango_ft2_render_layout(freetype2
.Bitmap
* bitmap
, Pango
.Layout
* layout
, int x
, int y
);
153 void pango_ft2_render_layout_line(freetype2
.Bitmap
* bitmap
, Pango
.LayoutLine
* line
, int x
, int y
);
154 void pango_ft2_render_layout_line_subpixel(freetype2
.Bitmap
* bitmap
, Pango
.LayoutLine
* line
, int x
, int y
);
155 void pango_ft2_render_layout_subpixel(freetype2
.Bitmap
* bitmap
, Pango
.Layout
* layout
, int x
, int y
);
156 void pango_ft2_render_transformed(freetype2
.Bitmap
* bitmap
, Pango
.Matrix
* matrix
, Pango
.Font
* font
, Pango
.GlyphString
* glyphs
, int x
, int y
);
157 void pango_ft2_shutdown_display();