/// <summary> /// Retrieves the widths, in PDF units, of consecutive glyphs. /// </summary> /// <returns> /// An array of integers whose size is equal to the number of glyphs /// specified in the 'maxp' table. /// The width at location 0 is the width of glyph with index 0, /// The width at location 1 is the width of glyph with index 1, /// etc... /// </returns> public int[] GetWidths() { EnsureHmtxTable(); int[] widths = new int[hmtx.Count]; // Convert each width to PDF units for (int i = 0; i < hmtx.Count; i++) { widths[i] = converter.ToPdfUnits(hmtx[i].AdvanceWidth); } return(widths); }
/// <summary> /// Gets the kerning amount for the supplied index pair or 0 if /// a kerning pair does not exist. /// </summary> public int this[ushort left, ushort right] { get { return(converter.ToPdfUnits(pairs[left, right])); } }
/// <summary> /// Gets the kerning amount for the supplied index pair or 0 if /// a kerning pair does not exist. /// </summary> public int this[ushort left, ushort right] { get { // TODO: Crapy performance return(converter.ToPdfUnits(pairs[left, right])); } }