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

Side by Side Diff: Source/platform/fonts/mac/FontCacheMac.mm

Issue 715363005: Remove FontPlatformData::m_widthVariant. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 1 month 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, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (fontDescription.style()) 217 if (fontDescription.style())
218 actualTraits = [fontManager traitsOfFont:nsFont]; 218 actualTraits = [fontManager traitsOfFont:nsFont];
219 NSInteger actualWeight = [fontManager weightOfFont:nsFont]; 219 NSInteger actualWeight = [fontManager weightOfFont:nsFont];
220 220
221 NSFont *platformFont = useHinting() ? [nsFont screenFont] : [nsFont printerF ont]; 221 NSFont *platformFont = useHinting() ? [nsFont screenFont] : [nsFont printerF ont];
222 bool syntheticBold = (isAppKitFontWeightBold(weight) && !isAppKitFontWeightB old(actualWeight)) || fontDescription.isSyntheticBold(); 222 bool syntheticBold = (isAppKitFontWeightBold(weight) && !isAppKitFontWeightB old(actualWeight)) || fontDescription.isSyntheticBold();
223 bool syntheticItalic = ((traits & NSFontItalicTrait) && !(actualTraits & NSF ontItalicTrait)) || fontDescription.isSyntheticItalic(); 223 bool syntheticItalic = ((traits & NSFontItalicTrait) && !(actualTraits & NSF ontItalicTrait)) || fontDescription.isSyntheticItalic();
224 224
225 // FontPlatformData::font() can be null for the case of Chromium out-of-proc ess font loading. 225 // FontPlatformData::font() can be null for the case of Chromium out-of-proc ess font loading.
226 // In that case, we don't want to use the platformData. 226 // In that case, we don't want to use the platformData.
227 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo rmFont, size, syntheticBold, syntheticItalic, fontDescription.orientation(), fon tDescription.widthVariant())); 227 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo rmFont, size, syntheticBold, syntheticItalic, fontDescription.orientation()));
228 if (!platformData->font()) 228 if (!platformData->font())
229 return 0; 229 return 0;
230 return platformData.leakPtr(); 230 return platformData.leakPtr();
231 } 231 }
232 232
233 } // namespace blink 233 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontPlatformData.cpp ('k') | Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698