Esempio n. 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));
        }
        public virtual int SetNumberSubstitution(
            uint textPosition,
            uint textLength,
            IDWriteNumberSubstitution numberSubstitution
            )
        {
            var fp = GetFunctionPointer(6);

            if (m_SetNumberSubstitutionFunc == null)
            {
                m_SetNumberSubstitutionFunc = (SetNumberSubstitutionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(SetNumberSubstitutionFunc));
            }

            return(m_SetNumberSubstitutionFunc(m_ptr, textPosition, textLength, numberSubstitution != null ? numberSubstitution.Ptr : IntPtr.Zero));
        }
        public virtual int GetNumberSubstitution(
            uint textPosition,
            out uint textLength,
            out IDWriteNumberSubstitution numberSubstitution
            )
        {
            var fp = GetFunctionPointer(7);

            if (m_GetNumberSubstitutionFunc == null)
            {
                m_GetNumberSubstitutionFunc = (GetNumberSubstitutionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetNumberSubstitutionFunc));
            }
            numberSubstitution = new IDWriteNumberSubstitution();
            return(m_GetNumberSubstitutionFunc(m_ptr, textPosition, out textLength, out numberSubstitution.PtrForNew));
        }
Esempio n. 4
0
        public virtual int CreateNumberSubstitution(
            DWRITE_NUMBER_SUBSTITUTION_METHOD substitutionMethod,
            ref ushort localeName,
            int ignoreUserOverride,
            out IDWriteNumberSubstitution numberSubstitution
            )
        {
            var fp = GetFunctionPointer(22);

            if (m_CreateNumberSubstitutionFunc == null)
            {
                m_CreateNumberSubstitutionFunc = (CreateNumberSubstitutionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateNumberSubstitutionFunc));
            }
            numberSubstitution = new IDWriteNumberSubstitution();
            return(m_CreateNumberSubstitutionFunc(m_ptr, substitutionMethod, ref localeName, ignoreUserOverride, out numberSubstitution.PtrForNew));
        }