Example #1
0
        public virtual int UnregisterFontFileLoader(
            IDWriteFontFileLoader fontFileLoader
            )
        {
            var fp = GetFunctionPointer(14);

            if (m_UnregisterFontFileLoaderFunc == null)
            {
                m_UnregisterFontFileLoaderFunc = (UnregisterFontFileLoaderFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(UnregisterFontFileLoaderFunc));
            }

            return(m_UnregisterFontFileLoaderFunc(m_ptr, fontFileLoader != null ? fontFileLoader.Ptr : IntPtr.Zero));
        }
Example #2
0
        public virtual int GetLoader(
            out IDWriteFontFileLoader fontFileLoader
            )
        {
            var fp = GetFunctionPointer(4);

            if (m_GetLoaderFunc == null)
            {
                m_GetLoaderFunc = (GetLoaderFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetLoaderFunc));
            }
            fontFileLoader = new IDWriteFontFileLoader();
            return(m_GetLoaderFunc(m_ptr, out fontFileLoader.PtrForNew));
        }
Example #3
0
        public virtual int CreateCustomFontFileReference(
            IntPtr fontFileReferenceKey,
            uint fontFileReferenceKeySize,
            IDWriteFontFileLoader fontFileLoader,
            out IDWriteFontFile fontFile
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_CreateCustomFontFileReferenceFunc == null)
            {
                m_CreateCustomFontFileReferenceFunc = (CreateCustomFontFileReferenceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateCustomFontFileReferenceFunc));
            }
            fontFile = new IDWriteFontFile();
            return(m_CreateCustomFontFileReferenceFunc(m_ptr, fontFileReferenceKey, fontFileReferenceKeySize, fontFileLoader != null ? fontFileLoader.Ptr : IntPtr.Zero, out fontFile.PtrForNew));
        }