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

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

Issue 325673002: Fixing handling of Ligature when letter-spacing is present (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 case FontDescription::NoneKerning: 175 case FontDescription::NoneKerning:
176 m_typesettingFeatures &= ~WebCore::Kerning; 176 m_typesettingFeatures &= ~WebCore::Kerning;
177 break; 177 break;
178 case FontDescription::NormalKerning: 178 case FontDescription::NormalKerning:
179 m_typesettingFeatures |= WebCore::Kerning; 179 m_typesettingFeatures |= WebCore::Kerning;
180 break; 180 break;
181 case FontDescription::AutoKerning: 181 case FontDescription::AutoKerning:
182 break; 182 break;
183 } 183 }
184 184
185 switch (commonLigaturesState()) { 185 // As per CSS (http://www.w3.org/TR/CSS2/text.html#propdef-letter-spacing),
Inactive 2014/06/09 13:09:44 Please always point to the latest version of the s
h.joshi 2014/06/09 13:33:53 In "https://developer.mozilla.org/en-US/docs/Web/C
186 case FontDescription::DisabledLigaturesState: 186 // when the resultant space between two characters
187 m_typesettingFeatures &= ~Ligatures; 187 // is not the same as the default space, user agents should not use ligature s
188 break; 188 if (m_letterSpacing != 0) {
189 case FontDescription::EnabledLigaturesState: 189 switch (commonLigaturesState()) {
190 m_typesettingFeatures |= Ligatures; 190 case FontDescription::DisabledLigaturesState:
191 break; 191 m_typesettingFeatures &= ~Ligatures;
192 case FontDescription::NormalLigaturesState: 192 break;
193 break; 193 case FontDescription::EnabledLigaturesState:
194 } 194 m_typesettingFeatures |= Ligatures;
195 break;
196 case FontDescription::NormalLigaturesState:
197 break;
198 }
195 199
196 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesState 200 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate
197 || historicalLigaturesState() == FontDescription::EnabledLigaturesState 201 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate
198 || contextualLigaturesState() == FontDescription::EnabledLigaturesState) { 202 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) {
199 m_typesettingFeatures |= WebCore::Ligatures; 203 m_typesettingFeatures |= WebCore::Ligatures;
204 }
200 } 205 }
201 } 206 }
202 207
203 } // namespace WebCore 208 } // namespace WebCore
OLDNEW
« LayoutTests/fast/text/font-ligature-letter-spacing.html ('K') | « Source/platform/fonts/Font.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698