![]() | ![]() | ![]() | PangoPDF Reference Manual | ![]() |
---|
GNOME Print Fonts and Rendering —
struct PangoGPLayout; #define PANGO_RENDER_TYPE_GP struct PangoGPFontMap; PangoContext* pango_gp_get_context (GnomePrintContext *gpc); PangoFontMap* pango_gp_font_map_for_display (void); void pango_gp_shutdown_display (void); void pango_gp_render (PangoContext *context, PangoLayoutRun *run, PangoFont *font, PangoGlyphString *glyphs,gint x,gint y); void pango_gp_render_layout_line (PangoContext *context, PangoLayoutLine *line,gint x,gint y); void pango_gp_render_layout_lines (PangoContext *context, PangoLayout *layout,gint line_first,gint line_last,gint x,gint y); void pango_gp_render_layout (PangoContext *context, PangoLayout *layout,gint x,gint y); PangoFontMap* pango_gp_font_map_new (void); void pango_gp_font_map_set_resolution (PangoGPFontMap *fontmap,double dpi_x,double dpi_y); void pango_gp_font_map_set_default_substitute (PangoGPFontMap *fontmap,PangoGPSubstituteFunc func,gpointer data,GDestroyNotify notify); void pango_gp_font_map_substitute_changed (PangoGPFontMap *fontmap); PangoContext* pango_gp_font_map_create_context (PangoGPFontMap *fontmap); enum PangoGPFontEmbed; enum PangoGPDebugFlags; PangoContext* pango_gp_font_map_create_context_with_debug_flags (PangoGPFontMap *fontmap, PangoGPDebugFlags debug_flags); void pango_gp_layout_set_line_height (PangoLayout *layout,gint line_height); void pango_gp_layout_set_line_stacking_strategy (PangoLayout *layout, PangoLineStackingStrategy line_stacking_strategy);gint pango_gp_layout_get_item_attrs (PangoItem *item, PangoAttrType first_attribute_type, ...); PangoGlyph pango_gp_get_unknown_glyph (PangoFont *font); int pango_gp_font_get_kerning (PangoFont *font, PangoGlyph left, PangoGlyph right);FT_Face pango_gp_font_get_face (PangoFont *font); PangoCoverage* pango_gp_font_get_coverage (PangoFont *font, PangoLanguage *language);
#define PANGO_RENDER_TYPE_GP "PangoRenderGP"
A string constant identifying the GNOME Print renderer. The associated
quark (see
PangoContext* pango_gp_get_context (GnomePrintContext *gpc);
Retrieves a PangoContext for the default PangoGP fontmap
(see
Use of this function is discouraged, see pango_gp_font_map_create_context() instead.
gpc : | |
Returns : | the new PangoContext |
PangoFontMap* pango_gp_font_map_for_display (void);
Returns a PangoGPFontMap. This font map is cached and should not be freed. If the font map is no longer needed, it can be released with pango_gp_shutdown_display().
Returns : | a PangoGPFontMap. |
void pango_gp_shutdown_display (void);
Free the global fontmap. (See pango_gp_font_map_for_display())
void pango_gp_render (PangoContext *context, PangoLayoutRun *run, PangoFont *font, PangoGlyphString *glyphs,gint x,gint y);
Renders a PangoGlyphString onto a GNOME Print context.
context : | the PangoContext representing where to render. |
run : | the PangoLayoutRun to render. |
font : | the font in which to draw the string. |
glyphs : | the glyph string to draw. |
x : | the x position of the start of the string (in PangoGlyphUnit). |
y : | the y position of the baseline (in PangoGlyphUnit). |
void pango_gp_render_layout_line (PangoContext *context, PangoLayoutLine *line,gint x,gint y);
Render a PangoLayoutLine onto a FreeType2 bitmap
context : | the PangoContext representing where to render. |
line : | a PangoLayoutLine |
x : | the x position of start of string (in PangoGlyphUnit) |
y : | the y position of baseline (in PangoGlyphUnit) |
void pango_gp_render_layout_lines (PangoContext *context, PangoLayout *layout,gint line_first,gint line_last,gint x,gint y);
Render some lines from PangoLayout onto a GNOME Print PDF document.
context : | the PangoContext representing where to render. |
layout : | a PangoLayout |
line_first : | the first line to render. |
line_last : | the last line to render. |
x : | the X position of the left of the layout (in PangoGlyphUnit) |
y : | the Y position of the top of the layout (in PangoGlyphUnit) |
void pango_gp_render_layout (PangoContext *context, PangoLayout *layout,gint x,gint y);
Render a PangoLayout onto a GNOME Print PDF document.
context : | the PangoContext representing where to render. |
layout : | a PangoLayout |
x : | the X position of the left of the layout (in PangoGlyphUnit) |
y : | the Y position of the top of the layout (in PangoGlyphUnit) |
PangoFontMap* pango_gp_font_map_new (void);
Create a new PangoGPFontMap object; a fontmap is used
to cache information about available fonts, and holds
certain global parameters such as the resolution and
the default substitute function (see
Returns : | the newly created fontmap object. Unref with g_object_unref when you are finished with it. |
void pango_gp_font_map_set_resolution (PangoGPFontMap *fontmap,double dpi_x,double dpi_y);
Sets the horizontal and vertical resolutions for the fontmap.
fontmap : | a |
dpi_x : | dots per inch in the X direction |
dpi_y : | dots per inch in the Y direction |
void pango_gp_font_map_set_default_substitute (PangoGPFontMap *fontmap,PangoGPSubstituteFunc func,gpointer data,GDestroyNotify notify);
Sets a function that will be called to do final configuration
substitution on a
Since: 1.2
fontmap : | a PangoGPFontMap |
func : | function to call to to do final config tweaking
on |
data : | data to pass to func |
notify : | function to call when data is no longer used. |
void pango_gp_font_map_substitute_changed (PangoGPFontMap *fontmap);
Call this function any time the results of the default substitution function set with pango_gp_font_map_set_default_substitute() change. That is, if your subsitution function will return different results for the same input pattern, you must call this function.
fontmap : | a |
PangoContext* pango_gp_font_map_create_context (PangoGPFontMap *fontmap);
Create a PangoContext for the given fontmap.
fontmap : | a |
Returns : | the newly created context; free with |
typedef enum { PANGO_GP_FONT_EMBED_INVALID, PANGO_GP_FONT_EMBED_ALL, PANGO_GP_FONT_EMBED_NONBASE, PANGO_GP_FONT_EMBED_NONE } PangoGPFontEmbed;
The PangoGPFontEmbed will be used to specify what range of fonts to embed in the output.
PANGO_GP_FONT_EMBED_INVALID | No valid embedding has been specified. |
PANGO_GP_FONT_EMBED_ALL | Embed all fonts. |
PANGO_GP_FONT_EMBED_NONBASE | Embed all fonts except the 'base' fonts that are expected to be pre-installed in all viewers/printers. |
PANGO_GP_FONT_EMBED_NONE | Do not embed any fonts. |
typedef enum { PANGO_GP_DEBUG_NONE = 0, PANGO_GP_DEBUG_DEBUG = 1, PANGO_GP_DEBUG_MASK = 0x01 } PangoGPDebugFlags;
The PangoGPDebugFlags will be used to control the level of debugging output.
PangoContext* pango_gp_font_map_create_context_with_debug_flags (PangoGPFontMap *fontmap, PangoGPDebugFlags debug_flags);
Create a PangoContext for the given fontmap.
Debug flags are currently ignored.
fontmap : | a |
debug_flags : | PangoGPDebugFlags. |
Returns : | the newly created context; free with |
void pango_gp_layout_set_line_height (PangoLayout *layout,gint line_height);
Sets the line-height of the layout.
layout : | The PangoGPLayout. |
line_height : | The line-height for the layout. |
void pango_gp_layout_set_line_stacking_strategy (PangoLayout *layout, PangoLineStackingStrategy line_stacking_strategy);
Sets the line-stacking-strategy of the layout.
layout : | The PangoGPLayout. |
line_stacking_strategy : | The line-stacking-strategy for the layout. |
gint pango_gp_layout_get_item_attrs (PangoItem *item, PangoAttrType first_attribute_type, ...);
Gets specified attribute types, if present, from the extra attributes of item.
For each specified attribute type, if item has an attribute of that type, sets the PangoAttribute pointed to by the following argument to the attribute.
If item does not have an attribute of the specified type, sets the PangoAttribute pointed to by the following argument to NULL.
item : | PangoItem which may have extra attributes. |
first_attribute_type : | PangoAttrType of a predefined or registered attribute type. |
... : | Remainder of list of PangoAttrType and
**PangoAttribute pairs, terminated by
|
Returns : | The number of matches found. |
PangoGlyph pango_gp_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 |
int pango_gp_font_get_kerning (PangoFont *font, PangoGlyph left, PangoGlyph right);
Retrieves kerning information for a combination of two glyphs.
font : | a PangoFont |
left : | the left PangoGlyph |
right : | the right PangoGlyph |
Returns : | The amount of kerning (in Pango units) to apply for the given combination of glyphs. |
FT_Face pango_gp_font_get_face (PangoFont *font);
Returns the native FreeType2 FT_Face structure used for this PangoFont. This may be useful if you want to use FreeType2 functions directly.
font : | a PangoFont |
Returns : | a pointer to a |
PangoCoverage* pango_gp_font_get_coverage (PangoFont *font, PangoLanguage *language);
Should not be called directly, use pango_font_get_coverage() instead.
font : | a |
language : | a language tag. |
Returns : | a PangoCoverage. |
<< FreeType Fonts and Rendering | PDFlib Fonts and Rendering >> |