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
.freetype2
;
16 alias gtk2
.freetype2 freetype2
;
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_()() nothrow {
32 return pango_ft2_font_map_new();
34 static auto opCall()() {
35 return pango_ft2_font_map_new();
37 // Unintrospectable function: for_display() / pango_ft2_font_map_for_display()
38 static Pango
.FontMap
* for_display()() nothrow {
39 return pango_ft2_font_map_for_display();
41 // Unintrospectable method: create_context() / pango_ft2_font_map_create_context()
42 Pango
.Context
* create_context()() nothrow {
43 return pango_ft2_font_map_create_context(&this);
45 void set_default_substitute(AT0
)(SubstituteFunc func
, AT0
/*void*/ data
, GLib2
.DestroyNotify notify
) nothrow {
46 pango_ft2_font_map_set_default_substitute(&this, func
, UpCast
!(void*)(data
), notify
);
48 void set_resolution()(double dpi_x
, double dpi_y
) nothrow {
49 pango_ft2_font_map_set_resolution(&this, dpi_x
, dpi_y
);
51 void substitute_changed()() nothrow {
52 pango_ft2_font_map_substitute_changed(&this);
56 extern (C
) alias void function (fontconfig2
.Pattern
* pattern
, void* data
) nothrow SubstituteFunc
;
59 // Unintrospectable function: font_get_coverage() / pango_ft2_font_get_coverage()
60 // Gets the #PangoCoverage for a #PangoFT2Font. Use
61 // pango_font_get_coverage() instead.
62 // RETURNS: a #PangoCoverage.
63 // <font>: a #PangoFT2Font.
64 // <language>: a language tag.
65 static Pango
.Coverage
* font_get_coverage(AT0
, AT1
)(AT0
/*Pango.Font*/ font
, AT1
/*Pango.Language*/ language
) nothrow {
66 return pango_ft2_font_get_coverage(UpCast
!(Pango
.Font
*)(font
), UpCast
!(Pango
.Language
*)(language
));
70 // Unintrospectable function: font_get_face() / pango_ft2_font_get_face()
71 // Returns the native FreeType2 <type>FT_Face</type> structure used for this #PangoFont.
72 // This may be useful if you want to use FreeType2 functions directly.
74 // Use pango_fc_font_lock_face() instead; when you are done with a
75 // face from pango_fc_font_lock_face() you must call
76 // pango_fc_font_unlock_face().
78 // or %NULL if @font is %NULL.
79 // RETURNS: a pointer to a <type>FT_Face</type> structure, with the size set correctly,
80 // <font>: a #PangoFont
81 static freetype2
.Face
font_get_face(AT0
)(AT0
/*Pango.Font*/ font
) nothrow {
82 return pango_ft2_font_get_face(UpCast
!(Pango
.Font
*)(font
));
86 // Retrieves kerning information for a combination of two glyphs.
88 // Use pango_fc_font_kern_glyphs() instead.
90 // the given combination of glyphs.
91 // RETURNS: The amount of kerning (in Pango units) to apply for
92 // <font>: a #PangoFont
93 // <left>: the left #PangoGlyph
94 // <right>: the right #PangoGlyph
95 static int font_get_kerning(AT0
)(AT0
/*Pango.Font*/ font
, Pango
.Glyph left
, Pango
.Glyph right
) nothrow {
96 return pango_ft2_font_get_kerning(UpCast
!(Pango
.Font
*)(font
), left
, right
);
99 // Unintrospectable function: get_context() / pango_ft2_get_context()
100 static Pango
.Context
* get_context()(double dpi_x
, double dpi_y
) nothrow {
101 return pango_ft2_get_context(dpi_x
, dpi_y
);
105 // Return the index of a glyph suitable for drawing unknown characters with
106 // @font, or %PANGO_GLYPH_EMPTY if no suitable glyph found.
108 // If you want to draw an unknown-box for a character that is not covered
110 // use PANGO_GET_UNKNOWN_GLYPH() instead.
111 // RETURNS: a glyph index into @font, or %PANGO_GLYPH_EMPTY
112 // <font>: a #PangoFont
113 static Pango
.Glyph
get_unknown_glyph(AT0
)(AT0
/*Pango.Font*/ font
) nothrow {
114 return pango_ft2_get_unknown_glyph(UpCast
!(Pango
.Font
*)(font
));
117 static void render(AT0
, AT1
, AT2
)(AT0
/*freetype2.Bitmap*/ bitmap
, AT1
/*Pango.Font*/ font
, AT2
/*Pango.GlyphString*/ glyphs
, int x
, int y
) nothrow {
118 pango_ft2_render(UpCast
!(freetype2
.Bitmap
*)(bitmap
), UpCast
!(Pango
.Font
*)(font
), UpCast
!(Pango
.GlyphString
*)(glyphs
), x
, y
);
121 static void render_layout(AT0
, AT1
)(AT0
/*freetype2.Bitmap*/ bitmap
, AT1
/*Pango.Layout*/ layout
, int x
, int y
) nothrow {
122 pango_ft2_render_layout(UpCast
!(freetype2
.Bitmap
*)(bitmap
), UpCast
!(Pango
.Layout
*)(layout
), x
, y
);
125 static void render_layout_line(AT0
, AT1
)(AT0
/*freetype2.Bitmap*/ bitmap
, AT1
/*Pango.LayoutLine*/ line
, int x
, int y
) nothrow {
126 pango_ft2_render_layout_line(UpCast
!(freetype2
.Bitmap
*)(bitmap
), UpCast
!(Pango
.LayoutLine
*)(line
), x
, y
);
129 static void render_layout_line_subpixel(AT0
, AT1
)(AT0
/*freetype2.Bitmap*/ bitmap
, AT1
/*Pango.LayoutLine*/ line
, int x
, int y
) nothrow {
130 pango_ft2_render_layout_line_subpixel(UpCast
!(freetype2
.Bitmap
*)(bitmap
), UpCast
!(Pango
.LayoutLine
*)(line
), x
, y
);
133 static void render_layout_subpixel(AT0
, AT1
)(AT0
/*freetype2.Bitmap*/ bitmap
, AT1
/*Pango.Layout*/ layout
, int x
, int y
) nothrow {
134 pango_ft2_render_layout_subpixel(UpCast
!(freetype2
.Bitmap
*)(bitmap
), UpCast
!(Pango
.Layout
*)(layout
), x
, y
);
137 static void render_transformed(AT0
, AT1
, AT2
, AT3
)(AT0
/*freetype2.Bitmap*/ bitmap
, AT1
/*Pango.Matrix*/ matrix
, AT2
/*Pango.Font*/ font
, AT3
/*Pango.GlyphString*/ glyphs
, int x
, int y
) nothrow {
138 pango_ft2_render_transformed(UpCast
!(freetype2
.Bitmap
*)(bitmap
), UpCast
!(Pango
.Matrix
*)(matrix
), UpCast
!(Pango
.Font
*)(font
), UpCast
!(Pango
.GlyphString
*)(glyphs
), x
, y
);
141 static void shutdown_display()() nothrow {
142 pango_ft2_shutdown_display();
149 FontMap
* /*new*/ pango_ft2_font_map_new() nothrow;
150 Pango
.FontMap
* pango_ft2_font_map_for_display() nothrow;
151 Pango
.Context
* pango_ft2_font_map_create_context(FontMap
* this_
) nothrow;
152 void pango_ft2_font_map_set_default_substitute(FontMap
* this_
, SubstituteFunc func
, void* data
, GLib2
.DestroyNotify notify
) nothrow;
153 void pango_ft2_font_map_set_resolution(FontMap
* this_
, double dpi_x
, double dpi_y
) nothrow;
154 void pango_ft2_font_map_substitute_changed(FontMap
* this_
) nothrow;
155 Pango
.Coverage
* pango_ft2_font_get_coverage(Pango
.Font
* font
, Pango
.Language
* language
) nothrow;
156 freetype2
.Face
pango_ft2_font_get_face(Pango
.Font
* font
) nothrow;
157 int pango_ft2_font_get_kerning(Pango
.Font
* font
, Pango
.Glyph left
, Pango
.Glyph right
) nothrow;
158 Pango
.Context
* pango_ft2_get_context(double dpi_x
, double dpi_y
) nothrow;
159 Pango
.Glyph
pango_ft2_get_unknown_glyph(Pango
.Font
* font
) nothrow;
160 void pango_ft2_render(freetype2
.Bitmap
* bitmap
, Pango
.Font
* font
, Pango
.GlyphString
* glyphs
, int x
, int y
) nothrow;
161 void pango_ft2_render_layout(freetype2
.Bitmap
* bitmap
, Pango
.Layout
* layout
, int x
, int y
) nothrow;
162 void pango_ft2_render_layout_line(freetype2
.Bitmap
* bitmap
, Pango
.LayoutLine
* line
, int x
, int y
) nothrow;
163 void pango_ft2_render_layout_line_subpixel(freetype2
.Bitmap
* bitmap
, Pango
.LayoutLine
* line
, int x
, int y
) nothrow;
164 void pango_ft2_render_layout_subpixel(freetype2
.Bitmap
* bitmap
, Pango
.Layout
* layout
, int x
, int y
) nothrow;
165 void pango_ft2_render_transformed(freetype2
.Bitmap
* bitmap
, Pango
.Matrix
* matrix
, Pango
.Font
* font
, Pango
.GlyphString
* glyphs
, int x
, int y
) nothrow;
166 void pango_ft2_shutdown_display() nothrow;