diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 22:44:09 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 22:44:09 +0000 |
commit | b3467a4dd2f9d7c6473c1fcd22a31c2ac39a2d88 (patch) | |
tree | e2f55061517c5aaf3e87beca9c335bfcc9e530c1 /skia/sgl | |
parent | 378f3ac5cd7c0c170cf3e8e54aa627defcb590da (diff) | |
download | chromium_src-b3467a4dd2f9d7c6473c1fcd22a31c2ac39a2d88.zip chromium_src-b3467a4dd2f9d7c6473c1fcd22a31c2ac39a2d88.tar.gz chromium_src-b3467a4dd2f9d7c6473c1fcd22a31c2ac39a2d88.tar.bz2 |
Linux: support css font-family fallback.
Currently we'll always take the first element of a font-family list and
run with it, using fontconfig's fallback. This adds a, slightly hacky,
test to see if the fontconfig result is good enough and, if not, reports
the failure back into WebKit so that other font-family elements can be
tried.
This fixes LayoutTests/css2.1/t040103-escapes-01-b.html
Review URL: http://codereview.chromium.org/12914
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/sgl')
-rw-r--r-- | skia/sgl/SkTypeface.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/skia/sgl/SkTypeface.cpp b/skia/sgl/SkTypeface.cpp index 9821c51..79cb631 100644 --- a/skia/sgl/SkTypeface.cpp +++ b/skia/sgl/SkTypeface.cpp @@ -26,7 +26,8 @@ bool SkTypeface::Equal(const SkTypeface* facea, const SkTypeface* faceb) SkTypeface* SkTypeface::Create(const char name[], Style style) { SkTypeface* face = SkFontHost::FindTypeface(NULL, name, style); - face->ref(); + if (face) + face->ref(); return face; } |