~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/poppler/splash/SplashFontFile.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//========================================================================
 
2
//
 
3
// SplashFontFile.h
 
4
//
 
5
//========================================================================
 
6
 
 
7
//========================================================================
 
8
//
 
9
// Modified under the Poppler project - http://poppler.freedesktop.org
 
10
//
 
11
// All changes made under the Poppler project to this file are licensed
 
12
// under GPL version 2 or later
 
13
//
 
14
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
 
15
// Copyright (C) 2008, 2010 Albert Astals Cid <aacid@kde.org>
 
16
//
 
17
// To see a description of the changes please see the Changelog file that
 
18
// came with your tarball or type make ChangeLog if you are building from git
 
19
//
 
20
//========================================================================
 
21
 
 
22
#ifndef SPLASHFONTFILE_H
 
23
#define SPLASHFONTFILE_H
 
24
 
 
25
#ifdef USE_GCC_PRAGMAS
 
26
#pragma interface
 
27
#endif
 
28
 
 
29
#include "goo/gtypes.h"
 
30
#include "SplashTypes.h"
 
31
 
 
32
class GooString;
 
33
class SplashFontEngine;
 
34
class SplashFont;
 
35
class SplashFontFileID;
 
36
 
 
37
//------------------------------------------------------------------------
 
38
// SplashFontFile
 
39
//------------------------------------------------------------------------
 
40
 
 
41
class SplashFontSrc {
 
42
public:
 
43
  SplashFontSrc();
 
44
 
 
45
  void setFile(GooString *file, GBool del);
 
46
  void setFile(const char *file, GBool del);
 
47
  void setBuf(char *bufA, int buflenA, GBool del);
 
48
 
 
49
  void ref();
 
50
  void unref();
 
51
 
 
52
  GBool isFile;
 
53
  GooString *fileName;
 
54
  char *buf;
 
55
  int bufLen;
 
56
 
 
57
private:
 
58
  ~SplashFontSrc();
 
59
  int refcnt;
 
60
  GBool deleteSrc;
 
61
};
 
62
 
 
63
class SplashFontFile {
 
64
public:
 
65
 
 
66
  virtual ~SplashFontFile();
 
67
 
 
68
  // Create a new SplashFont, i.e., a scaled instance of this font
 
69
  // file.
 
70
  virtual SplashFont *makeFont(SplashCoord *mat, SplashCoord *textMat) = 0;
 
71
 
 
72
  // Get the font file ID.
 
73
  SplashFontFileID *getID() { return id; }
 
74
 
 
75
  // Increment the reference count.
 
76
  void incRefCnt();
 
77
 
 
78
  // Decrement the reference count.  If the new value is zero, delete
 
79
  // the SplashFontFile object.
 
80
  void decRefCnt();
 
81
 
 
82
  GBool doAdjustMatrix;
 
83
 
 
84
protected:
 
85
 
 
86
  SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA);
 
87
 
 
88
  SplashFontFileID *id;
 
89
  SplashFontSrc *src;
 
90
  int refCnt;
 
91
 
 
92
  friend class SplashFontEngine;
 
93
};
 
94
 
 
95
#endif