|
PoDoFo 0.9.6
|
#include <PdfFontMetrics.h>
Public Member Functions | |
| virtual void | GetWidthArray (PdfVariant &var, unsigned int nFirst, unsigned int nLast, const PdfEncoding *pEncoding=NULL) const =0 |
| virtual double | GetGlyphWidth (int nGlyphId) const =0 |
| virtual double | GetGlyphWidth (const char *pszGlyphname) const =0 |
| virtual void | GetBoundingBox (PdfArray &array) const =0 |
| double | StringWidth (const PdfString &rsString) const |
| double | StringWidth (const char *pszText, pdf_long nLength=0) const |
| double | StringWidth (const pdf_utf16be *pszText, unsigned int nLength=0) const |
| double | StringWidth (const wchar_t *pszText, unsigned int nLength=0) const |
| unsigned long | StringWidthMM (const char *pszText, unsigned int nLength=0) const |
| unsigned long | StringWidthMM (const pdf_utf16be *pszText, unsigned int nLength=0) const |
| unsigned long | StringWidthMM (const wchar_t *pszText, unsigned int nLength=0) const |
| virtual double | CharWidth (unsigned char c) const =0 |
| virtual double | UnicodeCharWidth (unsigned short c) const =0 |
| unsigned long | CharWidthMM (unsigned char c) const |
| virtual double | GetLineSpacing () const =0 |
| unsigned long | GetLineSpacingMM () const |
| virtual double | GetUnderlineThickness () const =0 |
| unsigned long | GetUnderlineThicknessMM () const |
| virtual double | GetUnderlinePosition () const =0 |
| long | GetUnderlinePositionMM () const |
| virtual double | GetStrikeOutPosition () const =0 |
| unsigned long | GetStrikeOutPositionMM () const |
| virtual double | GetStrikeoutThickness () const =0 |
| unsigned long | GetStrikeoutThicknessMM () const |
| const char * | GetFilename () const |
| virtual const char * | GetFontData () const =0 |
| virtual pdf_long | GetFontDataLen () const =0 |
| virtual const char * | GetFontname () const =0 |
| const char * | GetSubsetFontnamePrefix () const |
| virtual unsigned int | GetWeight () const =0 |
| virtual double | GetAscent () const =0 |
| virtual double | GetPdfAscent () const =0 |
| virtual double | GetDescent () const =0 |
| virtual double | GetPdfDescent () const =0 |
| virtual int | GetItalicAngle () const =0 |
| void | SetFontSize (float fSize) |
| float | GetFontSize () const |
| void | SetFontScale (float fScale) |
| float | GetFontScale () const |
| void | SetFontCharSpace (float fCharSpace) |
| float | GetFontCharSpace () const |
| void | SetWordSpace (float fWordSpace) |
| float | GetWordSpace () const |
| EPdfFontType | GetFontType () const |
| virtual long | GetGlyphId (long lUnicode) const =0 |
| virtual bool | IsSymbol () const =0 |
Static Public Member Functions | |
| static EPdfFontType | FontTypeFromFilename (const char *pszFilename) |
Protected Member Functions | |
| void | SetFontType (EPdfFontType eFontType) |
This abstract class provides access to fontmetrics informations.
|
pure virtual |
Retrieve the width of the given character in PDF units in the current font
| c | character |
|
inline |
Retrieve the width of the given character in 1/1000th mm in the current font
| c | character |
|
static |
Try to detect the internal fonttype from the file extension of a fontfile.
| pszFilename | must be the filename of a font file |
|
pure virtual |
Get the ascent of this font in PDF units for the current font size.
|
pure virtual |
Create the bounding box array as required by the PDF reference so that it can be written directly to a PDF file.
| array | write the bounding box to this array. |
|
pure virtual |
Get the descent of this font in PDF units for the current font size. This value is usually negative!
|
inline |
Get a pointer to the path of the font file.
|
inline |
Retrieve the current character spacing of this metrics object
|
pure virtual |
Get a pointer to the actual font data - if it was loaded from memory.
|
pure virtual |
Get the length of the actual font data - if it was loaded from memory.
|
pure virtual |
Get a string with the postscript name of the font.
|
inline |
Retrieve the current horizontal scaling of this metrics object
|
inline |
Retrieve the current font size of this metrics object
|
inline |
|
pure virtual |
Get the glyph id for a unicode character in the current font.
| lUnicode | the unicode character value |
|
pure virtual |
Get the width of a single named glyph
| pszGlyphname | name of the glyph |
|
pure virtual |
Get the width of a single glyph id
| nGlyphId | id of the glyph |
|
pure virtual |
Get the italic angle of this font. Used to build the font dictionay
|
pure virtual |
Retrieve the line spacing for this font
|
inline |
Retrieve the line spacing for this font
|
pure virtual |
Get the ascent of this font Used to build the font dictionay
|
pure virtual |
Get the descent of this font Used to build the font dictionay
|
pure virtual |
Return the position of the strikeout for the current font size in PDF units
|
inline |
Return the position of the strikeout for the current font size in 1/1000th mm
|
pure virtual |
Get the width of the strikeout for the current font size in PDF units
|
inline |
Get the width of the strikeout for the current font size in 1/1000th mm
|
inline |
|
pure virtual |
Return the position of the underline for the current font size in PDF units
|
inline |
Return the position of the underline for the current font size in 1/1000th mm
|
pure virtual |
Get the width of the underline for the current font size in PDF units
|
inline |
Get the width of the underline for the current font size in 1/1000th mm
|
pure virtual |
Get the weight of this font. Used to build the font dictionay
|
pure virtual |
Create a width array for this font which is a required part of every font dictionary.
| var | the final width array is written to this PdfVariant |
| nFirst | first character to be in the array |
| nLast | last character code to be in the array |
| pEncoding | encoding for correct character widths. If not passed default (latin1) encoding is used |
|
inline |
Retrieve the current word spacing of this metrics object
|
pure virtual |
Symbol fonts do need special treatment in a few cases. Use this method to check if the current font is a symbol font. Symbold fonts are detected by checking if they use FT_ENCODING_MS_SYMBOL as internal encoding.
|
inline |
Set the character spacing of this metrics object
| fCharSpace | character spacing in percent |
|
inline |
Set the horizontal scaling of the font for compressing (< 100) and expanding (>100) This is typically called from PdfFont for you.
| fScale | scaling in percent |
|
inline |
Set the font size of this metrics object for width and height calculations. This is typically called from PdfFont for you.
| fSize | font size in points |
|
inlineprotected |
Set the fonttype.
| eFontType | fonttype |
|
inline |
Set the word spacing of this metrics object
| fWordSpace | word spacing in PDF units |
| double PoDoFo::PdfFontMetrics::StringWidth | ( | const char * | pszText, |
| pdf_long | nLength = 0 ) const |
Retrieve the width of a given text string in PDF units when drawn with the current font
| pszText | a text string of which the width should be calculated |
| nLength | if != 0 only the width of the nLength first characters is calculated |
| double PoDoFo::PdfFontMetrics::StringWidth | ( | const pdf_utf16be * | pszText, |
| unsigned int | nLength = 0 ) const |
Retrieve the width of a given text string in PDF units when drawn with the current font
| pszText | a text string of which the width should be calculated |
| nLength | if != 0 only the width of the nLength first characters is calculated |
|
inline |
Retrieve the width of a given text string in PDF units when drawn with the current font
| rsString | a PdfString from which the width shall be calculated |
This is an overloaded method for your convinience!
| double PoDoFo::PdfFontMetrics::StringWidth | ( | const wchar_t * | pszText, |
| unsigned int | nLength = 0 ) const |
Retrieve the width of a given text string in PDF units when drawn with the current font
| pszText | a text string of which the width should be calculated |
| nLength | if != 0 only the width of the nLength first characters is calculated |
|
inline |
Retrieve the width of a given text string in 1/1000th mm when drawn with the current font
| pszText | a text string of which the width should be calculated |
| nLength | if != 0 only the width of the nLength first characters is calculated |
|
inline |
Retrieve the width of a given text string in 1/1000th mm when drawn with the current font
| pszText | a text string of which the width should be calculated |
| nLength | if != 0 only the width of the nLength first characters is calculated |
|
inline |
Retrieve the width of a given text string in 1/1000th mm when drawn with the current font
| pszText | a text string of which the width should be calculated |
| nLength | if != 0 only the width of the nLength first characters is calculated |
|
pure virtual |
Retrieve the width of the given character in PDF units in the current font
| c | character |