38 #ifndef MWAW_FONT_CONVERTER
39 # define MWAW_FONT_CONVERTER
47 namespace MWAWFontConverterInternal
75 int getId(std::string
const &name, std::string family=
"")
const;
77 std::string
getName(
int macId)
const;
79 void setCorrespondance(
int macId, std::string
const &name, std::string family=
"");
87 void getOdtInfo(
int macId, std::string &name,
int &deltaSize)
const;
91 int unicode(
int macId,
unsigned char c)
const;
99 int unicode(
int macId,
unsigned char c,
unsigned char const *(&str),
int len)
const;
102 static std::string
getValidName(std::string
const &name);
105 mutable shared_ptr<MWAWFontConverterInternal::State>
m_manager;
Definition: MWAWFontConverter.hxx:67
Definition: MWAWFontConverter.hxx:67
MWAWFontConverter()
the constructor
Definition: MWAWFontConverter.cxx:904
Encoding
the character encoding type
Definition: MWAWFontConverter.hxx:67
int getId(std::string const &name, std::string family="") const
returns an unique id > 255, if unknown
Definition: MWAWFontConverter.cxx:932
~MWAWFontConverter()
the destructor
Definition: MWAWFontConverter.cxx:905
static std::string getValidName(std::string const &name)
check if a string is valid, if not, convert it to a valid string
Definition: MWAWFontConverter.cxx:908
void getOdtInfo(int macId, std::string &name, int &deltaSize) const
final font name and a delta which can be used to change the size if no name is found, return "Times New Roman"
Definition: MWAWFontConverter.cxx:942
void setCorrespondance(int macId, std::string const &name, std::string family="")
fixes the name corresponding to an id
Definition: MWAWFontConverter.cxx:927
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:348
a namespace used to convert Mac font characters in unicode
Definition: MWAWFontConverter.hxx:63
std::string getName(int macId) const
returns empty string if unknown
Definition: MWAWFontConverter.cxx:937
shared_ptr< MWAWFontConverterInternal::State > m_manager
the main manager
Definition: MWAWFontConverter.hxx:105
int unicode(int macId, unsigned char c) const
converts a character in unicode
Definition: MWAWFontConverter.cxx:947