Exemplo n.º 1
0
Arquivo: CMap.cs Projeto: n9/pdfclown
 /**
   <summary>Gets the character map extracted from the given data.</summary>
   <param name="stream">Character map data.</param>
 */
 public static IDictionary<ByteArray, int> Get(
     bytes::IInputStream stream
     )
 {
     CMapParser parser = new CMapParser(stream);
       return parser.Parse();
 }
Exemplo n.º 2
0
        internal OpenFontParser(
      bytes::IInputStream fontData
      )
        {
            FontData = fontData;
              FontData.ByteOrder = ByteOrderEnum.BigEndian; // Ensures that proper endianness is applied.

              Load();
        }
Exemplo n.º 3
0
   internal ContentParser(
 bytes::IInputStream stream
 )
       : base(stream)
   {
   }
Exemplo n.º 4
0
   public CMapParser(
 bytes::IInputStream stream
 )
       : base(stream)
   {
   }
Exemplo n.º 5
0
   /**
     <summary>Gets whether the given data represents a valid Open Font.</summary>
   */
   public static bool IsOpenFont(
 bytes::IInputStream fontData
 )
   {
       long position = fontData.Position;
         fontData.Position = 0;
         try
         {GetOutlineFormat(fontData.ReadInt());}
         catch(NotSupportedException)
         {return false;}
         finally
         {fontData.Position = position;}
         return true;
   }
Exemplo n.º 6
0
 public static new CompositeFont Get(
     Document context,
     bytes::IInputStream fontData
     )
 {
     OpenFontParser parser = new OpenFontParser(fontData);
       switch(parser.OutlineFormat)
       {
     case OpenFontParser.OutlineFormatEnum.CFF:
       return new Type0Font(context,parser);
     case OpenFontParser.OutlineFormatEnum.TrueType:
       return new Type2Font(context,parser);
       }
       throw new NotSupportedException("Unknown composite font format.");
 }