git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c76b3f9
)
reworked fontdir logic
author
kramm
<kramm>
Fri, 27 Jul 2007 19:59:44 +0000
(19:59 +0000)
committer
kramm
<kramm>
Fri, 27 Jul 2007 19:59:44 +0000
(19:59 +0000)
src/pdf2swf.c
patch
|
blob
|
history
diff --git
a/src/pdf2swf.c
b/src/pdf2swf.c
index
15ba46a
..
748cdf4
100644
(file)
--- a/
src/pdf2swf.c
+++ b/
src/pdf2swf.c
@@
-28,9
+28,6
@@
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#include "../lib/args.h"
#include "../lib/os.h"
#include "../lib/rfxswf.h"
#include "../lib/args.h"
#include "../lib/os.h"
#include "../lib/rfxswf.h"
@@
-486,24
+483,12
@@
int main(int argn, char *argv[])
int nup_pos = 0;
int x,y;
char* installPath = getInstallationPath();
int nup_pos = 0;
int x,y;
char* installPath = getInstallationPath();
- char* fontdir = 0;
initLog(0,-1,0,0,-1,loglevel);
initLog(0,-1,0,0,-1,loglevel);
-#if defined(WIN32) && defined(HAVE_STAT) && defined(HAVE_SYS_STAT_H)
if(installPath) {
if(installPath) {
- fontdir = concatPaths(installPath, "fonts");
- FILE*test = fopen(concatPaths(fontdir,"\\d050000l.afm"), "rb");
- if(!test) {
- fprintf(stderr, "Couldn't find file %s - pdf2swf not installed properly? OS says:\n", concatPaths(fontdir, "\\d050000l.afm"));
- perror("open");
- exit(1);
- }
- fclose(test);
+ fontpaths[fontpathpos++] = concatPaths(installPath, "fonts");
}
}
-#else
- fontdir = concatPaths(installPath, "fonts");
-#endif
#ifdef HAVE_SRAND48
srand48(time(0));
#ifdef HAVE_SRAND48
srand48(time(0));
@@
-553,10
+538,6
@@
int main(int argn, char *argv[])
}
/* add fonts */
}
/* add fonts */
- /*
- if(fontdir) {
- driver->set_parameter("fontdir", fontdir);
- }*/
for(t=0;t<fontpathpos;t++) {
driver->set_parameter("fontdir", fontpaths[t]);
}
for(t=0;t<fontpathpos;t++) {
driver->set_parameter("fontdir", fontpaths[t]);
}