LibreOffice Module vcl (master)  1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
psp::PrintFontManager Class Reference

#include <fontmanager.hxx>

Collaboration diagram for psp::PrintFontManager:
[legend]

Classes

struct  PrintFont
 

Public Member Functions

 ~PrintFontManager ()
 
std::vector< fontIDaddFontFile (const OString &rFileName)
 
void initialize ()
 
void getFontList (std::vector< fontID > &rFontIDs)
 
bool getFontInfo (fontID nFontID, PrintFontInfo &rInfo) const
 
bool getFontFastInfo (fontID nFontID, FastPrintFontInfo &rInfo) const
 
OUString getPSName (fontID nFontID) const
 
FontItalic getFontItalic (fontID nFontID) const
 
FontWeight getFontWeight (fontID nFontID) const
 
OString getFontFileSysPath (fontID nFontID) const
 
int getFontFaceNumber (fontID nFontID) const
 
int getFontFaceVariation (fontID nFontID) const
 
int getFontAscend (fontID nFontID) const
 
int getFontDescend (fontID nFontID) const
 
void getFontBoundingBox (fontID nFont, int &xMin, int &yMin, int &xMax, int &yMax)
 
bool createFontSubset (FontSubsetInfo &, fontID nFont, const OUString &rOutFile, const sal_GlyphId *pGlyphIDs, const sal_uInt8 *pNewEncoding, sal_Int32 *pWidths, int nGlyphs)
 
void getGlyphWidths (fontID nFont, bool bVertical, std::vector< sal_Int32 > &rWidths, std::map< sal_Unicode, sal_uInt32 > &rUnicodeEnc)
 
void matchFont (FastPrintFontInfo &rInfo, const css::lang::Locale &rLocale)
 
void Substitute (FontSelectPattern &rPattern, OUString &rMissingCodes)
 

Static Public Member Functions

static PrintFontManagerget ()
 
static std::unique_ptr< FontConfigFontOptionsgetFontOptions (const FastPrintFontInfo &, int nSize)
 

Private Member Functions

OString getFontFile (const PrintFont *pFont) const
 
std::vector< std::unique_ptr< PrintFont > > analyzeFontFile (int nDirID, const OString &rFileName, const char *pFormat=nullptr) const
 
bool analyzeSfntFile (PrintFont *pFont) const
 
fontID findFontFileID (int nDirID, const OString &rFile, int nFaceIndex, int nVariationIndex) const
 
std::vector< fontIDfindFontFileIDs (int nDirID, const OString &rFile) const
 
PrintFontgetFont (fontID nID) const
 
void fillPrintFontInfo (PrintFont *pFont, PrintFontInfo &rInfo) const
 
OString getDirectory (int nAtom) const
 
int getDirectoryAtom (const OString &rDirectory)
 
void countFontconfigFonts (std::unordered_map< OString, int > &o_rVisitedPaths)
 
 DECL_LINK (autoInstallFontLangSupport, Timer *, void)
 
 PrintFontManager ()
 

Static Private Member Functions

static OUString convertSfntName (void *pNameRecord)
 
static void analyzeSfntFamilyName (void const *pTTFont, std::vector< OUString > &rnames)
 
static FontFamily matchFamilyName (const OUString &rFamily)
 
static void fillPrintFontInfo (PrintFont *pFont, FastPrintFontInfo &rInfo)
 
static void initFontconfig ()
 
static void deinitFontconfig ()
 
static void addFontconfigDir (const OString &rDirectory)
 

Private Attributes

fontID m_nNextFontID
 
std::unordered_map< fontID, std::unique_ptr< PrintFont > > m_aFonts
 
std::unordered_map< OString, std::set< fontID > > m_aFontFileToFontID
 
std::unordered_map< OString, intm_aDirToAtom
 
std::unordered_map< int, OString > m_aAtomToDir
 
int m_nNextDirAtom
 
std::set< OString > m_aPreviousLangSupportRequests
 
std::vector< OUString > m_aCurrentRequests
 
Timer m_aFontInstallerTimer
 

Friends

struct PrintFont
 
class ::GenericUnixSalData
 

Detailed Description

Definition at line 101 of file fontmanager.hxx.

Constructor & Destructor Documentation

psp::PrintFontManager::PrintFontManager ( )
private
psp::PrintFontManager::~PrintFontManager ( )

Member Function Documentation

