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

Unified Diff: Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm

Issue 175253002: Switch to HarfBuzz on Mac and remove CoreText shaper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: ChromiumAATTest font based test added, header inclusion order fixed Created 6 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: Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm
diff --git a/Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm b/Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm
index 9f3bd9fc9599faedf78e3e3384b2c116163ba6be..de9069b35905ef4f51ad9edc580d7a7c29e06545 100644
--- a/Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm
+++ b/Source/platform/fonts/cocoa/FontPlatformDataCocoa.mm
@@ -290,28 +290,9 @@ SkTypeface* FontPlatformData::typeface() const{
}
#if OS(MACOSX)
-static bool isAATFont(CTFontRef ctFont)
-{
- CFDataRef table = CTFontCopyTable(ctFont, kCTFontTableMort, 0);
- if (table) {
- CFRelease(table);
- return true;
- }
- table = CTFontCopyTable(ctFont, kCTFontTableMorx, 0);
- if (table) {
- CFRelease(table);
- return true;
- }
- return false;
-}
-
HarfBuzzFace* FontPlatformData::harfBuzzFace()
{
CTFontRef font = ctFont();
- // HarfBuzz can't handle AAT font
- if (isAATFont(font))
- return 0;
-
if (!m_harfBuzzFace) {
uint64_t uniqueID = reinterpret_cast<uintptr_t>(font);
m_harfBuzzFace = HarfBuzzFace::create(const_cast<FontPlatformData*>(this), uniqueID);

Powered by Google App Engine
This is Rietveld 408576698