Example #1
0
        public virtual int UnregisterFontCollectionLoader(
            IDWriteFontCollectionLoader fontCollectionLoader
            )
        {
            var fp = GetFunctionPointer(6);

            if (m_UnregisterFontCollectionLoaderFunc == null)
            {
                m_UnregisterFontCollectionLoaderFunc = (UnregisterFontCollectionLoaderFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(UnregisterFontCollectionLoaderFunc));
            }

            return(m_UnregisterFontCollectionLoaderFunc(m_ptr, fontCollectionLoader != null ? fontCollectionLoader.Ptr : IntPtr.Zero));
        }
Example #2
0
        public virtual int CreateCustomFontCollection(
            IDWriteFontCollectionLoader collectionLoader,
            IntPtr collectionKey,
            uint collectionKeySize,
            out IDWriteFontCollection fontCollection
            )
        {
            var fp = GetFunctionPointer(4);

            if (m_CreateCustomFontCollectionFunc == null)
            {
                m_CreateCustomFontCollectionFunc = (CreateCustomFontCollectionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateCustomFontCollectionFunc));
            }
            fontCollection = new IDWriteFontCollection();
            return(m_CreateCustomFontCollectionFunc(m_ptr, collectionLoader != null ? collectionLoader.Ptr : IntPtr.Zero, collectionKey, collectionKeySize, out fontCollection.PtrForNew));
        }