static void psp::PrintFontManager::addFontconfigDir ( const OString &  rDirectory)
staticprivate
std::vector<fontID> psp::PrintFontManager::addFontFile ( const OString &  rFileName)
std::vector<std::unique_ptr<PrintFont> > psp::PrintFontManager::analyzeFontFile ( int  nDirID,
const OString &  rFileName,
const char *  pFormat = nullptr 
) const
private
static void psp::PrintFontManager::analyzeSfntFamilyName ( void const *  pTTFont,
std::vector< OUString > &  rnames 
)
staticprivate
bool psp::PrintFontManager::analyzeSfntFile ( PrintFont pFont) const
private
static OUString psp::PrintFontManager::convertSfntName ( void pNameRecord)
staticprivate
void psp::PrintFontManager::countFontconfigFonts ( std::unordered_map< OString, int > &  o_rVisitedPaths)
private
bool psp::PrintFontManager::createFontSubset ( FontSubsetInfo ,
fontID  nFont,
const OUString &  rOutFile,
const sal_GlyphId pGlyphIDs,
const sal_uInt8 pNewEncoding,
sal_Int32 *  pWidths,
int  nGlyphs 
)
psp::PrintFontManager::DECL_LINK ( autoInstallFontLangSupport  ,
Timer ,
void   
)
private
static void psp::PrintFontManager::deinitFontconfig ( )
staticprivate
static void psp::PrintFontManager::fillPrintFontInfo ( PrintFont pFont,
FastPrintFontInfo rInfo 
)
staticprivate
void psp::PrintFontManager::fillPrintFontInfo ( PrintFont pFont,
PrintFontInfo rInfo 
) const
private
fontID psp::PrintFontManager::findFontFileID ( int  nDirID,
const OString &  rFile,
int  nFaceIndex,
int  nVariationIndex 
) const
private
std::vector<fontID> psp::PrintFontManager::findFontFileIDs ( int  nDirID,
const OString &  rFile 
) const
private
static PrintFontManager& psp::PrintFontManager::get ( )
static
OString psp::PrintFontManager::getDirectory ( int  nAtom) const
private
int psp::PrintFontManager::getDirectoryAtom ( const OString &  rDirectory)
private
PrintFont* psp::PrintFontManager::getFont ( fontID  nID) const
inlineprivate

Definition at line 161 of file fontmanager.hxx.

int psp::PrintFontManager::getFontAscend ( fontID  nFontID) const
void psp::PrintFontManager::getFontBoundingBox ( fontID  nFont,
int xMin,
int yMin,
int xMax,
int yMax 
)
int psp::PrintFontManager::getFontDescend ( fontID  nFontID) const
int psp::PrintFontManager::getFontFaceNumber ( fontID  nFontID) const
int psp::PrintFontManager::getFontFaceVariation ( fontID  nFontID) const
bool psp::PrintFontManager::getFontFastInfo ( fontID  nFontID,
FastPrintFontInfo rInfo 
) const
OString psp::PrintFontManager::getFontFile ( const PrintFont pFont) const
private
OString psp::PrintFontManager::getFontFileSysPath ( fontID  nFontID) const
inline

Definition at line 234 of file fontmanager.hxx.

bool psp::PrintFontManager::getFontInfo ( fontID  nFontID,
PrintFontInfo rInfo 
) const
FontItalic psp::PrintFontManager::getFontItalic ( fontID  nFontID) const
inline
void psp::PrintFontManager::getFontList ( std::vector< fontID > &  rFontIDs)
static std::unique_ptr<FontConfigFontOptions> psp::PrintFontManager::getFontOptions ( const FastPrintFontInfo ,
int  nSize 
)
static
FontWeight psp::PrintFontManager::getFontWeight ( fontID  nFontID) const
inline
void psp::PrintFontManager::getGlyphWidths ( fontID  nFont,
bool  bVertical,
std::vector< sal_Int32 > &  rWidths,
std::map< sal_Unicode, sal_uInt32 > &  rUnicodeEnc 
)
OUString psp::PrintFontManager::getPSName ( fontID  nFontID) const
static void psp::PrintFontManager::initFontconfig ( )
staticprivate
void psp::PrintFontManager::initialize ( )
static FontFamily psp::PrintFontManager::matchFamilyName ( const OUString &  rFamily)
staticprivate
void psp::PrintFontManager::matchFont ( FastPrintFontInfo rInfo,
const css::lang::Locale &  rLocale 
)
void psp::PrintFontManager::Substitute ( FontSelectPattern rPattern,
OUString &  rMissingCodes 
)

Friends And Related Function Documentation

friend class ::GenericUnixSalData
friend

Definition at line 198 of file fontmanager.hxx.

friend struct PrintFont
friend

Definition at line 103 of file fontmanager.hxx.

Member Data Documentation

std::unordered_map< int, OString > psp::PrintFontManager::m_aAtomToDir
private

Definition at line 143 of file fontmanager.hxx.

std::vector<OUString> psp::PrintFontManager::m_aCurrentRequests
private

Definition at line 191 of file fontmanager.hxx.

std::unordered_map< OString, int > psp::PrintFontManager::m_aDirToAtom
private

Definition at line 142 of file fontmanager.hxx.

std::unordered_map< OString, std::set< fontID > > psp::PrintFontManager::m_aFontFileToFontID
private

Definition at line 139 of file fontmanager.hxx.

Timer psp::PrintFontManager::m_aFontInstallerTimer
private

Definition at line 192 of file fontmanager.hxx.

std::unordered_map< fontID, std::unique_ptr<PrintFont> > psp::PrintFontManager::m_aFonts
private

Definition at line 136 of file fontmanager.hxx.

std::set<OString> psp::PrintFontManager::m_aPreviousLangSupportRequests
private

Definition at line 190 of file fontmanager.hxx.

int psp::PrintFontManager::m_nNextDirAtom
private

Definition at line 144 of file fontmanager.hxx.

fontID psp::PrintFontManager::m_nNextFontID
private

Definition at line 135 of file fontmanager.hxx.


The documentation for this class was generated from the following file: