From 070da5edcb1c6e9b9507f06a5e2c270e1c1fd796 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Wed, 27 Mar 2013 20:01:49 +0000 Subject: [PATCH] add dummpy SkFontMgr::Factory() impl to font backends, so we can start testing it Review URL: https://codereview.chromium.org/13119021 git-svn-id: http://skia.googlecode.com/svn/trunk@8415 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/ports/SkFontHost_android.cpp | 9 +++++++++ src/ports/SkFontHost_fontconfig.cpp | 9 +++++++++ src/ports/SkFontHost_linux.cpp | 9 +++++++++ src/ports/SkFontHost_none.cpp | 9 +++++++++ src/ports/SkFontHost_win.cpp | 9 +++++++++ src/ports/SkFontHost_win_dw.cpp | 9 +++++++++ 6 files changed, 54 insertions(+) diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp index d1bd9929f9..37495e7a10 100644 --- a/src/ports/SkFontHost_android.cpp +++ b/src/ports/SkFontHost_android.cpp @@ -1064,3 +1064,12 @@ void SkUseTestFontConfigFile(const char* mainconf, const char* fallbackconf, SkDEBUGF(("Use Test Config File Main %s, Fallback %s, Font Dir %s", gTestMainConfigFile, gTestFallbackConfigFile, gTestFontFilePrefix)); } + +/////////////////////////////////////////////////////////////////////////////// + +#include "SkFontMgr.h" + +SkFontMgr* SkFontMgr::Factory() { + // todo + return NULL; +} diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp index f66be28fdb..2f2b31429b 100644 --- a/src/ports/SkFontHost_fontconfig.cpp +++ b/src/ports/SkFontHost_fontconfig.cpp @@ -222,3 +222,12 @@ void FontConfigTypeface::onGetFontDescriptor(SkFontDescriptor* desc, desc->setFamilyName(this->getFamilyName()); *isLocalStream = SkToBool(this->getLocalStream()); } + +/////////////////////////////////////////////////////////////////////////////// + +#include "SkFontMgr.h" + +SkFontMgr* SkFontMgr::Factory() { + // todo + return NULL; +} diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp index 0ddcdb767a..8825919a98 100644 --- a/src/ports/SkFontHost_linux.cpp +++ b/src/ports/SkFontHost_linux.cpp @@ -517,3 +517,12 @@ SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[]) { SkAutoTUnref stream(SkStream::NewFromFile(path)); return stream.get() ? CreateTypefaceFromStream(stream) : NULL; } + +/////////////////////////////////////////////////////////////////////////////// + +#include "SkFontMgr.h" + +SkFontMgr* SkFontMgr::Factory() { + // todo + return NULL; +} diff --git a/src/ports/SkFontHost_none.cpp b/src/ports/SkFontHost_none.cpp index 5e3eb085ca..c5267096b4 100644 --- a/src/ports/SkFontHost_none.cpp +++ b/src/ports/SkFontHost_none.cpp @@ -26,3 +26,12 @@ SkTypeface* SkFontHost::CreateTypefaceFromFile(char const*) { SkDEBUGFAIL("SkFontHost::CreateTypefaceFromFile unimplemented"); return NULL; } + +/////////////////////////////////////////////////////////////////////////////// + +#include "SkFontMgr.h" + +SkFontMgr* SkFontMgr::Factory() { + // todo + return NULL; +} diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 0261b2b849..1253f84ebb 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -1674,3 +1674,12 @@ void LogFontTypeface::onFilterRec(SkScalerContextRec* rec) const { rec->fFlags &= ~SkScalerContext::kGenA8FromLCD_Flag; } } + +/////////////////////////////////////////////////////////////////////////////// + +#include "SkFontMgr.h" + +SkFontMgr* SkFontMgr::Factory() { + // todo + return NULL; +} diff --git a/src/ports/SkFontHost_win_dw.cpp b/src/ports/SkFontHost_win_dw.cpp index 8debc31f87..489bad727a 100644 --- a/src/ports/SkFontHost_win_dw.cpp +++ b/src/ports/SkFontHost_win_dw.cpp @@ -1518,3 +1518,12 @@ SkAdvancedTypefaceMetrics* DWriteFontTypeface::onGetAdvancedTypefaceMetrics( return info; } + +/////////////////////////////////////////////////////////////////////////////// + +#include "SkFontMgr.h" + +SkFontMgr* SkFontMgr::Factory() { + // todo + return NULL; +}