#include <pkFontFile.h>
Inheritance diagram for PkFontFile:
Public Member Functions | |
PkFontFile () | |
virtual bool | read (const Filename &filename, bool extract_all, const string &extract_only) |
Attempts to read the font from the indicated file. | |
double | get_ds () const |
Returns the designed size of the font in points. | |
double | get_dpi () const |
Returns the resolution of the rasterized font in dots per inch. | |
double | get_vppp () const |
Returns the vertical pixels per point of the rasterized font characters. | |
double | get_hppp () const |
Returns the horizontal pixels per point of the rasterized font characters. | |
void | sort_chars_by_height () |
Sorts the array of characters in the font as returned by get_char() so that the tallest ones appear first in the list. | |
int | get_num_chars () const |
Returns the number of characters (glyphs) read from the font. | |
CharBitmap * | get_char (int n) const |
Returns the nth character (glyph) read from the font. | |
Protected Types | |
typedef pvector< CharBitmap * > | Chars |
Protected Attributes | |
double | _ds |
double | _vppp |
double | _hppp |
Chars | _chars |
Private Member Functions | |
unsigned int | fetch_nibble () |
Returns the next 4-bit nibble from the pk stream. | |
unsigned int | fetch_packed_int () |
Returns the next packed integer from the pk stream. | |
unsigned int | fetch_byte () |
Returns the next 8-bit unsigned byte from the pk stream. | |
unsigned int | fetch_int (int n=4) |
Returns the next n-byte unsigned int from the pk stream. | |
int | fetch_signed_int (int n=4) |
Returns the next n-byte signed int from the pk stream. | |
bool | do_character (int flag_byte) |
Reads a single character from the pk file and processes it. | |
void | do_xxx (int num_bytes) |
The xxx1 .. | |
void | do_yyy () |
The yyy command is an encoded number which might have meaning to a preceding xxx block, but means nothing to us. | |
void | do_post () |
The beginning of the postamble. | |
void | do_pre () |
The preamble. | |
bool | read_pk () |
Private Attributes | |
bool | _post |
bool | _post_warning |
int | _p |
bool | _high |
int | _dyn_f |
int | _repeat_count |
bool | _extract_all |
string | _extract_only |
pvector< unsigned char > | _pk |
Definition at line 38 of file pkFontFile.h.
|
Definition at line 67 of file fontFile.h. |
|
Definition at line 506 of file pkFontFile.cxx. References Filename::open_read(), and Filename::set_binary(). |
|
Reads a single character from the pk file and processes it. Returns true if successful, false if something bad happened. Definition at line 691 of file pkFontFile.cxx. |
|
The beginning of the postamble.
Definition at line 853 of file pkFontFile.cxx. |
|
The preamble.
Definition at line 866 of file pkFontFile.cxx. References _post, _post_warning, nout, and PK_NO_OP. |
|
The xxx1 .. xxx4 series of commands specify an embedded comment or some such silliness in the pk file that must be skipped. Definition at line 823 of file pkFontFile.cxx. References FontFile::_ds, FontFile::_hppp, _p, _pk, FontFile::_vppp, and nout. |
|
The yyy command is an encoded number which might have meaning to a preceding xxx block, but means nothing to us.
Definition at line 840 of file pkFontFile.cxx. |
|
Returns the next 8-bit unsigned byte from the pk stream.
Definition at line 621 of file pkFontFile.cxx. References _p. |
|
Returns the next n-byte unsigned int from the pk stream.
Definition at line 638 of file pkFontFile.cxx. Referenced by fetch_signed_int(). |
|
Returns the next 4-bit nibble from the pk stream.
Definition at line 559 of file pkFontFile.cxx. References _dyn_f. |
|
Returns the next packed integer from the pk stream.
Definition at line 580 of file pkFontFile.cxx. |
|
Returns the next n-byte signed int from the pk stream.
Definition at line 662 of file pkFontFile.cxx. References _p, and fetch_int(). |
|
Returns the nth character (glyph) read from the font.
Definition at line 121 of file fontFile.I. |
|
Returns the resolution of the rasterized font in dots per inch. This is mainly useful for user information; use get_vppp() and get_hppp() for more precises measurements. Definition at line 55 of file fontFile.I. References FontFile::_vppp. |
|
Returns the designed size of the font in points. This is the basic height of a line of text in the given font. Definition at line 36 of file fontFile.I. References FontFile::_vppp, and INLINE. |
|
Returns the horizontal pixels per point of the rasterized font characters. This is the number of pixels wide each bitmap characters is per point of font. Definition at line 93 of file fontFile.I. |
|
Returns the number of characters (glyphs) read from the font.
Definition at line 108 of file fontFile.I. |
|
Returns the vertical pixels per point of the rasterized font characters. This is the number of pixels high each bitmap characters is per point of font. Definition at line 74 of file fontFile.I. References FontFile::_chars, and INLINE. |
|
Attempts to read the font from the indicated file. Returns true if successful, false if there is an error. Implements FontFile. Definition at line 522 of file pkFontFile.cxx. References _pk. |
|
Definition at line 901 of file pkFontFile.cxx. References nout. |
|
Sorts the array of characters in the font as returned by get_char() so that the tallest ones appear first in the list.
Definition at line 77 of file fontFile.cxx. |
|
Definition at line 68 of file fontFile.h. Referenced by FontFile::get_vppp(), and FontFile::~FontFile(). |
|
Definition at line 63 of file fontFile.h. Referenced by do_xxx(). |
|
Definition at line 62 of file pkFontFile.h. Referenced by fetch_nibble(). |
|
Definition at line 65 of file pkFontFile.h. |
|
Definition at line 66 of file pkFontFile.h. |
|
Definition at line 61 of file pkFontFile.h. |
|
Definition at line 65 of file fontFile.h. Referenced by do_xxx(). |
|
Definition at line 60 of file pkFontFile.h. Referenced by do_xxx(), fetch_byte(), fetch_int(), and fetch_signed_int(). |
|
Definition at line 68 of file pkFontFile.h. Referenced by do_xxx(), fetch_int(), and read(). |
|
Definition at line 58 of file pkFontFile.h. Referenced by do_pre(). |
|
Definition at line 59 of file pkFontFile.h. Referenced by do_pre(). |
|
Definition at line 63 of file pkFontFile.h. |
|
Definition at line 64 of file fontFile.h. Referenced by do_xxx(), FontFile::get_dpi(), and FontFile::get_ds(). |