예제 #1
0
    delegate_dwritefactory(IDWriteFactory *inst) : refnum(0), orig_this(inst), mycoll(nullptr)
    {
        OutputDebugString("delegate_dwritefactory::delegate_dwritefactory");
	InitializeCriticalSection(&collcs);
        fontfile_collection_loader &loader = fontfile_collection_loader::get_instance();
        if (SUCCEEDED(orig_this->RegisterFontCollectionLoader(&loader))) {
            EnterCriticalSection(&fontpathscs);
            orig_this->CreateCustomFontCollection(&loader, nullptr, 0, &mycoll);
            LeaveCriticalSection(&fontpathscs);
        }
	factories.insert(this);
    }
예제 #2
0
 virtual HRESULT STDMETHODCALLTYPE RegisterFontCollectionLoader(
     IDWriteFontCollectionLoader* fontCollectionLoader
     )
 {
     return orig_this->RegisterFontCollectionLoader(fontCollectionLoader);
 }