[Libreoffice-commits] core.git: vcl/inc vcl/source
Tor Lillqvist
tml at collabora.com
Fri Aug 21 03:01:02 PDT 2015
vcl/inc/sft.hxx | 21 ---------------------
vcl/source/fontsubset/sft.cxx | 23 -----------------------
2 files changed, 44 deletions(-)
New commits:
commit d08479edf59ea8b2390f6dd83b644883781f09bb
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Aug 21 12:58:00 2015 +0300
No NO_MAPPERS, NO_TYPE3, NO_TYPE42 or NO_TTCR anywhere
Change-Id: Icab5608900108c89e649e78a2e35d02e941d0ac0
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index e2ae44e..e2c7fb4 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -24,16 +24,6 @@
*/
/*
- * If NO_MAPPERS is defined, MapChar() and MapString() and consequently GetTTSimpleCharMetrics()
- * don't get compiled in. This is done to avoid including a large chunk of code (TranslateXY() from
- * xlat.c in the projects that don't require it.
- *
- * If NO_TYPE3 is defined CreateT3FromTTGlyphs() does not get compiled in.
- * If NO_TYPE42 is defined Type42-related code is excluded
- * If NO_TTCR is defined TrueType creation related code is excluded\
- */
-
-/*
* Generated fonts contain an XUID entry in the form of:
*
* 103 0 T C1 N C2 C3
@@ -139,7 +129,6 @@ namespace vcl
OVERLAP_COMPOUND = 1<<10
};
-#ifndef NO_TTCR
/** Flags for TrueType generation */
enum TTCreationFlags {
TTCF_AutoName = 1, /**< Automatically generate a compact 'name' table.
@@ -155,7 +144,6 @@ namespace vcl
TTCF_IncludeOS2 = 2 /** If this flag is set OS/2 table from the original font will be
copied to the subset */
};
-#endif
/** Structure used by GetTTSimpleGlyphMetrics() and GetTTSimpleCharMetrics() functions */
typedef struct {
@@ -363,7 +351,6 @@ namespace vcl
*/
void DisposeNameRecords(NameRecord* nr, int n);
-#ifndef NO_TYPE3
/**
* Generates a new PostScript Type 3 font and dumps it to <b>outf</b> file.
* This function substitutes glyph 0 for all glyphIDs that are not found in the font.
@@ -382,9 +369,7 @@ namespace vcl
*
*/
int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, sal_uInt16 *glyphArray, sal_uInt8 *encoding, int nGlyphs, int wmode);
-#endif
-#ifndef NO_TTCR
/**
* Generates a new TrueType font and dumps it to <b>outf</b> file.
* This function substitutes glyph 0 for all glyphIDs that are not found in the font.
@@ -413,9 +398,7 @@ namespace vcl
int nNameRecs,
NameRecord *nr,
sal_uInt32 flags);
-#endif
-#ifndef NO_TYPE42
/**
* Generates a new PostScript Type42 font and dumps it to <b>outf</b> file.
* This function substitutes glyph 0 for all glyphIDs that are not found in the font.
@@ -442,7 +425,6 @@ namespace vcl
sal_uInt16 *glyphArray,
sal_uInt8 *encoding,
int nGlyphs);
-#endif
/**
* Queries glyph metrics. Allocates an array of TTSimpleGlyphMetrics structs and returns it.
@@ -456,7 +438,6 @@ namespace vcl
*/
TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, bool vertical);
-#ifndef NO_MAPPERS
/**
* Queries glyph metrics. Allocates an array of TTSimpleGlyphMetrics structs and returns it.
* This function behaves just like GetTTSimpleGlyphMetrics() but it takes a range of Unicode
@@ -511,8 +492,6 @@ namespace vcl
*/
int DoesVerticalSubstitution( TrueTypeFont *ttf, int bvertical);
-#endif
-
/**
* Returns global font information about the TrueType font.
* @see TTGlobalFontInfo
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 60eda64..88c818e 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -35,15 +35,9 @@
#endif
#include "sft.hxx"
#include "gsub.h"
-#if ! (defined(NO_TTCR) && defined(NO_TYPE42))
#include "ttcr.hxx"
-#endif
-#ifndef NO_MAPPERS /* include MapChar() and MapString() */
#include "xlat.hxx"
-#endif
-#ifndef NO_TYPE3 /* include CreateT3FromTTGlyphs() */
#include <rtl/crc.h>
-#endif
#include <rtl/ustring.hxx>
#include <osl/endian.h>
@@ -308,7 +302,6 @@ _inline sal_uInt32 getTableSize(TrueTypeFont *ttf, sal_uInt32 ord)
return ttf->tlens[ord];
}
-#ifndef NO_TYPE42
/* Hex Formatter functions */
static const char HexChars[] = "0123456789ABCDEF";
@@ -371,7 +364,6 @@ static void HexFmtBlockWrite(HexFmt *_this, const void *ptr, sal_uInt32 size)
}
_this->total += size;
}
-#endif
/* Outline Extraction functions */
@@ -724,8 +716,6 @@ static int GetTTGlyphOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint
return res;
}
-#ifndef NO_TYPE3
-
/*- returns the number of items in the path -*/
static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **path)
@@ -854,8 +844,6 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
return nPathCount;
}
-#endif
-
/*- Extracts a string from the name table and allocates memory for it -*/
static char *nameExtract( const sal_uInt8* name, int nTableSize, int n, int dbFlag, sal_uInt16** ucs2result )
@@ -1817,7 +1805,6 @@ int GetTTGlyphComponents(TrueTypeFont *ttf, sal_uInt32 glyphID, std::vector< sal
return n;
}
-#ifndef NO_TYPE3
int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname,
sal_uInt16 *glyphArray, sal_uInt8 *encoding, int nGlyphs,
int wmode)
@@ -1969,9 +1956,7 @@ int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname,
return SF_OK;
}
-#endif
-#ifndef NO_TTCR
int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
const char *fname,
sal_uInt16 *glyphArray,
@@ -2115,9 +2100,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
return res;
}
-#endif
-#ifndef NO_TYPE42
static GlyphOffsets *GlyphOffsetsNew(sal_uInt8 *sfntP, sal_uInt32 sfntLen)
{
GlyphOffsets* res = static_cast<GlyphOffsets*>(smalloc(sizeof(GlyphOffsets)));
@@ -2375,9 +2358,7 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
free(sfntP);
return SF_OK;
}
-#endif
-#ifndef NO_MAPPERS
int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, bool bvertical)
{
int i;
@@ -2463,8 +2444,6 @@ int DoesVerticalSubstitution( TrueTypeFont *ttf, int bvertical)
return nRet;
}
-#endif
-
int GetTTGlyphCount( TrueTypeFont* ttf )
{
return ttf->nglyphs;
@@ -2535,7 +2514,6 @@ TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *gly
return res;
}
-#ifndef NO_MAPPERS
TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firstChar, int nChars, bool vertical)
{
TTSimpleGlyphMetrics *res = 0;
@@ -2553,7 +2531,6 @@ TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firs
return res;
}
-#endif
void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
{
More information about the Libreoffice-commits
mailing list