のねのBlog

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

MinikinDestroyFunc

     31 static hb_blob_t* referenceTable(hb_face_t* /* face */, hb_tag_t tag, void* userData) {
     32     MinikinFont* font = reinterpret_cast<MinikinFont*>(userData);
     33     MinikinDestroyFunc destroy = 0;
     34     size_t size = 0;
     35     const void* buffer = font->GetTable(tag, &size, &destroy);
     36     if (buffer == nullptr) {
     37         return nullptr;
     38     }
     39 #ifdef VERBOSE_DEBUG
     40     ALOGD("referenceTable %c%c%c%c length=%zd",
     41         (tag >>24)&0xff, (tag>>16)&0xff, (tag>>8)&0xff, tag&0xff, size);
     42 #endif
     43     return hb_blob_create(reinterpret_cast<const char*>(buffer), size,
     44             HB_MEMORY_MODE_READONLY, const_cast<void*>(buffer), destroy);
     45 }

Cross Reference: /frameworks/minikin/libs/minikin/HbFontCache.cpp