canvas/source/cairo/cairo_textlayout.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit cad7a5814775adf458f8a490700fa5ef6b8f8638
Author: Flex Liu <wind...@gmail.com>
Date:   Fri Oct 26 15:18:35 2012 +0100

    Resolves: fdo#47432 Improve the "faux bold" in cairo canvas
    
    The "faux bold" make the bold font in Asian ugly & unacceptable,
    Adjust & improve the "faux bold" to make the bold font better.
    
    Change-Id: I2e02156ffc30629476b80134ffb0b50e793f7ead
    Signed-off-by: Jan Holesovsky <ke...@suse.cz>

diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index adea863..d6de60a 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -618,14 +618,15 @@ namespace cairocanvas
             if (rSysFontData.bFakeBold)
             {
                 double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() );
-                int total_steps = 2 * ((int) (bold_dx + 0.5));
+                int total_steps = 1 * ((int) (bold_dx + 0.5));
 
                 // loop to draw the text for every half pixel of displacement
                 for (int nSteps = 0; nSteps < total_steps; nSteps++)
                 {
                     for(int nGlyphIdx = 0; nGlyphIdx < (int) 
cairo_glyphs.size(); nGlyphIdx++)
                     {
-                        cairo_glyphs[nGlyphIdx].x += bold_dx * nSteps / 
total_steps;
+                        cairo_glyphs[nGlyphIdx].x += (bold_dx * nSteps / 
total_steps) / 4;
+                        cairo_glyphs[nGlyphIdx].y -= (bold_dx * nSteps / 
total_steps) / 4;
                     }
                     cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], 
cairo_glyphs.size());
                 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to