1 //========================================================================
5 //========================================================================
7 //========================================================================
9 // Modified under the Poppler project - http://poppler.freedesktop.org
11 // All changes made under the Poppler project to this file are licensed
12 // under GPL version 2 or later
14 // Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
15 // Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
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
20 //========================================================================
24 #ifdef USE_GCC_PRAGMAS
25 #pragma implementation
33 #include "goo/GooString.h"
34 #include "SplashFontFile.h"
35 #include "SplashFontFileID.h"
38 #if (__VMS_VER < 70000000)
39 extern "C" int unlink(char *filename
);
43 //------------------------------------------------------------------------
45 //------------------------------------------------------------------------
47 SplashFontFile::SplashFontFile(SplashFontFileID
*idA
, SplashFontSrc
*srcA
) {
52 doAdjustMatrix
= gFalse
;
55 SplashFontFile::~SplashFontFile() {
60 void SplashFontFile::incRefCnt() {
64 void SplashFontFile::decRefCnt() {
72 SplashFontSrc::SplashFontSrc() {
80 SplashFontSrc::~SplashFontSrc() {
84 unlink(fileName
->getCString());
91 if (isFile
&& fileName
)
95 void SplashFontSrc::ref() {
99 void SplashFontSrc::unref() {
104 void SplashFontSrc::setFile(GooString
*file
, GBool del
)
107 fileName
= file
->copy();
111 void SplashFontSrc::setFile(const char *file
, GBool del
)
114 fileName
= new GooString(file
);
118 void SplashFontSrc::setBuf(char *bufA
, int bufLenA
, GBool del
)