Win32 Fonts and Rendering

Name

Win32 Fonts and Rendering -- 

Synopsis



#define     PANGO_RENDER_TYPE_WIN32
PangoContext* pango_win32_get_context       (void);
void        pango_win32_render              (HDC hdc,
                                             PangoFont *font,
                                             PangoGlyphString *glyphs,
                                             gint x,
                                             gint y);
void        pango_win32_render_layout_line  (HDC hdc,
                                             PangoLayoutLine *line,
                                             int x,
                                             int y);
void        pango_win32_render_layout       (HDC hdc,
                                             PangoLayout *layout,
                                             int x,
                                             int y);
PangoGlyph  pango_win32_get_unknown_glyph   (PangoFont *font);
struct      PangoWin32FontCache;
PangoWin32FontCache* pango_win32_font_cache_new
                                            (void);
void        pango_win32_font_cache_free     (PangoWin32FontCache *cache);
HFONT       pango_win32_font_cache_load     (PangoWin32FontCache *cache,
                                             const LOGFONT *logfont);
void        pango_win32_font_cache_unload   (PangoWin32FontCache *cache,
                                             HFONT hfont);
PangoFontMap* pango_win32_font_map_for_display
                                            (void);
void        pango_win32_shutdown_display    (void);
PangoWin32FontCache* pango_win32_font_map_get_font_cache
                                            (PangoFontMap *font_map);

Description

Details

PANGO_RENDER_TYPE_WIN32

#define PANGO_RENDER_TYPE_WIN32 "PangoRenderWin32"


pango_win32_get_context ()

PangoContext* pango_win32_get_context       (void);

Retrieves a PangoContext appropriate for rendering with Windows fonts.

Returns : the new PangoContext


pango_win32_render ()

void        pango_win32_render              (HDC hdc,
                                             PangoFont *font,
                                             PangoGlyphString *glyphs,
                                             gint x,
                                             gint y);

Render a PangoGlyphString onto a Windows DC

hdc : the device context
font : the font in which to draw the string
glyphs : the glyph string to draw
x : the x position of start of string (in pixels)
y : the y position of baseline (in pixels)


pango_win32_render_layout_line ()

void        pango_win32_render_layout_line  (HDC hdc,
                                             PangoLayoutLine *line,
                                             int x,
                                             int y);

Render a PangoLayoutLine onto a device context

hdc : HDC to use for uncolored drawing
line : a PangoLayoutLine
x : the x position of start of string (in pixels)
y : the y position of baseline (in pixels)


pango_win32_render_layout ()

void        pango_win32_render_layout       (HDC hdc,
                                             PangoLayout *layout,
                                             int x,
                                             int y);

Render a PangoLayoutLine onto an X drawable

hdc : HDC to use for uncolored drawing
layout : a PangoLayout
x : the X position of the left of the layout (in pixels)
y : the Y position of the top of the layout (in pixels)


pango_win32_get_unknown_glyph ()

PangoGlyph  pango_win32_get_unknown_glyph   (PangoFont *font);

Return the index of a glyph suitable for drawing unknown characters.

font : a PangoFont
Returns : a glyph index into font


struct PangoWin32FontCache

struct PangoWin32FontCache;


pango_win32_font_cache_new ()

PangoWin32FontCache* pango_win32_font_cache_new
                                            (void);

Create a font cache.

Returns : The new font cache. This must be freed with pango_win32_font_cache_free().


pango_win32_font_cache_free ()

void        pango_win32_font_cache_free     (PangoWin32FontCache *cache);

Free a PangoWin32FontCache and all associated memory. All fonts loaded through this font cache will be freed along with the cache.


pango_win32_font_cache_load ()

HFONT       pango_win32_font_cache_load     (PangoWin32FontCache *cache,
                                             const LOGFONT *logfont);

Create a HFONT from a LOGFONT. The result may be newly loaded, or it may have been previously stored

cache : a PangoWin32FontCache
logfont : a pointer to a LOGFONT structure describing the font to load.
Returns : The font structure, or NULL if the font could not be loaded. In order to free this structure, you must call pango_win32_font_cache_unload().


pango_win32_font_cache_unload ()

void        pango_win32_font_cache_unload   (PangoWin32FontCache *cache,
                                             HFONT hfont);

Free a font structure previously loaded with pango_win32_font_cache_load()

cache : a PangoWin32FontCache
hfont : the HFONT to unload


pango_win32_font_map_for_display ()

PangoFontMap* pango_win32_font_map_for_display
                                            (void);

Returns : 


pango_win32_shutdown_display ()

void        pango_win32_shutdown_display    (void);

Free cached resources.


pango_win32_font_map_get_font_cache ()

PangoWin32FontCache* pango_win32_font_map_get_font_cache
                                            (PangoFontMap *font_map);

font_map : 
Returns :