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()); |