#include <Simple.hh>
Inheritance diagram for pdf::font::CSimple:
this class represents a simple font. a simple font in PDF includes type 1 fonts, truetype fonts and type 3 fonts, i.e. all except composite fonts. this class is the base class of these simple fonts.
this class is abstract. it does not define some pure virtual functions.
|
protected constructor. it initalizes everything it can: font sub type, and base name. sometimes the base name is not known yet. it can be specified later, by calling the BaseName() function.
00040 : CFont( sub_type ), m_base_name( base_name ) 00041 { 00042 } |
|
destructor do nothing
00046 { 00047 } |
|
sets the font base name.
00080 { 00081 assert( !base_name.empty( ) ) ; 00082 m_base_name = base_name ; 00083 } |
|
gets the font base name
00068 { return m_base_name ; } |
|
this function will create a basic font dictionary. probably the derived classes have to add extra fields to the dictionary before writing it out. they will use the returned pointer to the dictionary to do so.
00058 { 00059 using namespace core ; 00060 00061 if ( m_base_name.empty( ) ) 00062 throw CBadBaseFontName( ) ; 00063 00064 if ( SubType( ).empty( ) ) 00065 throw CBadSubType( ) ; 00066 00067 CDictionary *font = new CDictionary ; 00068 PrintType( *font ) ; 00069 00070 font->AddPair( "BaseFont", m_base_name ) ; 00071 font->AddPair( "Encoding", "WinAnsiEncoding" ) ; 00072 00073 return font ; 00074 } |
|
font base name. e.g. for times new roman the base name is "Times New Roman" |