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

Side by Side Diff: Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 339693002: [DirectWrite] Force fully aliased text for certain fonts at small sizes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 FontPlatformData* result = new FontPlatformData(tf, 220 FontPlatformData* result = new FontPlatformData(tf,
221 name.data(), 221 name.data(),
222 fontSize, 222 fontSize,
223 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr iption.isSyntheticBold(), 223 fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescr iption.isSyntheticBold(),
224 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes cription.isSyntheticItalic(), 224 fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDes cription.isSyntheticItalic(),
225 fontDescription.orientation(), 225 fontDescription.orientation(),
226 s_useSubpixelPositioning); 226 s_useSubpixelPositioning);
227 227
228 struct FamilyMinSize {
229 const wchar_t* family;
230 unsigned minSize;
231 };
232 const static FamilyMinSize minAntiAliasSizeForFont[] = {
233 { L"simsun", 16 },
234 { L"dotum", 12 }
235 };
236 size_t numFonts = WTF_ARRAY_LENGTH(minAntiAliasSizeForFont);
237 for (size_t i = 0; i < numFonts; i++) {
238 FamilyMinSize entry = minAntiAliasSizeForFont[i];
239 if (typefacesMatchesFamily(tf.get(), entry.family)) {
240 result->setMinSizeForAntiAlias(entry.minSize);
241 break;
242 }
243 }
244
228 return result; 245 return result;
229 } 246 }
230 247
231 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698