21#include <osl/diagnose.h>
33 , mpInFontBytes( nullptr)
36 , mpSftTTFont( nullptr)
39 , mpReqFontName(nullptr)
40 , mpReqGlyphIds(nullptr)
41 , mpReqEncodedIds(nullptr)
53 const unsigned char* pInFontBytes,
int nInByteLength)
71 SvStream* pOutFile,
const char* pReqFontName,
106 OSL_FAIL(
"unhandled type in CreateFontSubset()");
117 sal_uInt32 nCffLength = 0;
129 std::vector<sal_uInt16> aShortGlyphIds;
132 aShortGlyphIds.push_back(
static_cast<sal_uInt16
>(
mpReqGlyphIds[
i]));
const char * mpReqFontName
unsigned const char * mpInFontBytes
const sal_GlyphId * mpReqGlyphIds
bool CreateFontSubsetFromCff()
bool CreateFontSubsetFromSfnt()
void LoadFont(FontType eInFontType, const unsigned char *pFontBytes, int nByteLength)
vcl::TrueTypeFont * mpSftTTFont
bool CreateFontSubset(FontType nOutFontTypeMask, SvStream *pOutFile, const char *pOutFontName, const sal_GlyphId *pGlyphIds, const sal_uInt8 *pEncodedIds, int nReqGlyphCount)
const sal_uInt8 * mpReqEncodedIds
FontType mnReqFontTypeMask
allowed subset-target font types
FontType meInFontType
allowed mask of input font-types
const sal_uInt8 * table(sal_uInt32 ord, sal_uInt32 &size) const override
@ TYPE1_PFB
PSType1 Postscript Font Binary.
@ CFF_FONT
CFF-container with PSType2 glyphs.
@ TYPE1_PFA
PSType1 Postscript Font Ascii.
@ TYPE3_FONT
PSType3 Postscript font.
@ TYPE42_FONT
PSType42 wrapper for an SFNT_TTF.
@ SFNT_CFF
SFNT container with CFF-container.
@ SFNT_TTF
SFNT container with TrueType glyphs.
SFErrCodes CreateT42FromTTGlyphs(TrueTypeFont *ttf, SvStream *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.
SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, SvStream *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.
#define SAL_WARN_IF(condition, area, stream)
SFErrCodes
Return value of OpenTTFont() and CreateT3FromTTGlyphs()
@ BadArg
incorrect arguments