Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Issue 207009: Workaround for Issue 15949: cannot use the "WenQuanYi Bitmap Song" (chinese F... (Closed)

Created:
11 years, 3 months ago by Yusuke Sato
Modified:
9 years, 7 months ago
Reviewers:
agl, sky
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Workaround for Issue 15949: cannot use the "WenQuanYi Bitmap Song" (chinese Fonts) as the system fonts with chrome - Adding a font fallback code to Font::CreateFont() in font_skia.cc so that Chromium can startup even when a non-scalable font is selected as an application font. If the application font is non-scalable, Font::CreateFont() loads a _scalable_ "sans" font as a fallback. (Note: The function still never load non-scalable fonts.) - Removed a comment for issue 12530 since the issue has been fixed. BUG=12530 BUG=15949 TEST=Download the snap.pcf font from http://artwizaleczapka.sourceforge.net/ and put it to ~/.fonts/. Remove temporarily /etc/fonts/conf.d/70-no-bitmaps.conf and run "fc-cache -f". Start /ust/bin/gnome-appearance-properties and select "snap" as your application font. Then start chromium and verify that it does not crash (by the CHECK failure) on startup. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26652

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -4 lines) Patch
M app/gfx/font_skia.cc View 1 2 2 chunks +23 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Yusuke Sato
agl: Could you review this? sky: If you're planning to nuke the file, font_skia.cc, to ...
11 years, 3 months ago (2009-09-17 06:17:05 UTC) #1
sky
I would like to nuke font_skia, but using pango directly incurs at best a 10% ...
11 years, 3 months ago (2009-09-17 15:27:26 UTC) #2
Yusuke Sato
Thanks for the writeup. So, I think this patch does not conflict with your plan ...
11 years, 3 months ago (2009-09-18 03:53:08 UTC) #3
sky
LGTM as long as you convert from wchar_t to char. http://codereview.chromium.org/207009/diff/2001/2002 File app/gfx/font_skia.cc (right): http://codereview.chromium.org/207009/diff/2001/2002#newcode20 ...
11 years, 3 months ago (2009-09-18 13:52:36 UTC) #4
Yusuke Sato
11 years, 3 months ago (2009-09-18 15:30:01 UTC) #5
Thanks for the review.

http://codereview.chromium.org/207009/diff/2001/2002
File app/gfx/font_skia.cc (right):

http://codereview.chromium.org/207009/diff/2001/2002#newcode20
Line 20: const wchar_t* kFallbackFontFamilyName = L"sans";
On 2009/09/18 13:52:36, sky wrote:
> make this as char* as the function you call takes UTF8.

Done.

Powered by Google App Engine
This is Rietveld 408576698