diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-06 13:06:03 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-06 13:06:03 +0000 |
commit | 8c9737e114f13ce393f2c582b2567ac4b3e530e7 (patch) | |
tree | 55b901e8ff3b717b93b68791ab121895bcbf6023 /src/ports | |
parent | 3d571f42c19cdc5f2bbc508c10d4974a7b7b3d81 (diff) |
change FontIdentity to explicitly hold ttcIndex and ID, so we can use both in the
IPC version in chrome.
git-svn-id: http://skia.googlecode.com/svn/trunk@8005 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports')
-rw-r--r-- | src/ports/SkFontConfigInterface_direct.cpp | 2 | ||||
-rw-r--r-- | src/ports/SkFontHost_fontconfig.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ports/SkFontConfigInterface_direct.cpp b/src/ports/SkFontConfigInterface_direct.cpp index 7e7ab9eebe..2ac352375a 100644 --- a/src/ports/SkFontConfigInterface_direct.cpp +++ b/src/ports/SkFontConfigInterface_direct.cpp @@ -409,7 +409,7 @@ bool SkFontConfigInterfaceDirect::matchFamilyName(const char familyName[], FcFontSetDestroy(font_set); if (outIdentity) { - outIdentity->fIntPtr = face_index; + outIdentity->fTTCIndex = face_index; outIdentity->fString.set((const char*)c_filename); } if (outFamilyName) { diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp index 786b2a29dc..438b47d46a 100644 --- a/src/ports/SkFontHost_fontconfig.cpp +++ b/src/ports/SkFontHost_fontconfig.cpp @@ -260,8 +260,7 @@ static SkStream* open_stream(const FontConfigTypeface* face, int* ttcIndex) { return NULL; } stream = fci->openStream(face->getIdentity()); - // ttcIndex should be returned explicitly by openStream() - *ttcIndex = (int)face->getIdentity().fIntPtr; + *ttcIndex = face->getIdentity().fTTCIndex; } return stream; } @@ -288,7 +287,7 @@ size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length, const SkString& filename = face->getIdentity().fString; if (index) { - *index = (int32_t)face->getIdentity().fIntPtr; + *index = face->getIdentity().fTTCIndex; } if (path) { size_t len = SkMin32(length, filename.size()); |