diff options
-rw-r--r-- | fofi/FoFiType1.cc | 10 | ||||
-rw-r--r-- | fofi/FoFiType1.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc index 889ea111..62d10c8c 100644 --- a/fofi/FoFiType1.cc +++ b/fofi/FoFiType1.cc @@ -45,7 +45,7 @@ // FoFiType1 //------------------------------------------------------------------------ -FoFiType1 *FoFiType1::make(char *fileA, int lenA) { +FoFiType1 *FoFiType1::make(const char *fileA, int lenA) { return new FoFiType1(fileA, lenA, gFalse); } @@ -59,7 +59,7 @@ FoFiType1 *FoFiType1::load(const char *fileName) { return new FoFiType1(fileA, lenA, gTrue); } -FoFiType1::FoFiType1(char *fileA, int lenA, GBool freeFileDataA): +FoFiType1::FoFiType1(const char *fileA, int lenA, GBool freeFileDataA): FoFiBase(fileA, lenA, freeFileDataA) { name = nullptr; @@ -88,7 +88,7 @@ FoFiType1::~FoFiType1() { } } -char *FoFiType1::getName() { +const char *FoFiType1::getName() { if (!parsed) { parse(); } @@ -114,7 +114,7 @@ void FoFiType1::getFontMatrix(double *mat) { } void FoFiType1::writeEncoded(const char **newEncoding, - FoFiOutputFunc outputFunc, void *outputStream) { + FoFiOutputFunc outputFunc, void *outputStream) const { char buf[512]; char *line, *line2, *p; int i; @@ -196,7 +196,7 @@ void FoFiType1::writeEncoded(const char **newEncoding, } } -char *FoFiType1::getNextLine(char *line) { +char *FoFiType1::getNextLine(char *line) const { while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') { ++line; } diff --git a/fofi/FoFiType1.h b/fofi/FoFiType1.h index 167a5e43..f8a92cab 100644 --- a/fofi/FoFiType1.h +++ b/fofi/FoFiType1.h @@ -38,7 +38,7 @@ class FoFiType1: public FoFiBase { public: // Create a FoFiType1 object from a memory buffer. - static FoFiType1 *make(char *fileA, int lenA); + static FoFiType1 *make(const char *fileA, int lenA); // Create a FoFiType1 object from a file on disk. static FoFiType1 *load(const char *fileName); @@ -46,7 +46,7 @@ public: ~FoFiType1(); // Return the font name. - char *getName(); + const char *getName(); // Return the encoding, as an array of 256 names (any of which may // be NULL). @@ -57,13 +57,13 @@ public: // Write a version of the Type 1 font file with a new encoding. void writeEncoded(const char **newEncoding, - FoFiOutputFunc outputFunc, void *outputStream); + FoFiOutputFunc outputFunc, void *outputStream) const; private: - FoFiType1(char *fileA, int lenA, GBool freeFileDataA); + FoFiType1(const char *fileA, int lenA, GBool freeFileDataA); - char *getNextLine(char *line); + char *getNextLine(char *line) const; void parse(); void undoPFB(); |