Beispiel #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));
        }
Beispiel #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));
        }