Bugzilla – Attachment 68779 Details for
Bug 47432
Impress renders all bold Chinese fonts incorrectly .
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Improve the faux bold in cairo canvas, to make the bold font better.
0001-fdo-47432-Improve-the-faux-bold-in-cairo-canvas.patch (text/plain), 1.61 KB, created by
Flex Liu
on 2012-10-19 06:06:05 UTC
(
hide
)
Description:
Improve the faux bold in cairo canvas, to make the bold font better.
Filename:
MIME Type:
Creator:
Flex Liu
Created:
2012-10-19 06:06:05 UTC
Size:
1.61 KB
patch
obsolete
>From 72ad91b439d549b2199d7e6a081f3f64f5773fa2 Mon Sep 17 00:00:00 2001 >From: Flex Liu <winddss@gmail.com> >Date: Fri, 19 Oct 2012 13:45:38 +0800 >Subject: [PATCH] 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. >--- > canvas/source/cairo/cairo_textlayout.cxx | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx >index 68143b5..29a2c26 100644 >--- a/canvas/source/cairo/cairo_textlayout.cxx >+++ b/canvas/source/cairo/cairo_textlayout.cxx >@@ -604,12 +604,13 @@ namespace cairocanvas > //faux bold > 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()); > } >-- >1.7.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 47432
:
58589
|
58590
| 68779 |
68780
|
68781
|
68782