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

Side by Side Diff: Source/platform/fonts/FontDescription.cpp

Issue 275913005: Remove usePrinterFont() property of FontDescription (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaselinining small caps cases, and subpixel virtual set Created 6 years, 7 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 | « Source/platform/fonts/FontDescription.h ('k') | Source/platform/fonts/FontPlatformData.h » ('j') | 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) 2007 Nicholas Shanks <contact@nickshanks.com> 2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com>
3 * Copyright (C) 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Apple 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 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return floorf(size * FontCacheKey::precisionMultiplier()) / FontCacheKey::pr ecisionMultiplier(); 126 return floorf(size * FontCacheKey::precisionMultiplier()) / FontCacheKey::pr ecisionMultiplier();
127 } 127 }
128 128
129 FontCacheKey FontDescription::cacheKey(const AtomicString& familyName, FontTrait s desiredTraits) const 129 FontCacheKey FontDescription::cacheKey(const AtomicString& familyName, FontTrait s desiredTraits) const
130 { 130 {
131 FontTraits fontTraits = desiredTraits.mask() 131 FontTraits fontTraits = desiredTraits.mask()
132 ? desiredTraits 132 ? desiredTraits
133 : traits(); 133 : traits();
134 134
135 unsigned options = 135 unsigned options =
136 static_cast<unsigned>(m_syntheticItalic) << 8 | // bit 9 136 static_cast<unsigned>(m_syntheticItalic) << 7 | // bit 8
137 static_cast<unsigned>(m_syntheticBold) << 7 | // bit 8 137 static_cast<unsigned>(m_syntheticBold) << 6 | // bit 7
138 static_cast<unsigned>(m_fontSmoothing) << 5 | // bits 6-7 138 static_cast<unsigned>(m_fontSmoothing) << 4 | // bits 5-6
139 static_cast<unsigned>(m_textRendering) << 3 | // bits 4-5 139 static_cast<unsigned>(m_textRendering) << 2 | // bits 3-4
140 static_cast<unsigned>(m_orientation) << 2 | // bit 3 140 static_cast<unsigned>(m_orientation) << 1 | // bit 2
141 static_cast<unsigned>(m_usePrinterFont) << 1 | // bit 2
142 static_cast<unsigned>(m_subpixelTextPosition); // bit 1 141 static_cast<unsigned>(m_subpixelTextPosition); // bit 1
143 142
144 return FontCacheKey(familyName, effectiveFontSize(), options | fontTraits.ma sk() << 9); 143 return FontCacheKey(familyName, effectiveFontSize(), options | fontTraits.ma sk() << 8);
145 } 144 }
146 145
147 146
148 void FontDescription::setDefaultTypesettingFeatures(TypesettingFeatures typesett ingFeatures) 147 void FontDescription::setDefaultTypesettingFeatures(TypesettingFeatures typesett ingFeatures)
149 { 148 {
150 s_defaultTypesettingFeatures = typesettingFeatures; 149 s_defaultTypesettingFeatures = typesettingFeatures;
151 } 150 }
152 151
153 TypesettingFeatures FontDescription::defaultTypesettingFeatures() 152 TypesettingFeatures FontDescription::defaultTypesettingFeatures()
154 { 153 {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 193 }
195 194
196 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesState 195 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesState
197 || historicalLigaturesState() == FontDescription::EnabledLigaturesState 196 || historicalLigaturesState() == FontDescription::EnabledLigaturesState
198 || contextualLigaturesState() == FontDescription::EnabledLigaturesState) { 197 || contextualLigaturesState() == FontDescription::EnabledLigaturesState) {
199 m_typesettingFeatures |= WebCore::Ligatures; 198 m_typesettingFeatures |= WebCore::Ligatures;
200 } 199 }
201 } 200 }
202 201
203 } // namespace WebCore 202 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | Source/platform/fonts/FontPlatformData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698