CreateFontSubSet() public method

Creates a new font image that is a subset of this font image containing only the specified glyphs.
public CreateFontSubSet ( object>.Dictionary glyphs, bool cidFont ) : FontData
glyphs object>.Dictionary
cidFont bool
return FontData
Esempio n. 1
0
 /// <summary>
 /// This is an external helper function.
 /// </summary>
 public static byte[] F74167FFE4044F53B28A4AF049E9EF25(XFont font, XPdfFontOptions options, bool subset)
 {
     byte[] data = null;
     if (subset)
     {
         OpenTypeDescriptor descriptor = new OpenTypeDescriptor(font, options);
         FontData           image      = descriptor.fontData;
         CMapInfo           cmapInfo   = new CMapInfo(descriptor);
         cmapInfo.AddAnsiChars();
         image = image.CreateFontSubSet(cmapInfo.GlyphIndices, false);
         data  = image.Data;
     }
     else
     {
         FontData fontData = new FontData(font, options);
         data = fontData.Data;
     }
     return(data);
 }