/** * Constructs a new Type1Font object from a .pfb stream. * * @param pfbBytes .pfb data, including headers * @return a type1 font * * @throws IOException if something went wrong */ public static Type1Font CreateWithPFB(byte[] pfbBytes) { PfbParser pfb = new PfbParser(pfbBytes); Type1Parser parser = new Type1Parser(); return(parser.Parse(pfb.GetSegment1().ToArray(), pfb.GetSegment2().ToArray())); }
/** * Constructs a new Type1Font object from two header-less .pfb segments. * * @param segment1 The first segment, without header * @param segment2 The second segment, without header * @return A new Type1Font instance * @throws IOException if something went wrong */ public static Type1Font CreateWithSegments(byte[] segment1, byte[] segment2) { Type1Parser parser = new Type1Parser(); return(parser.Parse(segment1, segment2)); }