internal TMP_GlyphValueRecord(GlyphValueRecord valueRecord) { m_XPlacement = valueRecord.xPlacement; m_YPlacement = valueRecord.yPlacement; m_XAdvance = valueRecord.xAdvance; m_YAdvance = valueRecord.yAdvance; }
public KerningPair(uint firstGlyph, GlyphValueRecord firstGlyphAdjustments, uint secondGlyph, GlyphValueRecord secondGlyphAdjustments) { m_FirstGlyph = firstGlyph; m_FirstGlyphAdjustments = firstGlyphAdjustments; m_SecondGlyph = secondGlyph; m_SecondGlyphAdjustments = secondGlyphAdjustments; }
public KerningPair() { this.m_FirstGlyph = 0u; this.m_FirstGlyphAdjustments = default(GlyphValueRecord); this.m_SecondGlyph = 0u; this.m_SecondGlyphAdjustments = default(GlyphValueRecord); }
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); }
/// <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); }