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

Unified Diff: Source/platform/fonts/FontPlatformData.h

Issue 879533003: Remove Mac native font type members from FontPlatformData (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing MemoryActivatedFont 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
« no previous file with comments | « Source/platform/fonts/FontCustomPlatformData.cpp ('k') | Source/platform/fonts/FontPlatformData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontPlatformData.h
diff --git a/Source/platform/fonts/FontPlatformData.h b/Source/platform/fonts/FontPlatformData.h
index e2e149cd5d27119163dcfd1dd3541b571dce32fb..57066ceccb7d0c82e42d79e5dec9ef471a99866f 100644
--- a/Source/platform/fonts/FontPlatformData.h
+++ b/Source/platform/fonts/FontPlatformData.h
@@ -50,8 +50,6 @@ OBJC_CLASS NSFont;
typedef struct CGFont* CGFontRef;
typedef const struct __CTFont* CTFontRef;
-#include "platform/fonts/mac/MemoryActivatedFont.h"
-#include <CoreFoundation/CFBase.h>
#include <objc/objc-auto.h>
inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast<CTFontRef>(nsFont); }
@@ -80,24 +78,14 @@ public:
FontPlatformData(const FontPlatformData& src, float textSize);
#if OS(MACOSX)
FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool syntheticItalic = false, FontOrientation = Horizontal);
- FontPlatformData(CGFontRef, PassRefPtr<SkTypeface>, float size, bool syntheticBold, bool syntheticOblique, FontOrientation);
-#else
- FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, bool syntheticBold, bool syntheticItalic, FontOrientation = Horizontal, bool subpixelTextPosition = defaultUseSubpixelPositioning());
#endif
+ FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, bool syntheticBold, bool syntheticItalic, FontOrientation = Horizontal, bool subpixelTextPosition = defaultUseSubpixelPositioning());
~FontPlatformData();
#if OS(MACOSX)
- NSFont* font() const { return m_font; }
- void setFont(NSFont*);
-
- CGFontRef cgFont() const { return m_cgFont.get(); }
+ const NSFont* font() const { return reinterpret_cast<const NSFont*>(ctFont()); };
CTFontRef ctFont() const;
-
- bool roundsGlyphAdvances() const;
- bool allowsLigatures() const;
-
- bool isColorBitmapFont() const { return m_isColorBitmapFont; }
- bool isCompositeFontReference() const { return m_isCompositeFontReference; }
+ CGFontRef cgFont() const;
#endif
String fontFamilyName() const;
@@ -152,20 +140,9 @@ public:
#endif
private:
-#if !OS(MACOSX)
bool static defaultUseSubpixelPositioning();
+#if !OS(MACOSX)
void querySystemForRenderStyle(bool useSkiaSubpixelPositioning);
-#else
- // Load various data about the font specified by |nsFont| with the size fontSize into the following output paramters:
- // Note: Callers should always take into account that for the Chromium port, |outNSFont| isn't necessarily the same
- // font as |nsFont|. This because the sandbox may block loading of the original font.
- // * outNSFont - The font that was actually loaded, for the Chromium port this may be different than nsFont.
- // The caller is responsible for calling CFRelease() on this parameter when done with it.
- // * cgFont - CGFontRef representing the input font at the specified point size.
- void loadFont(NSFont*, float fontSize, NSFont*& outNSFont, CGFontRef&);
- void platformDataInit(const FontPlatformData&);
- const FontPlatformData& platformDataAssign(const FontPlatformData&);
- bool isAATFont(CTFontRef) const;
#endif
mutable RefPtr<SkTypeface> m_typeface;
@@ -178,17 +155,8 @@ public:
bool m_syntheticBold;
bool m_syntheticItalic;
FontOrientation m_orientation;
-#if OS(MACOSX)
- bool m_isColorBitmapFont;
- bool m_isCompositeFontReference;
-#endif
private:
-#if OS(MACOSX)
- NSFont* m_font;
- RetainPtr<CGFontRef> m_cgFont;
- mutable RetainPtr<CTFontRef> m_CTFont;
- RefPtr<MemoryActivatedFont> m_inMemoryFont;
-#else
+#if !OS(MACOSX)
FontRenderStyle m_style;
#endif
« no previous file with comments | « Source/platform/fonts/FontCustomPlatformData.cpp ('k') | Source/platform/fonts/FontPlatformData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698