Kaydet (Commit) 3665c4b1 authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Michael Meeks

No NO_MAPPERS, NO_TYPE3, NO_TYPE42 or NO_TTCR anywhere

Change-Id: Icab5608900108c89e649e78a2e35d02e941d0ac0
Signed-off-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 4b062fab
......@@ -23,16 +23,6 @@
* @author Alexander Gelfenbain
*/
/*
* 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:
*
......@@ -140,7 +130,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.
......@@ -156,7 +145,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 {
......@@ -364,7 +352,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.
......@@ -383,9 +370,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.
......@@ -414,9 +399,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.
......@@ -443,7 +426,6 @@ namespace vcl
sal_uInt16 *glyphArray,
sal_uInt8 *encoding,
int nGlyphs);
#endif
/**
* Queries glyph metrics. Allocates an array of TTSimpleGlyphMetrics structs and returns it.
......@@ -457,7 +439,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
......@@ -512,8 +493,6 @@ namespace vcl
*/
int DoesVerticalSubstitution( TrueTypeFont *ttf, int bvertical);
#endif
/**
* Returns global font information about the TrueType font.
* @see TTGlobalFontInfo
......
......@@ -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 )
......@@ -1814,7 +1802,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)
......@@ -1966,9 +1953,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,
......@@ -2112,9 +2097,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)));
......@@ -2372,9 +2355,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;
......@@ -2460,8 +2441,6 @@ int DoesVerticalSubstitution( TrueTypeFont *ttf, int bvertical)
return nRet;
}
#endif
int GetTTGlyphCount( TrueTypeFont* ttf )
{
return ttf->nglyphs;
......@@ -2532,7 +2511,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;
......@@ -2550,7 +2528,6 @@ TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firs
return res;
}
#endif
void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
{
......
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