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

Side by Side Diff: Source/core/platform/graphics/skia/FontCacheSkiaWin.cpp

Issue 23549036: Fix typefacesMatchesFamily to treat family string as UTF8 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return 0; 157 return 0;
158 } 158 }
159 159
160 static bool typefacesMatchesFamily(const SkTypeface* tf, const AtomicString& fam ily) 160 static bool typefacesMatchesFamily(const SkTypeface* tf, const AtomicString& fam ily)
161 { 161 {
162 SkTypeface::LocalizedStrings* actualFamilies = tf->createFamilyNameIterator( ); 162 SkTypeface::LocalizedStrings* actualFamilies = tf->createFamilyNameIterator( );
163 bool matchesRequestedFamily = false; 163 bool matchesRequestedFamily = false;
164 SkTypeface::LocalizedString actualFamily; 164 SkTypeface::LocalizedString actualFamily;
165 165
166 while (actualFamilies->next(&actualFamily)) { 166 while (actualFamilies->next(&actualFamily)) {
167 if (equalIgnoringCase(family, actualFamily.fString.c_str())) { 167 if (equalIgnoringCase(family, AtomicString::fromUTF8(actualFamily.fStrin g.c_str()))) {
leviw_travelin_and_unemployed 2013/09/18 20:07:46 Talked to eseidel. He mentioned that we may want t
168 matchesRequestedFamily = true; 168 matchesRequestedFamily = true;
169 break; 169 break;
170 } 170 }
171 } 171 }
172 actualFamilies->unref(); 172 actualFamilies->unref();
173 173
174 return matchesRequestedFamily; 174 return matchesRequestedFamily;
175 } 175 }
176 176
177 FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD escription, const AtomicString& family) 177 FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD escription, const AtomicString& family)
(...skipping 17 matching lines...) Expand all
195 name.data(), 195 name.data(),
196 fontDescription.computedSize(), 196 fontDescription.computedSize(),
197 fontDescription.weight() >= FontWeightBold && !tf->isBold(), 197 fontDescription.weight() >= FontWeightBold && !tf->isBold(),
198 fontDescription.italic() && !tf->isItalic(), 198 fontDescription.italic() && !tf->isItalic(),
199 fontDescription.orientation()); 199 fontDescription.orientation());
200 tf->unref(); 200 tf->unref();
201 return result; 201 return result;
202 } 202 }
203 203
204 } 204 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698