Add support in Android for AdvancedTypefaceMetrics

Review URL: http://codereview.appspot.com/5396045

git-svn-id: http://skia.googlecode.com/svn/trunk@2698 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
djsollen@google.com 2011-11-16 17:00:46 +00:00
parent 09752196a1
commit da957724d2
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
#include "SkAdvancedTypefaceMetrics.h"
#include "SkTypes.h"
#ifdef SK_BUILD_FOR_UNIX
#if defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
@ -258,7 +258,7 @@ template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData(
const uint32_t* subsetGlyphIDs,
uint32_t subsetGlyphIDsLength,
bool (*getAdvance)(HDC hdc, int gId, int16_t* data));
#elif defined(SK_BUILD_FOR_UNIX)
#elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData(
FT_Face face,
int num_glyphs,

View File

@ -414,7 +414,7 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo,
const uint32_t* glyphIDs,
uint32_t glyphIDsCount) {
#if defined(SK_BUILD_FOR_MAC) || defined(ANDROID)
#if defined(SK_BUILD_FOR_MAC)
return NULL;
#else
SkAutoMutexAcquire ac(gFTMutex);
@ -641,7 +641,7 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec) {
rec->setHinting(h);
}
#ifdef ANDROID
#ifdef SK_BUILD_FOR_ANDROID
uint32_t SkFontHost::GetUnitsPerEm(SkFontID fontID) {
SkAutoMutexAcquire ac(gFTMutex);
SkFaceRec *rec = ref_ft_face(fontID);