LibreOffice Module vcl (master) 1
|
#include <fontsubset.hxx>
Public Member Functions | |
FontSubsetInfo () | |
~FontSubsetInfo () | |
void | LoadFont (FontType eInFontType, const unsigned char *pFontBytes, int nByteLength) |
void | LoadFont (vcl::TrueTypeFont *pSftTrueTypeFont) |
bool | CreateFontSubset (FontType nOutFontTypeMask, FILE *pOutFile, const char *pOutFontName, const sal_GlyphId *pGlyphIds, const sal_uInt8 *pEncodedIds, int nReqGlyphCount, sal_Int32 *pOutGlyphWidths=nullptr) |
Public Attributes | |
OUString | m_aPSName |
int | m_nAscent |
all metrics in PS font units More... | |
int | m_nDescent |
int | m_nCapHeight |
tools::Rectangle | m_aFontBBox |
FontType | m_nFontType |
font-type of subset result More... | |
Private Member Functions | |
bool | CreateFontSubsetFromCff (sal_Int32 *pOutGlyphWidths) |
bool | CreateFontSubsetFromSfnt (sal_Int32 *pOutGlyphWidths) |
Static Private Member Functions | |
static bool | CreateFontSubsetFromType1 (const sal_Int32 *pOutGlyphWidths) |
Private Attributes | |
unsigned const char * | mpInFontBytes |
int | mnInByteLength |
FontType | meInFontType |
allowed mask of input font-types More... | |
vcl::TrueTypeFont * | mpSftTTFont |
FontType | mnReqFontTypeMask |
allowed subset-target font types More... | |
FILE * | mpOutFile |
const char * | mpReqFontName |
const sal_GlyphId * | mpReqGlyphIds |
const sal_uInt8 * | mpReqEncodedIds |
int | mnReqGlyphCount |
Definition at line 49 of file fontsubset.hxx.
|
explicit |
Definition at line 27 of file fontsubset.cxx.
References NO_FONT.
FontSubsetInfo::~FontSubsetInfo | ( | ) |
Definition at line 45 of file fontsubset.cxx.
bool FontSubsetInfo::CreateFontSubset | ( | FontType | nOutFontTypeMask, |
FILE * | pOutFile, | ||
const char * | pOutFontName, | ||
const sal_GlyphId * | pGlyphIds, | ||
const sal_uInt8 * | pEncodedIds, | ||
int | nReqGlyphCount, | ||
sal_Int32 * | pOutGlyphWidths = nullptr |
||
) |
Definition at line 68 of file fontsubset.cxx.
References ANY_SFNT, ANY_TYPE1, CFF_FONT, CreateFontSubsetFromCff(), CreateFontSubsetFromSfnt(), CreateFontSubsetFromType1(), meInFontType, mnReqFontTypeMask, mnReqGlyphCount, mpOutFile, mpReqEncodedIds, mpReqFontName, mpReqGlyphIds, NO_FONT, SFNT_CFF, SFNT_TTF, TYPE1_PFA, and TYPE1_PFB.
Referenced by SalGraphics::CreateCFFfontSubset().
|
private |
Definition at line 2043 of file cff.cxx.
References mnInByteLength, mnReqFontTypeMask, mnReqGlyphCount, mpInFontBytes, mpOutFile, mpReqEncodedIds, mpReqFontName, mpReqGlyphIds, and TYPE1_PFB.
Referenced by CreateFontSubset(), and CreateFontSubsetFromSfnt().
|
private |
Definition at line 112 of file fontsubset.cxx.
References vcl::BadArg, CFF_FONT, CreateFontSubsetFromCff(), vcl::CreateT3FromTTGlyphs(), vcl::CreateT42FromTTGlyphs(), i, LoadFont(), mnReqFontTypeMask, mnReqGlyphCount, mpOutFile, mpReqEncodedIds, mpReqFontName, mpReqGlyphIds, mpSftTTFont, vcl::O_CFF, vcl::Ok, SFNT_TTF, vcl::TrueTypeFont::table(), TYPE3_FONT, and TYPE42_FONT.
Referenced by CreateFontSubset().
|
staticprivate |
Definition at line 156 of file fontsubset.cxx.
References SAL_WARN.
Referenced by CreateFontSubset().
void FontSubsetInfo::LoadFont | ( | FontType | eInFontType, |
const unsigned char * | pFontBytes, | ||
int | nByteLength | ||
) |
Definition at line 50 of file fontsubset.cxx.
References meInFontType, mnInByteLength, mpInFontBytes, mpSftTTFont, and SAL_WARN_IF.
Referenced by SalGraphics::CreateCFFfontSubset(), and CreateFontSubsetFromSfnt().
void FontSubsetInfo::LoadFont | ( | vcl::TrueTypeFont * | pSftTrueTypeFont | ) |
Definition at line 61 of file fontsubset.cxx.
References ANY_SFNT, meInFontType, mpInFontBytes, mpSftTTFont, and SAL_WARN_IF.
tools::Rectangle FontSubsetInfo::m_aFontBBox |
Definition at line 70 of file fontsubset.hxx.
Referenced by vcl::PDFWriterImpl::emitFontDescriptor(), vcl::PDFWriterImpl::emitSystemFont(), and SalGraphics::FillFontSubsetInfo().
OUString FontSubsetInfo::m_aPSName |
Definition at line 66 of file fontsubset.hxx.
Referenced by vcl::PDFWriterImpl::emitFontDescriptor(), vcl::PDFWriterImpl::emitFonts(), vcl::PDFWriterImpl::emitSystemFont(), and SalGraphics::FillFontSubsetInfo().
int FontSubsetInfo::m_nAscent |
all metrics in PS font units
Definition at line 67 of file fontsubset.hxx.
Referenced by vcl::PDFWriterImpl::emitFontDescriptor(), vcl::PDFWriterImpl::emitSystemFont(), and SalGraphics::FillFontSubsetInfo().
int FontSubsetInfo::m_nCapHeight |
Definition at line 69 of file fontsubset.hxx.
Referenced by vcl::PDFWriterImpl::emitFontDescriptor(), vcl::PDFWriterImpl::emitSystemFont(), and SalGraphics::FillFontSubsetInfo().
int FontSubsetInfo::m_nDescent |
Definition at line 68 of file fontsubset.hxx.
Referenced by vcl::PDFWriterImpl::emitFontDescriptor(), vcl::PDFWriterImpl::emitSystemFont(), and SalGraphics::FillFontSubsetInfo().
FontType FontSubsetInfo::m_nFontType |
font-type of subset result
Definition at line 71 of file fontsubset.hxx.
Referenced by vcl::PDFWriterImpl::emitFontDescriptor(), vcl::PDFWriterImpl::emitFonts(), and SalGraphics::FillFontSubsetInfo().
|
private |
allowed mask of input font-types
Definition at line 77 of file fontsubset.hxx.
Referenced by CreateFontSubset(), and LoadFont().
|
private |
Definition at line 76 of file fontsubset.hxx.
Referenced by CreateFontSubsetFromCff(), and LoadFont().
|
private |
allowed subset-target font types
Definition at line 81 of file fontsubset.hxx.
Referenced by CreateFontSubset(), CreateFontSubsetFromCff(), and CreateFontSubsetFromSfnt().
|
private |
Definition at line 86 of file fontsubset.hxx.
Referenced by CreateFontSubset(), CreateFontSubsetFromCff(), and CreateFontSubsetFromSfnt().
|
private |
Definition at line 75 of file fontsubset.hxx.
Referenced by CreateFontSubsetFromCff(), and LoadFont().
|
private |
Definition at line 82 of file fontsubset.hxx.
Referenced by CreateFontSubset(), CreateFontSubsetFromCff(), and CreateFontSubsetFromSfnt().
|
private |
Definition at line 85 of file fontsubset.hxx.
Referenced by CreateFontSubset(), CreateFontSubsetFromCff(), and CreateFontSubsetFromSfnt().
|
private |
Definition at line 83 of file fontsubset.hxx.
Referenced by CreateFontSubset(), CreateFontSubsetFromCff(), and CreateFontSubsetFromSfnt().
|
private |
Definition at line 84 of file fontsubset.hxx.
Referenced by CreateFontSubset(), CreateFontSubsetFromCff(), and CreateFontSubsetFromSfnt().
|
private |
Definition at line 78 of file fontsubset.hxx.
Referenced by CreateFontSubsetFromSfnt(), and LoadFont().