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

Unified Diff: Source/platform/fonts/SimpleFontData.cpp

Issue 870523003: Check for Unicode in Font before ICU call (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test patch - Convert to NFC for if diacritical marks are present Created 5 years, 10 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: Source/platform/fonts/SimpleFontData.cpp
diff --git a/Source/platform/fonts/SimpleFontData.cpp b/Source/platform/fonts/SimpleFontData.cpp
index a0714b9e28ecbd5b734792008945fa3828b88fa1..016f93585645f8be4d75c225dbc3cff13e3766ec 100644
--- a/Source/platform/fonts/SimpleFontData.cpp
+++ b/Source/platform/fonts/SimpleFontData.cpp
@@ -460,6 +460,16 @@ bool SimpleFontData::canRenderCombiningCharacterSequence(const UChar* characters
return false;
}
+bool SimpleFontData::fontHasGlyphForCharacter(UChar32 character) const
+{
+ unsigned pageNumber = (character / GlyphPage::size);
eae 2015/02/10 15:40:12 Remove unnecessary parentheses.
h.joshi 2015/02/17 03:44:47 Done.
+
+ GlyphPageTreeNode* node = GlyphPageTreeNode::getNormalRootChild(this, pageNumber);
+ GlyphPage* page = node->page();
+
+ return page && page->glyphForCharacter(character);
+}
+
bool SimpleFontData::fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const
{
if (SkUTF16_IsHighSurrogate(buffer[bufferLength-1])) {

Powered by Google App Engine
This is Rietveld 408576698