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

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

Issue 1880623002: Revert "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 110945c43751eea9a514f674e475a2abcfd751fd..f6b17fdf86dba1841eb3c1f430580216b4812b53 100644
--- a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
@@ -286,20 +286,20 @@ static inline bool tableHasSpace(hb_face_t* face, hb_set_t* glyphs,
bool FontPlatformData::hasSpaceInLigaturesOrKerning(
TypesettingFeatures features) const
{
- HarfBuzzFace* hbFace = harfBuzzFace();
+ const HarfBuzzFace* hbFace = harfBuzzFace();
if (!hbFace)
return false;
hb_face_t* face = hbFace->face();
ASSERT(face);
- hb_font_t* font = hbFace->getScaledFont();
+ OwnPtr<hb_font_t> font = adoptPtr(hbFace->createFont());
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, spaceCharacter, 0, &space))
+ if (!hb_font_get_glyph(font.get(), 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