Class representing the font manager.
More...
#include <pdffontmanager.h>
Class representing the font manager.
◆ AddSearchPath() [1/2]
void wxPdfFontManager::AddSearchPath |
( |
const wxArrayString & | pathArray | ) |
|
Add a list of path entries to the font search path list.
- Parameters
-
pathArray | a list of path entries to add to the search list |
◆ AddSearchPath() [2/2]
void wxPdfFontManager::AddSearchPath |
( |
const wxString & | path | ) |
|
Add a path entry to the font search path list.
- Parameters
-
path | path to add to the search list |
◆ GetDefaultEmbed()
bool wxPdfFontManager::GetDefaultEmbed |
( |
| ) |
|
Get the default embedding mode.
- Returns
- the current state of the default embedding mode
◆ GetDefaultSubset()
bool wxPdfFontManager::GetDefaultSubset |
( |
| ) |
|
Get the default subsetting mode.
- Returns
- the state of the default subsetting mode
◆ GetEncoding()
const wxPdfEncoding * wxPdfFontManager::GetEncoding |
( |
const wxString & | encodingName | ) |
|
Get the encoding having the given name.
- Parameters
-
encodingName | name of the encoding |
- Returns
- the encoding
◆ GetFont() [1/3]
wxPdfFont wxPdfFontManager::GetFont |
( |
const wxString & | fontName, |
|
|
const wxString & | fontStyle ) const |
Get a font by name and style.
Based on the given name and style the list of registered fonts is searched for a matching font. The name is checked whether it represents a font family. If the name is not a family name then the name is checked whether it represents an alias for a font family. If the name is not an alias either the name is checked whether it is a full font name.
- Parameters
-
fontName | the name of the requested font |
fontStyle | the style of the requested font (string representation) |
- Returns
- the requested font
- Note
- If no appropriate font is registered an invalid font object is returned. It's the user's responsibility to check the font object before further using it.
◆ GetFont() [2/3]
Get a font by name and style.
Based on the given name and style the list of registered fonts is searched for a matching font. The name is checked whether it represents a font family. If the name is not a family name then the name is checked whether it represents an alias for a font family. If the name is not an alias either the name is checked whether it is a full font name.
- Parameters
-
fontName | the name of the requested font |
fontStyle | the style of the requested font |
- Returns
- the requested font
- Note
- If no appropriate font is registered an invalid font object is returned. It's the user's responsibility to check the font object before further using it.
◆ GetFont() [3/3]
wxPdfFont wxPdfFontManager::GetFont |
( |
size_t | fontIndex | ) |
const |
Get a font by index.
- Parameters
-
fontIndex | the index of the requested font in the list of registered fonts |
- Returns
- the requested font
- Note
- If the index is out of range an invalid font object is returned. It's the user's responsibility to check the font object before further using it.
◆ GetFontCount()
size_t wxPdfFontManager::GetFontCount |
( |
| ) |
const |
Get the number of registered fonts.
- Returns
- the number of registered fonts
◆ GetFontManager()
Get the font manager.
- Returns
- a reference to the font manager
◆ InitializeFontData()
bool wxPdfFontManager::InitializeFontData |
( |
const wxPdfFont & | font | ) |
|
Initialize the font data of a font.
On registering a font the associated font data are not completely loaded into memory to save time and memory resources, but as soon as the font is actually used it must be fully initialized. Usually this method is called automatically.
- Parameters
-
font | the font to be initialized |
- Returns
- TRUE if the font could be initialized successfully, FALSE otherwise
◆ RegisterEncoding()
bool wxPdfFontManager::RegisterEncoding |
( |
const wxPdfEncoding & | encoding | ) |
|
Register a font encoding.
- Parameters
-
encoding | the encoding to be registered |
- Returns
- TRUE if the encoding could be registered successfully
◆ RegisterFont() [1/2]
wxPdfFont wxPdfFontManager::RegisterFont |
( |
const wxFont & | font, |
|
|
const wxString & | aliasName = wxEmptyString ) |
Register a font basedon a wxFont object.
Register a font based on a wxFont object for later use in creating a PDF document.
- Parameters
-
font | the wxFont object to be registered |
aliasName | an alias name for the font family (default: no alias) |
- Returns
- the registered font
◆ RegisterFont() [2/2]
wxPdfFont wxPdfFontManager::RegisterFont |
( |
const wxString & | fontFileName, |
|
|
const wxString & | aliasName = wxEmptyString, |
|
|
int | fontIndex = 0 ) |
Register a font.
Register a font for later use in creating a PDF document.
- Parameters
-
fontFileName | the name of the font file (if the name is not fully qualified, it will be searched in font search path) |
aliasName | an alias name for the font family (default: no alias) |
fontIndex | the index of the font in a font collection (default: 0) |
- Returns
- the registered font
◆ RegisterFontCJK()
bool wxPdfFontManager::RegisterFontCJK |
( |
const wxString & | family | ) |
|
Register a CJK font family.
Register all fonts from a font collection for later use in creating a PDF document. The following CJK font families are currently known to wxPdfDocument:
- GB, GB-HW - Simplified Chinese (Adobe-Font STSongStd-Light-Acro)
- BIG5, BIG5-HW - Traditional Chinese (Adobe-Font MSungStd-Light-Acro)
- SJIS - Japanese (Adobe-Font KozMinPro-Regular-Acro)
- UHC, UHC-HW - Korean (Adobe-Font HYSMyeongJoStd-Medium-Acro)
- GOTHIC, PGOTHIC, UIGOTHIC - Japanese (Microsoft-Font MS-Gothic/MS-PGothic/MS-UIGothic)
- MINCHO, PMINCHO - Japanese (Microsoft-Font MS-Mincho/MS-PMincho)
- Parameters
-
family | the name of the CJK font family |
- Returns
- TRUE if the CJK family could be registered successfully, FALSE otherwise
◆ RegisterFontCollection()
int wxPdfFontManager::RegisterFontCollection |
( |
const wxString & | fontCollectionFileName | ) |
|
Register a font collection.
Register all fonts from a font collection for later use in creating a PDF document.
- Parameters
-
fontCollectionFileName | the name of the font collection file (if the name is not fully qualified, it will be searched in font search path) |
- Returns
- the number of registered fonts
◆ RegisterFontDirectory()
int wxPdfFontManager::RegisterFontDirectory |
( |
const wxString & | directory, |
|
|
bool | recursive = false ) |
Register all fonts located in a directory.
- Parameters
-
directory | the directory path to be searched for font files |
recursive | flag whether the search should include subdirectories or not (Default: false) |
- Returns
- the number of registered fonts
◆ RegisterSystemFonts()
int wxPdfFontManager::RegisterSystemFonts |
( |
| ) |
|
Register the fonts known to the operating system.
◆ SetDefaultEmbed()
bool wxPdfFontManager::SetDefaultEmbed |
( |
bool | embed | ) |
|
Set the default embedding mode.
Usually it is recommended to enable embedding, since this guarantees that no font substitution takes place on a target system not providing a required font.
The default embedding mode is enabled by default, but the embedding mode can be set for each font individually.
- Note
- For most fonts the embedding mode is predefined. For example the Adobe Standard fonts and the Adobe CJK fonts are never embedded independently of the setting of the default embedding mode, and TrueType/OpenType Unicode fonts need to be always embedded.
- Parameters
-
embed | flag whether to enable or disable embedding |
- Returns
- the state of the default embedding mode prior to this call
◆ SetDefaultSubset()
bool wxPdfFontManager::SetDefaultSubset |
( |
bool | subset | ) |
|
Set the default subsetting mode.
Usually it is recommended to enable subsetting, since embedding only a font subset reduces the size of the resulting PDF file significantly.
The default subsetting mode is enabled by default, but the subsetting mode can be set for each font individually.
- Parameters
-
subset | flag whether to enable or disable font subsetting |
- Returns
- the state of the default subsetting mode prior to this call
◆ wxPdfDocumentModule
friend class wxPdfDocumentModule |
|
friend |
The documentation for this class was generated from the following file: