"Fossies" - the Fresh Open Source Software Archive

Member "xpdf-4.02/fofi/FoFiType1.h" (25 Sep 2019, 1434 Bytes) of package /linux/misc/xpdf-4.02.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "FoFiType1.h" see the Fossies "Dox" file reference documentation.

    1 //========================================================================
    2 //
    3 // FoFiType1.h
    4 //
    5 // Copyright 1999-2003 Glyph & Cog, LLC
    6 //
    7 //========================================================================
    8 
    9 #ifndef FOFITYPE1_H
   10 #define FOFITYPE1_H
   11 
   12 #include <aconf.h>
   13 
   14 #ifdef USE_GCC_PRAGMAS
   15 #pragma interface
   16 #endif
   17 
   18 #include "gtypes.h"
   19 #include "FoFiBase.h"
   20 
   21 //------------------------------------------------------------------------
   22 // FoFiType1
   23 //------------------------------------------------------------------------
   24 
   25 class FoFiType1: public FoFiBase {
   26 public:
   27 
   28   // Create a FoFiType1 object from a memory buffer.
   29   static FoFiType1 *make(char *fileA, int lenA);
   30 
   31   // Create a FoFiType1 object from a file on disk.
   32   static FoFiType1 *load(char *fileName);
   33 
   34   virtual ~FoFiType1();
   35 
   36   // Return the font name.
   37   char *getName();
   38 
   39   // Return the encoding, as an array of 256 names (any of which may
   40   // be NULL).
   41   char **getEncoding();
   42 
   43   // Return the font matrix as an array of six numbers.
   44   void getFontMatrix(double *mat);
   45 
   46   // Write a version of the Type 1 font file with a new encoding.
   47   void writeEncoded(const char **newEncoding,
   48             FoFiOutputFunc outputFunc, void *outputStream);
   49 
   50 private:
   51 
   52   FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
   53 
   54   char *getNextLine(char *line);
   55   void parse();
   56   void undoPFB();
   57 
   58   char *name;
   59   char **encoding;
   60   double fontMatrix[6];
   61   GBool parsed;
   62 };
   63 
   64 #endif