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

Unified Diff: Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp

Issue 343813002: Explicitly compare FontVariant to enumerators. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/WidthIterator.cpp ('k') | Source/platform/fonts/mac/ComplexTextController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
diff --git a/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp b/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
index 051f63c540257edb7265d73e23d5c5e0fb65cbe3..85e4301106c0ab93c5c8f284c438b960eed39e47 100644
--- a/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
+++ b/Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp
@@ -841,7 +841,7 @@ bool HarfBuzzShaper::shapeHarfBuzzRuns()
static const uint16_t preContext = ' ';
hb_buffer_add_utf16(harfBuzzBuffer.get(), &preContext, 1, 1, 0);
- if (fontDescription.variant() && u_islower(m_normalizedBuffer[currentRun->startIndex()])) {
+ if (fontDescription.variant() == FontVariantSmallCaps && u_islower(m_normalizedBuffer[currentRun->startIndex()])) {
String upperText = String(m_normalizedBuffer.get() + currentRun->startIndex(), currentRun->numCharacters()).upper();
ASSERT(!upperText.is8Bit()); // m_normalizedBuffer is 16 bit, therefore upperText is 16 bit, even after we call makeUpper().
hb_buffer_add_utf16(harfBuzzBuffer.get(), toUint16(upperText.characters16()), currentRun->numCharacters(), 0, currentRun->numCharacters());
« no previous file with comments | « Source/platform/fonts/WidthIterator.cpp ('k') | Source/platform/fonts/mac/ComplexTextController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698