зеркало из https://github.com/mozilla/moz-skia.git
extend FontConfigInterface to start to match new fontmgr design
Review URL: https://codereview.chromium.org/13297004 git-svn-id: http://skia.googlecode.com/svn/trunk@8575 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
116ad84d31
Коммит
54c69147f9
|
@ -8,6 +8,7 @@
|
|||
#ifndef SkFontConfigInterface_DEFINED
|
||||
#define SkFontConfigInterface_DEFINED
|
||||
|
||||
#include "SkFontStyle.h"
|
||||
#include "SkRefCnt.h"
|
||||
#include "SkTypeface.h"
|
||||
|
||||
|
@ -50,6 +51,7 @@ public:
|
|||
uint32_t fID;
|
||||
int32_t fTTCIndex;
|
||||
SkString fString;
|
||||
SkFontStyle fStyle;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -81,6 +83,14 @@ public:
|
|||
* libfontconfig. This does not affect the refcnt of the returned instance.
|
||||
*/
|
||||
static SkFontConfigInterface* GetSingletonDirectInterface();
|
||||
|
||||
// New APIS, which have default impls for now (which do nothing)
|
||||
|
||||
virtual int countFamilies();
|
||||
virtual int getFamilySet(int index, SkString* outFamilyName,
|
||||
FontIdentity outIdentities[], int maxCount);
|
||||
virtual int matchFamilySet(const char familyName[], SkString* outFamilyName,
|
||||
FontIdentity outIdentities[], int maxCount);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -40,6 +40,23 @@ SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() {
|
|||
return gDirect;
|
||||
}
|
||||
|
||||
int SkFontConfigInterface::countFamilies() { return 0; }
|
||||
|
||||
int SkFontConfigInterface::getFamilySet(int index, SkString* outFamilyName,
|
||||
FontIdentity outIdentities[],
|
||||
int maxCount) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SkFontConfigInterface::matchFamilySet(const char familyName[],
|
||||
SkString* outFamilyName,
|
||||
FontIdentity outIdentities[],
|
||||
int maxCount) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace {
|
||||
|
||||
// Equivalence classes, used to match the Liberation and other fonts
|
||||
|
|
Загрузка…
Ссылка в новой задаче