のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

dumpGlobalsLocked

    struct FallbackFontRec {
        SkFontID             fFontID;
        SkPaint::FontVariant fVariant;
    };

    struct FallbackFontList {
        FallbackFontList(const SkLanguage& language) : fLanguage(language) { }
        SkTDArray<FallbackFontRec> fList;
        SkLanguage                 fLanguage;
    };

    FallbackFontList* defaultFallbackList = getFallbackFontListLocked(SkLanguage());
	FallbackFontList* dfbl = getFallbackFontListLocked(SkLanguage());
	for (int i = 0; i < dfbl->fList.count(); ++i) {
		SkDebugf("DefaultFallBackList[%d] fontID=0x%04X", i, dfbl->fList[i].fFontID);
	}
	const int LOCALE_SIZE = 4;
	char locales[][3] = {"", "ko", "zh", "ja"};
	for(int s = 0; s < LOCALE_SIZE; s++) {
		char *locale = locales[s];
	    FallbackFontList* fallbackList = getFallbackFontLisNoCachetLocked(locale);
	    for (int i = 0; i < fallbackList->fList.count(); ++i) {
	        SkDebugf("[%02s] fallbackList[%d] fontID=0x%04X",
	         locale, i, fallbackList->fList[i].fFontID);
		}
	}
   static SkTDArray<FallbackFontList*> gFallbackFontLists;
   gFallbackFontLists.count()

   unsigned int numLists = gFallbackFontLists.count();
    for (unsigned int listIdx = 0; listIdx < numLists; ++listIdx) {
        FallbackFontList* list = gFallbackFontLists[listIdx];
        SkASSERT(list != NULL);
        if (list->fLanguage == lang) {
            return list;
        }
    }
FallbackFontList* list0 = gFallbackFontLists[0];
       list0->fLanguage;
       list0->flist[].fontID;
       list0->flist[].fVariant;
 
FallbackFontList* list1 = gFallbackFontLists[1]; 
       list1->fLanguage
       list1->flist[].fontID;
       list1->flist[].fVariant;