21 #include <osl/diagnose.h>
32 , mpInFontBytes( nullptr)
35 , mpSftTTFont( nullptr)
38 , mpReqFontName(nullptr)
39 , mpReqGlyphIds(nullptr)
40 , mpReqEncodedIds(nullptr)
52 const unsigned char* pInFontBytes,
int nInByteLength)
70 FILE* pOutFile,
const char* pReqFontName,
72 sal_Int32* pOutGlyphWidths)
104 OSL_FAIL(
"unhandled type in CreateFontSubset()");
115 sal_uInt32 nCffLength = 0;
126 #if 1 // TODO: remove conversion tp 16bit glyphids when sft-subsetter has been updated
127 std::vector<sal_uInt16> aShortGlyphIds;
130 aShortGlyphIds.push_back(static_cast<sal_uInt16>(
mpReqGlyphIds[
i]));
159 "CreateFontSubsetFromType1: replace dummy implementation.");
const sal_GlyphId * mpReqGlyphIds
CFF-container with PSType2 glyphs.
bool CreateFontSubset(FontType nOutFontTypeMask, FILE *pOutFile, const char *pOutFontName, const sal_GlyphId *pGlyphIds, const sal_uInt8 *pEncodedIds, int nReqGlyphCount, sal_Int32 *pOutGlyphWidths=nullptr)
SFErrCodes
Return value of OpenTTFont() and CreateT3FromTTGlyphs()
bool CreateFontSubsetFromCff(sal_Int32 *pOutGlyphWidths)
void LoadFont(FontType eInFontType, const unsigned char *pFontBytes, int nByteLength)
SFErrCodes CreateT42FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *psname, sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs)
Generates a new PostScript Type42 font and dumps it to outf file.
vcl::TrueTypeFont * mpSftTTFont
const char * mpReqFontName
SFNT container with CFF-container.
FontType
< SFT's idea of a TTF font
unsigned const char * mpInFontBytes
PSType1 Postscript Font Ascii.
SFNT container with TrueType glyphs.
const sal_uInt8 * table(sal_uInt32 ord, sal_uInt32 &size) const override
FontType mnReqFontTypeMask
allowed subset-target font types
const sal_uInt8 * mpReqEncodedIds
#define SAL_WARN_IF(condition, area, stream)
PSType42 wrapper for an SFNT_TTF.
FontType meInFontType
allowed mask of input font-types
PSType1 Postscript Font Binary.
static bool CreateFontSubsetFromType1(const sal_Int32 *pOutGlyphWidths)
#define SAL_WARN(area, stream)
SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs, int wmode)
Generates a new PostScript Type 3 font and dumps it to outf file.
bool CreateFontSubsetFromSfnt(sal_Int32 *pOutGlyphWidths)