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 (std::u16string_view rFileUrl)
 
void initialize ()
 
void getFontList (std::vector< fontID > &rFontIDs)
 
bool getFontFastInfo (fontID nFontID, FastPrintFontInfo &rInfo) const
 
OUString getPSName (fontID nFontID)
 
OString getFontFileSysPath (fontID nFontID) const
 
int getFontFaceNumber (fontID nFontID) const
 
int getFontFaceVariation (fontID nFontID) const
 
int getFontAscend (fontID nFontID)
 
int getFontDescend (fontID nFontID)
 
void matchFont (FastPrintFontInfo &rInfo, const css::lang::Locale &rLocale)
 
void Substitute (vcl::font::FontSelectPattern &rPattern, OUString &rMissingCodes)
 

Static Public Member Functions

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

Private Member Functions

OString getFontFile (const PrintFont &rFont) const
 
std::vector< PrintFontanalyzeFontFile (int nDirID, const OString &rFileName, const char *pFormat=nullptr) const
 
bool analyzeSfntFile (PrintFont &rFont) const
 
fontID findFontFileID (int nDirID, const OString &rFile, int nFaceIndex, int nVariationIndex) const
 
std::vector< fontIDfindFontFileIDs (int nDirID, const OString &rFile) const
 
const PrintFontgetFont (fontID nID) const
 
PrintFontgetFont (fontID nID)
 
OString getDirectory (int nAtom) const
 
int getDirectoryAtom (const OString &rDirectory)
 
void countFontconfigFonts ()
 
 DECL_DLLPRIVATE_LINK (autoInstallFontLangSupport, Timer *, void)
 
 PrintFontManager ()
 

Static Private Member Functions

static OUString convertSfntName (const vcl::NameRecord &rNameRecord)
 
static void analyzeSfntFamilyName (void const *pTTFont, std::vector< OUString > &rnames)
 
static FontFamily matchFamilyName (std::u16string_view rFamily)
 
static void fillPrintFontInfo (const PrintFont &rFont, FastPrintFontInfo &rInfo)
 
static void initFontconfig ()
 
static void deinitFontconfig ()
 
static void addFontconfigDir (const OString &rDirectory)
 
static void addFontconfigFile (const OString &rFile)
 

Private Attributes

fontID m_nNextFontID
 
std::unordered_map< fontID, PrintFontm_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 89 of file fontmanager.hxx.

Constructor & Destructor Documentation

◆ PrintFontManager()

psp::PrintFontManager::PrintFontManager ( )
private

◆ ~PrintFontManager()

psp::PrintFontManager::~PrintFontManager ( )

Member Function Documentation

◆ addFontconfigDir()

static void psp::PrintFontManager::addFontconfigDir ( const OString &  rDirectory)
staticprivate

◆ addFontconfigFile()

static void psp::PrintFontManager::addFontconfigFile ( const OString &  rFile)
staticprivate

◆ addFontFile()

std::vector< fontID > psp::PrintFontManager::addFontFile ( std::u16string_view  rFileUrl)

◆ analyzeFontFile()

std::vector< PrintFont > psp::PrintFontManager::analyzeFontFile ( int  nDirID,
const OString &  rFileName,
const char *  pFormat = nullptr 
) const
private

◆ analyzeSfntFamilyName()

static void psp::PrintFontManager::analyzeSfntFamilyName ( void const *  pTTFont,
std::vector< OUString > &  rnames 
)
staticprivate

◆ analyzeSfntFile()

bool psp::PrintFontManager::analyzeSfntFile ( PrintFont rFont) const
private

◆ convertSfntName()

static OUString psp::PrintFontManager::convertSfntName ( const vcl::NameRecord rNameRecord)
staticprivate

◆ countFontconfigFonts()

void psp::PrintFontManager::countFontconfigFonts ( )
private

◆ DECL_DLLPRIVATE_LINK()

psp::PrintFontManager::DECL_DLLPRIVATE_LINK ( autoInstallFontLangSupport  ,
Timer ,
void   
)
private

◆ deinitFontconfig()

static void psp::PrintFontManager::deinitFontconfig ( )
staticprivate

◆ fillPrintFontInfo()

static void psp::PrintFontManager::fillPrintFontInfo ( const PrintFont rFont,
FastPrintFontInfo rInfo 
)
staticprivate

