/** \class SkAdvancedTypefaceMetrics
The SkAdvancedTypefaceMetrics class is used by the PDF backend to correctly
- embed typefaces. This class is filled in with information about a given
- typeface by the SkFontHost class.
+ embed typefaces. This class is created and filled in with information by
+ SkTypeface::getAdvancedTypefaceMetrics.
*/
class SkAdvancedTypefaceMetrics : public SkRefCnt {
friend class SkPaint;
friend class SkGlyphCache; // GetDefaultTypeface
- // just so deprecated fonthost can call protected methods
- friend class SkFontHost;
typedef SkWeakRefCnt INHERITED;
};
/**
* \class SkFontConfigInterface
*
- * Provides SkFontHost clients with access to fontconfig services. They will
- * access the global instance found in RefGlobal().
+ * A simple interface for remotable font management.
+ * The global instance can be found with RefGlobal().
*/
class SK_API SkFontConfigInterface : public SkRefCnt {
public:
* libfontconfig. This does not affect the refcnt of the returned instance.
* The mutex may be used to guarantee the singleton is only constructed once.
*/
- static SkFontConfigInterface* GetSingletonDirectInterface
- (SkBaseMutex* mutex = NULL);
+ static SkFontConfigInterface* GetSingletonDirectInterface(SkBaseMutex* mutex = NULL);
// New APIS, which have default impls for now (which do nothing)
// As a template arguments, these must have external linkage.
SkTypeface* sk_create_default_typeface(int style) {
- // If backed by fontconfig, it's not safe to call SkFontHost::CreateTypeface concurrently.
+ // It is not safe to call FontConfigTypeface::LegacyCreateTypeface concurrently.
// To be safe, we serialize here with a mutex so only one call to
// CreateTypeface is happening at any given time.
// TODO(bungeman, mtklein): This is sad. Make our fontconfig code safe?
static SkTypeface* LegacyCreateTypeface(const char familyName[], SkTypeface::Style);
protected:
- friend class SkFontHost; // hack until we can make public versions
-
FontConfigTypeface(const SkFontStyle& style,
const SkFontConfigInterface::FontIdentity& fi,
const SkString& familyName)
#include "SkColorPriv.h"
#include "SkDescriptor.h"
#include "SkFDot6.h"
-#include "SkFontHost.h"
#include "SkFontHost_FreeType_common.h"
#include "SkGlyph.h"
#include "SkMask.h"
#include "SkFontConfigInterface.h"
#include "SkFontConfigTypeface.h"
#include "SkFontDescriptor.h"
-#include "SkFontHost.h"
#include "SkFontHost_FreeType_common.h"
#include "SkFontStream.h"
#include "SkStream.h"
* found in the LICENSE file.
*/
-#include "SkFontHost.h"
#include "SkFontHost_FreeType_common.h"
#include "SkFontDescriptor.h"
#include "SkFontMgr.h"
#include <CoreFoundation/CoreFoundation.h>
#endif
-#include "SkFontHost.h"
#include "SkCGUtils.h"
#include "SkColorPriv.h"
#include "SkDescriptor.h"
AutoCFRelease<CTFontRef> fFontRef;
protected:
- friend class SkFontHost; // to access our protected members for deprecated methods
-
int onGetUPEM() const SK_OVERRIDE;
SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
void onGetFamilyName(SkString* familyName) const SK_OVERRIDE;
#include "SkData.h"
#include "SkDescriptor.h"
#include "SkFontDescriptor.h"
-#include "SkFontHost.h"
#include "SkGlyph.h"
#include "SkHRESULT.h"
#include "SkMaskGamma.h"