コード例 #1
0
        public virtual int GetGlyphs(
            ref ushort textString,
            uint textLength,
            IDWriteFontFace fontFace,
            int isSideways,
            int isRightToLeft,
            ref DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
            ref ushort localeName,
            IDWriteNumberSubstitution numberSubstitution,
            ref IntPtr features,
            ref uint featureRangeLengths,
            uint featureRanges,
            uint maxGlyphCount,
            out ushort clusterMap,
            out DWRITE_SHAPING_TEXT_PROPERTIES textProps,
            out ushort glyphIndices,
            out DWRITE_SHAPING_GLYPH_PROPERTIES glyphProps,
            out uint actualGlyphCount
            )
        {
            var fp = GetFunctionPointer(7);

            if (m_GetGlyphsFunc == null)
            {
                m_GetGlyphsFunc = (GetGlyphsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGlyphsFunc));
            }

            return(m_GetGlyphsFunc(m_ptr, ref textString, textLength, fontFace != null ? fontFace.Ptr : IntPtr.Zero, isSideways, isRightToLeft, ref scriptAnalysis, ref localeName, numberSubstitution != null ? numberSubstitution.Ptr : IntPtr.Zero, ref features, ref featureRangeLengths, featureRanges, maxGlyphCount, out clusterMap, out textProps, out glyphIndices, out glyphProps, out actualGlyphCount));
        }
コード例 #2
0
        public virtual int GetGdiCompatibleGlyphPlacements(
            ref ushort textString,
            ref ushort clusterMap,
            out DWRITE_SHAPING_TEXT_PROPERTIES textProps,
            uint textLength,
            ref ushort glyphIndices,
            ref DWRITE_SHAPING_GLYPH_PROPERTIES glyphProps,
            uint glyphCount,
            IDWriteFontFace fontFace,
            float fontEmSize,
            float pixelsPerDip,
            ref DWRITE_MATRIX transform,
            int useGdiNatural,
            int isSideways,
            int isRightToLeft,
            ref DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
            ref ushort localeName,
            ref IntPtr features,
            ref uint featureRangeLengths,
            uint featureRanges,
            out float glyphAdvances,
            out DWRITE_GLYPH_OFFSET glyphOffsets
            )
        {
            var fp = GetFunctionPointer(9);

            if (m_GetGdiCompatibleGlyphPlacementsFunc == null)
            {
                m_GetGdiCompatibleGlyphPlacementsFunc = (GetGdiCompatibleGlyphPlacementsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGdiCompatibleGlyphPlacementsFunc));
            }

            return(m_GetGdiCompatibleGlyphPlacementsFunc(m_ptr, ref textString, ref clusterMap, out textProps, textLength, ref glyphIndices, ref glyphProps, glyphCount, fontFace != null ? fontFace.Ptr : IntPtr.Zero, fontEmSize, pixelsPerDip, ref transform, useGdiNatural, isSideways, isRightToLeft, ref scriptAnalysis, ref localeName, ref features, ref featureRangeLengths, featureRanges, out glyphAdvances, out glyphOffsets));
        }
コード例 #3
0
ファイル: IDWriteFont.cs プロジェクト: ousttrue/ShrimpDX
        public virtual int CreateFontFace(
            out IDWriteFontFace fontFace
            )
        {
            var fp = GetFunctionPointer(13);

            if (m_CreateFontFaceFunc == null)
            {
                m_CreateFontFaceFunc = (CreateFontFaceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateFontFaceFunc));
            }
            fontFace = new IDWriteFontFace();
            return(m_CreateFontFaceFunc(m_ptr, out fontFace.PtrForNew));
        }
コード例 #4
0
        public virtual int ConvertFontFaceToLOGFONT(
            IDWriteFontFace font,
            out tagLOGFONTW logFont
            )
        {
            var fp = GetFunctionPointer(5);

            if (m_ConvertFontFaceToLOGFONTFunc == null)
            {
                m_ConvertFontFaceToLOGFONTFunc = (ConvertFontFaceToLOGFONTFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(ConvertFontFaceToLOGFONTFunc));
            }

            return(m_ConvertFontFaceToLOGFONTFunc(m_ptr, font != null ? font.Ptr : IntPtr.Zero, out logFont));
        }
コード例 #5
0
        public virtual int GetFontFromFontFace(
            IDWriteFontFace fontFace,
            out IDWriteFont font
            )
        {
            var fp = GetFunctionPointer(6);

            if (m_GetFontFromFontFaceFunc == null)
            {
                m_GetFontFromFontFaceFunc = (GetFontFromFontFaceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFontFromFontFaceFunc));
            }
            font = new IDWriteFont();
            return(m_GetFontFromFontFaceFunc(m_ptr, fontFace != null ? fontFace.Ptr : IntPtr.Zero, out font.PtrForNew));
        }
コード例 #6
0
ファイル: IDWriteFactory.cs プロジェクト: ousttrue/ShrimpDX
        public virtual int CreateFontFace(
            DWRITE_FONT_FACE_TYPE fontFaceType,
            uint numberOfFiles,
            ref IntPtr fontFiles,
            uint faceIndex,
            DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags,
            out IDWriteFontFace fontFace
            )
        {
            var fp = GetFunctionPointer(9);

            if (m_CreateFontFaceFunc == null)
            {
                m_CreateFontFaceFunc = (CreateFontFaceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateFontFaceFunc));
            }
            fontFace = new IDWriteFontFace();
            return(m_CreateFontFaceFunc(m_ptr, fontFaceType, numberOfFiles, ref fontFiles, faceIndex, fontFaceSimulationFlags, out fontFace.PtrForNew));
        }