public virtual int GetCurrentFontFile(
            out IDWriteFontFile fontFile
            )
        {
            var fp = GetFunctionPointer(4);

            if (m_GetCurrentFontFileFunc == null)
            {
                m_GetCurrentFontFileFunc = (GetCurrentFontFileFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetCurrentFontFileFunc));
            }
            fontFile = new IDWriteFontFile();
            return(m_GetCurrentFontFileFunc(m_ptr, out fontFile.PtrForNew));
        }
Esempio n. 2
0
        public virtual int GetFiles(
            out uint numberOfFiles,
            out IDWriteFontFile fontFiles
            )
        {
            var fp = GetFunctionPointer(4);

            if (m_GetFilesFunc == null)
            {
                m_GetFilesFunc = (GetFilesFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFilesFunc));
            }
            fontFiles = new IDWriteFontFile();
            return(m_GetFilesFunc(m_ptr, out numberOfFiles, out fontFiles.PtrForNew));
        }
Esempio n. 3
0
        public virtual int CreateFontFileReference(
            ref ushort filePath,
            ref _FILETIME lastWriteTime,
            out IDWriteFontFile fontFile
            )
        {
            var fp = GetFunctionPointer(7);

            if (m_CreateFontFileReferenceFunc == null)
            {
                m_CreateFontFileReferenceFunc = (CreateFontFileReferenceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateFontFileReferenceFunc));
            }
            fontFile = new IDWriteFontFile();
            return(m_CreateFontFileReferenceFunc(m_ptr, ref filePath, ref lastWriteTime, out fontFile.PtrForNew));
        }
Esempio n. 4
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));
        }