Commit c7e3c2d7 authored by Albert Astals Cid's avatar Albert Astals Cid

Remove unused code

parent 06951f52
This diff is collapsed.
......@@ -15,7 +15,7 @@
//
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
// Copyright (C) 2011 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2011, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
//
// To see a description of the changes please see the Changelog file that
......@@ -152,15 +152,6 @@ public:
void convertToType0(char *psName, int *cidMap, int nCIDs,
FoFiOutputFunc outputFunc, void *outputStream);
// Write a clean TTF file, filling in missing tables and correcting
// various other errors. If <name> is non-NULL, the font is renamed
// to <name>. If <codeToGID> is non-NULL, the font is re-encoded,
// using a Windows Unicode cmap. If <name> is NULL and the font is
// complete and correct, it will be written unmodified. (Not useful
// for OpenType CFF fonts.)
void writeTTF(FoFiOutputFunc outputFunc, void *outputStream,
char *name = NULL, int *codeToGID = NULL);
// Returns a pointer to the CFF font embedded in this OpenType font.
// If successful, sets *<start> and *<length>, and returns true.
// Otherwise returns false. (Only useful for OpenType CFF fonts).
......
......@@ -12,7 +12,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2011, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
// Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
//
......@@ -47,14 +47,6 @@ extern "C" int unlink(char *filename);
#endif
#endif
//------------------------------------------------------------------------
#if 0
static void fileWrite(void *stream, const char *data, int len) {
fwrite(data, 1, len, (FILE *)stream);
}
#endif
//------------------------------------------------------------------------
// SplashFTFontEngine
//------------------------------------------------------------------------
......@@ -178,43 +170,11 @@ SplashFontFile *SplashFTFontEngine::loadTrueTypeFont(SplashFontFileID *idA,
int *codeToGID,
int codeToGIDLen,
int faceIndex) {
#if 0
FoFiTrueType *ff;
GooString *tmpFileName;
FILE *tmpFile;
SplashFontFile *ret;
if (!(ff = FoFiTrueType::load(fileName))) {
return NULL;
}
tmpFileName = NULL;
if (!openTempFile(&tmpFileName, &tmpFile, "wb")) {
delete ff;
return NULL;
}
ff->writeTTF(&fileWrite, tmpFile);
delete ff;
fclose(tmpFile);
ret = SplashFTFontFile::loadTrueTypeFont(this, idA,
tmpFileName->getCString(),
gTrue, codeToGID, codeToGIDLen,
faceIndex);
if (ret) {
if (deleteFile) {
unlink(fileName);
}
} else {
unlink(tmpFileName->getCString());
}
delete tmpFileName;
return ret;
#else
SplashFontFile *ret;
ret = SplashFTFontFile::loadTrueTypeFont(this, idA, src,
codeToGID, codeToGIDLen,
faceIndex);
return ret;
#endif
}
#endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment