Comment 43 for bug 585910

Revision history for this message
In , Flex Liu (winddss) wrote :

Yes, I reproduce the issue in master still.

I find the problem should be located in file:
/core/canvas/source/cairo/cairo_textlayout.cxx:608

            //faux bold
            if (rSysFontData.bFakeBold) {
                double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() );
                int total_steps = 2 * ((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_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
                }
                OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:%d", (int) bold_dx);
            }

yes, that's cause the bold in Asian font so ugly.