Code

BUG 284680 convert text to paths on cairo output
authortheAdib <theAdib@users.sourceforge.net>
Tue, 12 May 2009 20:49:28 +0000 (20:49 +0000)
committertheAdib <theAdib@users.sourceforge.net>
Tue, 12 May 2009 20:49:28 +0000 (20:49 +0000)
src/extension/internal/cairo-render-context.cpp

index e10b637f369d172b80e1021b5c375a05e55f7366..e9ac98df8e18a59c4c0bbaa80a799b11dbe20014 100644 (file)
@@ -1459,10 +1459,16 @@ CairoRenderContext::_showGlyphs(cairo_t *cr, PangoFont *font, std::vector<CairoG
         i++;
     }
 
-    if (is_stroke || _is_texttopath)
+    if (is_stroke) {
         cairo_glyph_path(cr, glyphs, num_glyphs - num_invalid_glyphs);
-    else
-        cairo_show_glyphs(cr, glyphs, num_glyphs - num_invalid_glyphs);
+    } else {
+        if (_is_texttopath) {
+            cairo_glyph_path(cr, glyphs, num_glyphs - num_invalid_glyphs);
+            cairo_fill_preserve(cr);
+        } else {
+            cairo_show_glyphs(cr, glyphs, num_glyphs - num_invalid_glyphs);
+        }
+    }
 
     if (num_glyphs > GLYPH_ARRAY_SIZE)
         g_free(glyphs);