Esempio n. 1
0
 internal TMP_GlyphValueRecord(GlyphValueRecord valueRecord)
 {
     m_XPlacement = valueRecord.xPlacement;
     m_YPlacement = valueRecord.yPlacement;
     m_XAdvance   = valueRecord.xAdvance;
     m_YAdvance   = valueRecord.yAdvance;
 }
Esempio n. 2
0
 public KerningPair(uint firstGlyph, GlyphValueRecord firstGlyphAdjustments, uint secondGlyph, GlyphValueRecord secondGlyphAdjustments)
 {
     m_FirstGlyph             = firstGlyph;
     m_FirstGlyphAdjustments  = firstGlyphAdjustments;
     m_SecondGlyph            = secondGlyph;
     m_SecondGlyphAdjustments = secondGlyphAdjustments;
 }
Esempio n. 3
0
 public KerningPair()
 {
     this.m_FirstGlyph             = 0u;
     this.m_FirstGlyphAdjustments  = default(GlyphValueRecord);
     this.m_SecondGlyph            = 0u;
     this.m_SecondGlyphAdjustments = default(GlyphValueRecord);
 }
Esempio n. 4
0
        public KerningPair()
        {
            m_FirstGlyph            = 0;
            m_FirstGlyphAdjustments = new GlyphValueRecord();

            m_SecondGlyph            = 0;
            m_SecondGlyphAdjustments = new GlyphValueRecord();
        }
        public int AddGlyphPairAdjustmentRecord(uint first, GlyphValueRecord firstAdjustments, uint second, GlyphValueRecord secondAdjustments)
        {
            int num = this.kerningPairs.FindIndex((KerningPair item) => item.firstGlyph == first && item.secondGlyph == second);

            if (num == -1)
            {
                this.kerningPairs.Add(new KerningPair(first, firstAdjustments, second, secondAdjustments));
                return(0);
            }
            return(-1);
        }
Esempio n. 6
0
        /// <summary>
        /// Add Glyph pair adjustment record
        /// </summary>
        /// <param name="firstGlyph">The first glyph</param>
        /// <param name="firstGlyphAdjustments">Adjustment record for the first glyph</param>
        /// <param name="secondGlyph">The second glyph</param>
        /// <param name="secondGlyphAdjustments">Adjustment record for the second glyph</param>
        /// <returns></returns>
        public int AddGlyphPairAdjustmentRecord(uint first, GlyphValueRecord firstAdjustments, uint second, GlyphValueRecord secondAdjustments)
        {
            int index = kerningPairs.FindIndex(item => item.firstGlyph == first && item.secondGlyph == second);

            if (index == -1)
            {
                kerningPairs.Add(new KerningPair(first, firstAdjustments, second, secondAdjustments));
                return(0);
            }

            // Return -1 if Kerning Pair already exists.
            return(-1);
        }