summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fcfont.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-08-16 07:23:08 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-08-16 07:23:08 +0000
commitbb26941a468b994331286a55d41447cc2ef9326f (patch)
tree7e38be8a1800f49aeed0e0b54e8e74524124a46c /pango/pangocairo-fcfont.c
parent292545e94970319545d1a2d8a5ebb700ade67565 (diff)
downloadpango-bb26941a468b994331286a55d41447cc2ef9326f.tar.gz
Render block progression and line direction arrows, and a base gravity
2006-08-16 Behdad Esfahbod <behdad@gnome.org> * examples/viewer-pangocairo.c (render_callback): Render block progression and line direction arrows, and a base gravity roof-top. * pango/pango-matrix.c (pango_matrix_to_gravity): New function. * pango/pango-utils.c (pango_gravity_to_rotation): New function. * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Use pango_gravity_to_rotation(). * pango/pango-utils.h: * pango/pango-types.h: Reorder a bit. * examples/Makefile.am: * examples/test-chinese.txt: New test text for Chinese. * pango/check.defs: New script that checks that all the exported symbols are listed in the respective .def file. (only checks the libraries actually built. No win32 for example.) * pango/Makefile.am: Hook check.defs as a 'make check' test. * pango/pango.def: * pango/pangoft2.def: * pango/pangocairo.def: Update. * docs/tmpl/glyphs.sgml: * docs/tmpl/main.sgml: * docs/pango-sections.txt: Update.
Diffstat (limited to 'pango/pangocairo-fcfont.c')
-rw-r--r--pango/pangocairo-fcfont.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c
index 0e503061..a0dec5c6 100644
--- a/pango/pangocairo-fcfont.c
+++ b/pango/pangocairo-fcfont.c
@@ -496,7 +496,7 @@ _pango_cairo_fc_font_new (PangoCairoFcFontMap *cffontmap,
PangoCairoFcFont *cffont;
const PangoMatrix *pango_ctm;
FcMatrix *fc_matrix;
- double size, rotation;
+ double size;
g_return_val_if_fail (PANGO_IS_CAIRO_FC_FONT_MAP (cffontmap), NULL);
g_return_val_if_fail (pattern != NULL, NULL);
@@ -521,15 +521,8 @@ _pango_cairo_fc_font_new (PangoCairoFcFontMap *cffontmap,
else
cairo_matrix_init_identity (&cffont->font_matrix);
- switch (cffont->gravity)
- {
- default:
- case PANGO_GRAVITY_SOUTH: rotation = 0; break;
- case PANGO_GRAVITY_NORTH: rotation = M_PI; break;
- case PANGO_GRAVITY_EAST: rotation = -M_PI_2; break;
- case PANGO_GRAVITY_WEST: rotation = +M_PI_2; break;
- }
- cairo_matrix_rotate(&cffont->font_matrix, rotation);
+ cairo_matrix_rotate(&cffont->font_matrix,
+ pango_gravity_to_rotation (cffont->gravity));
pango_ctm = pango_context_get_matrix (context);