Exemplo n.º 1
0
        /// <summary>
        /// Internal function used to retrieve positional adjustments for pairs of glyphs.
        /// </summary>
        /// <param name="glyphIndexes">List of glyph indexes to check for potential positional adjustment records.</param>
        /// <returns>Array containing the positional adjustments for pairs of glyphs.</returns>
        internal static GlyphPairAdjustmentRecord[] GetGlyphPairAdjustmentTable(uint[] glyphIndexes)
        {
            int maxGlyphPairAdjustmentRecords = glyphIndexes.Length * glyphIndexes.Length;

            if (s_GlyphPairAdjustmentRecords == null || s_GlyphPairAdjustmentRecords.Length < maxGlyphPairAdjustmentRecords)
            {
                s_GlyphPairAdjustmentRecords = new GlyphPairAdjustmentRecord[maxGlyphPairAdjustmentRecords];
            }

            int adjustmentRecordCount;

            if (GetGlyphPairAdjustmentTable_Internal(glyphIndexes, s_GlyphPairAdjustmentRecords, out adjustmentRecordCount) != 0)
            {
                // TODO: Add debug warning messages.
                return(null);
            }

            GlyphPairAdjustmentRecord[] pairAdjustmentRecords = new GlyphPairAdjustmentRecord[adjustmentRecordCount];

            for (int i = 0; i < adjustmentRecordCount; i++)
            {
                pairAdjustmentRecords[i] = s_GlyphPairAdjustmentRecords[i];
            }

            return(pairAdjustmentRecords);
        }
Exemplo n.º 2
0
 private static extern void GetGlyphPairAdjustmentRecord_Injected(uint firstGlyphIndex, uint secondGlyphIndex, out GlyphPairAdjustmentRecord ret);