00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef WPS_WIN
00032 # define WPS_WIN
00033
00034 # include <string>
00035
00036 # include "libwps_internal.h"
00037
00039 namespace libwps_tools_win
00040 {
00042 class Font
00043 {
00044 public:
00046 enum Type { CP_037, CP_424, CP_437, CP_500, CP_737, CP_775,
00047 DOS_850, CP_852, CP_855, CP_856, CP_857, CP_860,
00048 CP_861, CP_862, CP_863, CP_864, CP_865, CP_866,
00049 CP_869, CP_874, CP_875, CP_932, CP_950, CP_1006,
00050 CP_1026, WIN3_ARABIC, WIN3_BALTIC, WIN3_CEUROPE,
00051 WIN3_CYRILLIC, WIN3_GREEK, WIN3_HEBREW, WIN3_TURKISH,
00052 WIN3_VIETNAMESE, WIN3_WEUROPE,
00053
00054 MAC_ARABIC, MAC_CELTIC, MAC_CEUROPE, MAC_CROATIAN,
00055 MAC_CYRILLIC, MAC_DEVANAGA, MAC_FARSI, MAC_GAELIC,
00056 MAC_GREEK, MAC_GUJARATI, MAC_GURMUKHI, MAC_HEBREW,
00057 MAC_ICELAND, MAC_INUIT, MAC_ROMAN, MAC_ROMANIAN,
00058 MAC_THAI, MAC_TURKISH,
00059
00060 MAC_SYMBOL, WIN3_WINGDINGS,
00061 UNKNOWN
00062 };
00063
00065 static unsigned long unicode(unsigned char c, Type type);
00067 static unsigned long LICSunicode(unsigned char c, Type type);
00069 static Type getTypeForOEM(int oem);
00071 static Type getTypeForString(char const *encoding);
00077 static Type getFontType(librevenge::RVNGString &name);
00079 static librevenge::RVNGString getTypeName(Type type);
00080 static librevenge::RVNGString unicodeString(const unsigned char *p, unsigned size, Type type);
00081 protected:
00082 };
00083
00084
00086 namespace Language
00087 {
00089 std::string name(long id);
00091 std::string localeName(long id);
00093 void addLocaleName(long id, librevenge::RVNGPropertyList &propList);
00095 long getDefault();
00096 }
00097
00098 }
00099
00100
00101 #endif
00102