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

Unified Diff: Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp

Issue 691733004: Do not use SkCreateTypefaceFromCTFont for custom fonts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed lion-specific test expectations Created 6 years, 1 month 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 | « Source/platform/fonts/FontPlatformData.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp
diff --git a/Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp b/Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp
index 022bffaa418d915659cf58913afcbf81bcb7d109..dacd0caa14b2441419ed5db884804edeeb30154c 100644
--- a/Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp
+++ b/Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp
@@ -44,7 +44,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
FontPlatformData FontCustomPlatformData::fontPlatformData(float size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant)
{
- return FontPlatformData(m_cgFont.get(), size, bold, italic, orientation, widthVariant);
+ return FontPlatformData(m_cgFont.get(), m_typeface, size, bold, italic, orientation, widthVariant);
}
PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* buffer)
@@ -63,10 +63,6 @@ PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer*
if (!cgFontRef)
return nullptr;
- // It's unclear whether this is used. It seems like it has the effect of priming the cache.
- // Since we store this anyways, it might be worthwhile just plumbing this to FontMac.cpp in
- // a more obvious way.
- // FIXME: Remove this, add an explicit use, or add a comment explaining why this exists.
RefPtr<SkMemoryStream> stream = adoptRef(new SkMemoryStream(buffer->getAsSkData().get()));
RefPtr<SkTypeface> typeface = adoptRef(SkTypeface::CreateFromStream(stream.get()));
if (!typeface)
« no previous file with comments | « Source/platform/fonts/FontPlatformData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698