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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp

Issue 1806363002: Revert of Shape unicode-range: font faces in only one iteration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
index 74b829f191d7eab2e8b38b7957d90163d162a829..ed89e06329adfd9b94d7685f474fb220a8e84868 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -275,7 +275,8 @@
unsigned startIndex,
unsigned numCharacters,
const SimpleFontData* currentFont,
- PassRefPtr<UnicodeRangeSet> currentFontRangeSet,
+ unsigned currentFontRangeFrom,
+ unsigned currentFontRangeTo,
UScriptCode currentRunScript,
hb_language_t language)
{
@@ -295,7 +296,7 @@
m_font->getFontDescription(), m_normalizedBuffer.get(), m_normalizedBufferLength,
startIndex, numCharacters);
- HarfBuzzScopedPtr<hb_font_t> harfBuzzFont(face->createFont(currentFontRangeSet), hb_font_destroy);
+ HarfBuzzScopedPtr<hb_font_t> harfBuzzFont(face->createFont(currentFontRangeFrom, currentFontRangeTo), hb_font_destroy);
hb_shape(harfBuzzFont.get(), harfBuzzBuffer, m_features.isEmpty() ? 0 : m_features.data(), m_features.size());
return true;
@@ -511,7 +512,8 @@
appendToHolesQueue(HolesQueueRange, segmentRange.start, segmentRange.end - segmentRange.start);
const SimpleFontData* currentFont = nullptr;
- RefPtr<UnicodeRangeSet> currentFontRangeSet;
+ unsigned currentFontRangeFrom = 0;
+ unsigned currentFontRangeTo = 0;
bool fontCycleQueued = false;
while (m_holesQueue.size()) {
@@ -531,10 +533,10 @@
break;
}
- FontDataForRangeSet nextFontDataForRangeSet = fallbackIterator->next(fallbackCharsHint);
- currentFont = nextFontDataForRangeSet.fontData().get();
- currentFontRangeSet = nextFontDataForRangeSet.ranges();
-
+ FontDataRange nextFontDataRange = fallbackIterator->next(fallbackCharsHint);
+ currentFont = nextFontDataRange.fontData().get();
+ currentFontRangeFrom = nextFontDataRange.from();
+ currentFontRangeTo = nextFontDataRange.to();
if (!currentFont) {
ASSERT(!m_holesQueue.size());
break;
@@ -562,7 +564,8 @@
currentQueueItem.m_startIndex,
currentQueueItem.m_numCharacters,
directionAndSmallCapsAdjustedFont,
- currentFontRangeSet,
+ currentFontRangeFrom,
+ currentFontRangeTo,
segmentRange.script,
language))
WTF_LOG_ERROR("Shaping range failed.");

Powered by Google App Engine
This is Rietveld 408576698