source file of the GNU LilyPond music typesetter
- (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2004--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#define PANGO_ENABLE_BACKEND // ugh, why necessary?
#include "stencil.hh"
Pango_font::Pango_font (PangoFT2FontMap *fontmap,
- PangoFontDescription *description,
+ PangoFontDescription const *description,
Real output_scale)
{
(void) fontmap;
+
physical_font_tab_ = scm_c_make_hash_table (11);
PangoDirection pango_dir = PANGO_DIRECTION_LTR;
context_
= pango_ft2_get_context (PANGO_RESOLUTION, PANGO_RESOLUTION);
- // context_ = pango_ft2_font_map_create_context (fontmap);
pango_description_ = pango_font_description_copy (description);
attribute_list_ = pango_attr_list_new ();
char glyph_name[GLYPH_NAME_LEN];
PangoAnalysis const *pa = &(item->analysis);
PangoGlyphString *pgs = pango_glyph_string_new ();
-
+
pango_shape (str.c_str () + item->offset,
item->length, (PangoAnalysis*) pa, pgs);
{
int errorcode = FT_Get_Glyph_Name (ftface, pg, glyph_name, GLYPH_NAME_LEN);
if (errorcode)
- programming_error ("FT_Get_Glyph_Name returns error");
+ programming_error (_f ("FT_Get_Glyph_Name() error: %s",
+ freetype_error_string (errorcode).c_str()
+ ));
}
SCM char_id = SCM_EOL;
tail = SCM_CDRLOC (*tail);
}
+ pango_glyph_string_free (pgs);
+ pgs = 0;
PangoFontDescription *descr = pango_font_describe (pa->font);
Real size = pango_font_description_get_size (descr)
/ (Real (PANGO_SCALE));
return Stencil (b, exp);
}
+ g_list_free (items);
return dest;
}