◆ findFontFileID()

fontID psp::PrintFontManager::findFontFileID ( int  nDirID,
const OString &  rFile,
int  nFaceIndex,
int  nVariationIndex 
) const
private

◆ findFontFileIDs()

std::vector< fontID > psp::PrintFontManager::findFontFileIDs ( int  nDirID,
const OString &  rFile 
) const
private

◆ get()

static PrintFontManager & psp::PrintFontManager::get ( )
static

◆ getDirectory()

OString psp::PrintFontManager::getDirectory ( int  nAtom) const
private

◆ getDirectoryAtom()

int psp::PrintFontManager::getDirectoryAtom ( const OString &  rDirectory)
private

◆ getFont() [1/2]

PrintFont * psp::PrintFontManager::getFont ( fontID  nID)
inlineprivate

Definition at line 150 of file fontmanager.hxx.

◆ getFont() [2/2]

const PrintFont * psp::PrintFontManager::getFont ( fontID  nID) const
inlineprivate

Definition at line 145 of file fontmanager.hxx.

◆ getFontAscend()

int psp::PrintFontManager::getFontAscend ( fontID  nFontID)

◆ getFontDescend()

int psp::PrintFontManager::getFontDescend ( fontID  nFontID)

◆ getFontFaceNumber()

int psp::PrintFontManager::getFontFaceNumber ( fontID  nFontID) const

◆ getFontFaceVariation()

int psp::PrintFontManager::getFontFaceVariation ( fontID  nFontID) const

◆ getFontFastInfo()

bool psp::PrintFontManager::getFontFastInfo ( fontID  nFontID,
FastPrintFontInfo rInfo 
) const

◆ getFontFile()

OString psp::PrintFontManager::getFontFile ( const PrintFont rFont) const
private

◆ getFontFileSysPath()

OString psp::PrintFontManager::getFontFileSysPath ( fontID  nFontID) const
inline

Definition at line 209 of file fontmanager.hxx.

◆ getFontList()

void psp::PrintFontManager::getFontList ( std::vector< fontID > &  rFontIDs)

◆ getFontOptions()

static std::unique_ptr< FontConfigFontOptions > psp::PrintFontManager::getFontOptions ( const FontAttributes rFontAttributes,
int  nSize 
)
static

◆ getPSName()

OUString psp::PrintFontManager::getPSName ( fontID  nFontID)

◆ initFontconfig()

static void psp::PrintFontManager::initFontconfig ( )
staticprivate

◆ initialize()

void psp::PrintFontManager::initialize ( )

◆ matchFamilyName()

static FontFamily psp::PrintFontManager::matchFamilyName ( std::u16string_view  rFamily)
staticprivate

◆ matchFont()

void psp::PrintFontManager::matchFont ( FastPrintFontInfo rInfo,
const css::lang::Locale &  rLocale 
)

◆ Substitute()

void psp::PrintFontManager::Substitute ( vcl::font::FontSelectPattern rPattern,
OUString &  rMissingCodes 
)

Friends And Related Function Documentation

◆ ::GenericUnixSalData

friend class ::GenericUnixSalData
friend

Definition at line 189 of file fontmanager.hxx.

◆ PrintFont

friend struct PrintFont
friend

Definition at line 92 of file fontmanager.hxx.

Member Data Documentation

◆ m_aAtomToDir

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

Definition at line 127 of file fontmanager.hxx.

◆ m_aCurrentRequests

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

Definition at line 182 of file fontmanager.hxx.

◆ m_aDirToAtom

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

Definition at line 126 of file fontmanager.hxx.

◆ m_aFontFileToFontID

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

Definition at line 123 of file fontmanager.hxx.

◆ m_aFontInstallerTimer

Timer psp::PrintFontManager::m_aFontInstallerTimer
private

Definition at line 183 of file fontmanager.hxx.

◆ m_aFonts

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

Definition at line 120 of file fontmanager.hxx.

◆ m_aPreviousLangSupportRequests

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

Definition at line 181 of file fontmanager.hxx.

◆ m_nNextDirAtom

int psp::PrintFontManager::m_nNextDirAtom
private

Definition at line 128 of file fontmanager.hxx.

◆ m_nNextFontID

fontID psp::PrintFontManager::m_nNextFontID
private

Definition at line 119 of file fontmanager.hxx.


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