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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp

Issue 1939203002: Reland: Move glyph lookup to hb-ot-font and remove glyph cache in HarfBuzzFace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
index 209c675cf33455b896ed1e8ba11d0e09eb68a670..85357e16c4be53b46f8039f63d03f48d17e55f17 100644
--- a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
@@ -281,20 +281,20 @@ static inline bool tableHasSpace(hb_face_t* face, hb_set_t* glyphs,
bool FontPlatformData::hasSpaceInLigaturesOrKerning(
TypesettingFeatures features) const
{
- const HarfBuzzFace* hbFace = harfBuzzFace();
+ HarfBuzzFace* hbFace = harfBuzzFace();
if (!hbFace)
return false;
hb_face_t* face = hbFace->face();
ASSERT(face);
- OwnPtr<hb_font_t> font = adoptPtr(hbFace->createFont());
+ hb_font_t* font = hbFace->getScaledFont();
ASSERT(font);
hb_codepoint_t space;
// If the space glyph isn't present in the font then each space character
// will be rendering using a fallback font, which grantees that it cannot
// affect the shape of the preceding word.
- if (!hb_font_get_glyph(font.get(), spaceCharacter, 0, &space))
+ if (!hb_font_get_glyph(font, spaceCharacter, 0, &space))
return false;
if (!hb_ot_layout_has_substitution(face)
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698