source: trunk/poppler/mypoppler/splash/SplashFontFile.h @ 2

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 16 years ago

First import

File size: 1.5 KB
Line 
1//========================================================================
2//
3// SplashFontFile.h
4//
5//========================================================================
6
7#ifndef SPLASHFONTFILE_H
8#define SPLASHFONTFILE_H
9
10#ifdef USE_GCC_PRAGMAS
11#pragma interface
12#endif
13
14#include "goo/gtypes.h"
15#include "SplashTypes.h"
16
17class GooString;
18class SplashFontEngine;
19class SplashFont;
20class SplashFontFileID;
21
22//------------------------------------------------------------------------
23// SplashFontFile
24//------------------------------------------------------------------------
25
26struct SplashFontSrc {
27  SplashFontSrc();
28  ~SplashFontSrc();
29
30  void setFile(GooString *file, GBool del);
31  void setFile(const char *file, GBool del);
32  void setBuf(char *bufA, int buflenA, GBool del);
33
34  void ref();
35  void unref();
36
37  GBool isFile;
38  GooString *fileName;
39  char *buf;
40  int bufLen;
41  GBool deleteSrc;
42  int refcnt;
43};
44
45class SplashFontFile {
46public:
47
48  virtual ~SplashFontFile();
49
50  // Create a new SplashFont, i.e., a scaled instance of this font
51  // file.
52  virtual SplashFont *makeFont(SplashCoord *mat) = 0;
53
54  // Get the font file ID.
55  SplashFontFileID *getID() { return id; }
56
57  // Increment the reference count.
58  void incRefCnt();
59
60  // Decrement the reference count.  If the new value is zero, delete
61  // the SplashFontFile object.
62  void decRefCnt();
63
64protected:
65
66  SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA);
67
68  SplashFontFileID *id;
69  SplashFontSrc *src;
70  int refCnt;
71
72  friend class SplashFontEngine;
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.