summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r--vcl/source/fontsubset/cff.cxx22
-rw-r--r--vcl/source/fontsubset/fontsubset.cxx1
-rw-r--r--vcl/source/fontsubset/gsub.cxx2
-rw-r--r--vcl/source/fontsubset/sft.cxx12
-rw-r--r--vcl/source/fontsubset/ttcr.cxx24
-rw-r--r--vcl/source/fontsubset/ttcr.hxx4
-rw-r--r--vcl/source/fontsubset/xlat.hxx1
7 files changed, 0 insertions, 66 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 83f68152e798..8880095fb7cc 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <cstdio>
#include <cstring>
#include <assert.h>
@@ -256,7 +255,6 @@ struct TYPE2OP
};
};
-
struct CffGlobal
{
explicit CffGlobal();
@@ -285,7 +283,6 @@ struct CffGlobal
int mnFamilyNameSID;
};
-
struct CffLocal
{
explicit CffLocal();
@@ -317,7 +314,6 @@ struct CffLocal
bool mbForceBold;
};
-
class SubsetterContext
{
public:
@@ -327,12 +323,9 @@ public:
GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ) = 0;
};
-
-
SubsetterContext::~SubsetterContext( void)
{}
-
class CffSubsetterContext
: public SubsetterContext
, private CffGlobal
@@ -439,8 +432,6 @@ private:
ValType maCharWidth;
};
-
-
CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
: mpBasePtr( pBasePtr)
, mpBaseEnd( pBasePtr+nBaseLen)
@@ -454,15 +445,11 @@ CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
mpCffLocal = &maCffLocal[0];
}
-
-
CffSubsetterContext::~CffSubsetterContext( void)
{
// TODO: delete[] maCffLocal;
}
-
-
inline int CffSubsetterContext::popInt( void)
{
const ValType aVal = popVal();
@@ -471,8 +458,6 @@ inline int CffSubsetterContext::popInt( void)
return nInt;
}
-
-
inline int CffSubsetterContext::peekInt( void) const
{
const ValType aVal = peekVal();
@@ -481,8 +466,6 @@ inline int CffSubsetterContext::peekInt( void) const
return nInt;
}
-
-
inline int CffSubsetterContext::getInt( int nIndex) const
{
const ValType aVal = getVal( nIndex);
@@ -491,8 +474,6 @@ inline int CffSubsetterContext::getInt( int nIndex) const
return nInt;
}
-
-
inline void CffSubsetterContext::updateWidth( bool bUseFirstVal)
{
#if 1 // TODO: is this still needed?
@@ -511,8 +492,6 @@ inline void CffSubsetterContext::updateWidth( bool bUseFirstVal)
}
}
-
-
void CffSubsetterContext::addHints( bool bVerticalHints)
{
// the first charstring value may a charwidth instead of a charwidth
@@ -1456,7 +1435,6 @@ void CffSubsetterContext::seekIndexEnd( int nIndexBase)
assert( mpReadEnd <= mpBaseEnd);
}
-
// initialize FONTDICT specific values
CffLocal::CffLocal( void)
: mnPrivDictBase( 0)
diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx
index 0f11ef7d251d..3be409923c83 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <tools/debug.hxx>
#include <fontsubset.hxx>
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 3d5c5d146643..147cba7d735a 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "sft.hxx"
#include "gsub.h"
@@ -36,7 +35,6 @@ typedef sal_uInt8 FT_Byte;
typedef std::map<sal_uInt16,sal_uInt16> GlyphSubstitution;
-
inline sal_uInt32 NEXT_Long( const unsigned char* &p )
{
sal_uInt32 nVal = (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3];
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index d95715903086..438876e0adfd 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
/*
* Sun Font Tools
*
@@ -208,7 +207,6 @@ _inline sal_uInt32 GetUInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
sal_uInt32 t;
assert(ptr != 0);
-
if (bigendian) {
t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 |
(ptr+offset)[2] << 8 | (ptr+offset)[3];
@@ -258,7 +256,6 @@ _inline F16Dot16 fixedMul(F16Dot16 a, F16Dot16 b)
return sign ? -res : res;
}
-
_inline F16Dot16 fixedDiv(F16Dot16 a, F16Dot16 b)
{
unsigned int f, r;
@@ -375,8 +372,6 @@ static void HexFmtBlockWrite(HexFmt *_this, const void *ptr, sal_uInt32 size)
}
#endif
-
-
/* Outline Extraction functions */
/* fills the aw and lsb entries of the TTGlyphMetrics structure from hmtx table -*/
@@ -812,7 +807,6 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
continue;
}
-
if (cp == EndContour) {
cp = StartContour;
ecflag = true;
@@ -1148,7 +1142,6 @@ static sal_uInt16 GEbinsearch(sal_uInt16 *ar, sal_uInt16 length, sal_uInt16 toSe
return (sal_uInt16)lastfound;
}
-
static sal_uInt32 getGlyph4(const sal_uInt8 *cmap, sal_uInt32 c) {
sal_uInt16 i;
int ToReturn;
@@ -1216,7 +1209,6 @@ static sal_uInt32 getGlyph12(const sal_uInt8 *pCmap, sal_uInt32 cChar) {
return MISSING_GLYPH_INDEX;
}
-
static void FindCmap(TrueTypeFont *ttf)
{
const sal_uInt8* table = getTable(ttf, O_cmap);
@@ -1791,7 +1783,6 @@ int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname,
const char *h41 = "(%s) cvn exch definefont pop\n";
-
if (!((nGlyphs > 0) && (nGlyphs <= 256))) return SF_GLYPHNUM;
if (!glyphArray) return SF_BADARG;
if (!fname) fname = ttf->psname;
@@ -1967,7 +1958,6 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
GetUInt16(p, 46, 1),
GetInt16(p, 48, 1));
-
/** glyf **/
glyf = TrueTypeTableNew_glyf();
@@ -2034,7 +2024,6 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
}
#endif
-
#ifndef NO_TYPE42
static GlyphOffsets *GlyphOffsetsNew(sal_uInt8 *sfntP)
{
@@ -2235,7 +2224,6 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
}
#endif
-
#ifndef NO_MAPPERS
int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, bool bvertical)
{
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 3dca37ce8f6e..fdc7d1518619 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -35,7 +35,6 @@
#include "list.h"
#include "string.h"
-
namespace vcl
{
@@ -169,7 +168,6 @@ static int NameRecordCompareF(const void *l, const void *r)
return 0;
}
-
static sal_uInt32 CheckSum(sal_uInt32 *ptr, sal_uInt32 length)
{
sal_uInt32 sum = 0;
@@ -259,7 +257,6 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
n = listCount(_this->tables);
numTables = (sal_uInt16) n;
-
TableEntry* te = (TableEntry*)scalloc(n, sizeof(TableEntry));
listToFirst(_this->tables);
@@ -348,8 +345,6 @@ int StreamToFile(TrueTypeCreator *_this, const char* fname)
return r;
}
-
-
/*
* TrueTypeTable private methods
*/
@@ -358,8 +353,6 @@ int StreamToFile(TrueTypeCreator *_this, const char* fname)
#define TABLESIZE_hhea 36
#define TABLESIZE_maxp 32
-
-
/* Table data points to
* --------------------------------------------
* generic tdata_generic struct
@@ -373,7 +366,6 @@ int StreamToFile(TrueTypeCreator *_this, const char* fname)
*
*/
-
#define CMAP_SUBTABLE_INIT 10
#define CMAP_SUBTABLE_INCR 10
#define CMAP_PAIR_INIT 500
@@ -413,7 +405,6 @@ typedef struct {
void *ptr; /* format-specific pointer */
} tdata_post;
-
/* allocate memory for a TT table */
static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
{
@@ -568,7 +559,6 @@ static int GetRawData_generic(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32
return TTCR_OK;
}
-
static int GetRawData_head(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
{
*len = TABLESIZE_head;
@@ -701,8 +691,6 @@ static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length)
return ptr;
}
-
-
/* XXX it only handles Format 0 encoding tables */
static sal_uInt8 *PackCmap(CmapSubTable *s, sal_uInt32 *length)
{
@@ -762,7 +750,6 @@ static int GetRawData_cmap(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
return TTCR_OK;
}
-
static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
{
list l;
@@ -862,10 +849,6 @@ static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
return ret;
}
-
-
-
-
static struct {
sal_uInt32 tag;
int (*f)(TrueTypeTable *, sal_uInt8 **, sal_uInt32 *, sal_uInt32 *);
@@ -881,7 +864,6 @@ static struct {
{T_name, GetRawData_name},
{T_post, GetRawData_post}
-
};
/*
@@ -934,7 +916,6 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
sal_uInt8* ptr = (sal_uInt8*)ttmalloc(TABLESIZE_head);
-
PutUInt32(0x00010000, ptr, 0, 1); /* version */
PutUInt32(fontRevision, ptr, 4, 1);
PutUInt32(0x5F0F3CF5, ptr, 12, 1); /* magic number */
@@ -1272,7 +1253,6 @@ sal_uInt32 glyfCount(const TrueTypeTable *table)
return listCount((list) table->data);
}
-
void nameAdd(TrueTypeTable *table, NameRecord *nr)
{
list l;
@@ -1348,7 +1328,6 @@ static void ProcessTables(TrueTypeCreator *tt)
glyfLen += gd->nbytes;
/* XXX if (gd->nbytes & 1) glyfLen++; */
-
assert(gd->newID == i);
gid[i++] = gd->glyphID;
/* gd->glyphID = i++; */
@@ -1524,7 +1503,6 @@ extern "C"
free(_this);
}
-
/**
* Destructor for the TrueTypeTable object.
*/
@@ -1547,7 +1525,6 @@ extern "C"
}
}
-
#ifdef TEST_TTCR
_inline sal_uInt32 mkTag(sal_uInt8 a, sal_uInt8 b, sal_uInt8 c, sal_uInt8 d) {
return (a << 24) | (b << 16) | (c << 8) | d;
@@ -1584,7 +1561,6 @@ int main(void)
free(t6);
free(t7);
-
StreamToFile(ttcr, "ttcrout.ttf");
TrueTypeCreatorDispose(ttcr);
diff --git a/vcl/source/fontsubset/ttcr.hxx b/vcl/source/fontsubset/ttcr.hxx
index bb94faae1081..e2ee3c4e0cec 100644
--- a/vcl/source/fontsubset/ttcr.hxx
+++ b/vcl/source/fontsubset/ttcr.hxx
@@ -79,7 +79,6 @@ namespace vcl
*/
void RemoveTable(TrueTypeCreator *_this, sal_uInt32 tag);
-
/**
* Writes a TrueType font generated by the TrueTypeCreator to a segment of
* memory that this method allocates. When it is not needed anymore the caller
@@ -94,7 +93,6 @@ namespace vcl
*/
int StreamToFile(TrueTypeCreator *_this, const char* fname);
-
/**
* This function converts the data of a TrueType table to a raw array of bytes.
* It may allocates the memory for it and returns the size of the raw data in bytes.
@@ -184,7 +182,6 @@ namespace vcl
sal_Int16 underlineThickness,
sal_uInt32 isFixedPitch);
-
// Table manipulation functions
/**
@@ -217,7 +214,6 @@ namespace vcl
} // namespace
-
extern "C"
{
/**
diff --git a/vcl/source/fontsubset/xlat.hxx b/vcl/source/fontsubset/xlat.hxx
index 2eb67832aeb5..62317c0d925b 100644
--- a/vcl/source/fontsubset/xlat.hxx
+++ b/vcl/source/fontsubset/xlat.hxx
@@ -19,7 +19,6 @@
/*| Author: Alexander Gelfenbain |*/
-
#ifndef INCLUDED_VCL_SOURCE_FONTSUBSET_XLAT_HXX
#define INCLUDED_VCL_SOURCE_FONTSUBSET_XLAT_HXX