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 #ifndef BTFontCache_h
00030 #define BTFontCache_h
00031
00032 #ifdef __OWB__
00033 #include "Font.h"
00034 #include "FontData.h"
00035 #include "FontPlatformData.h"
00036 #endif //__OWB__
00037 #include <wtf/unicode/Unicode.h>
00038
00039 #if PLATFORM(WIN)
00040 #include <mlang.h>
00041 #endif
00042
00043 namespace WebCore
00044 {
00045
00046 class AtomicString;
00047 #ifndef __OWB__
00048 class FontData;
00049 class FontPlatformData;
00050 class Font;
00051 #endif //__OWB__
00052 class FontDescription;
00053 class FontSelector;
00054
00055 #ifdef __OWB__
00056 }
00057
00058 using BAL::BTFont;
00059 using BAL::BTFontData;
00060 using BAL::BTFontPlatformData;
00061 using WebCore::AtomicString;
00062
00063 namespace BAL {
00064 #endif //__OWB__
00065
00066 class BTFontCache {
00067 public:
00068 static const FontData* getFontData(const Font&, int& familyIndex, FontSelector*);
00069
00070
00071 static const FontData* getFontDataForCharacters(const Font&, const UChar* characters, int length);
00072
00073
00074 static void platformInit();
00075
00076 #if PLATFORM(WIN)
00077 static IMLangFontLink2* getFontLinkInterface();
00078 #endif
00079
00080 static bool fontExists(const FontDescription&, const AtomicString& family);
00081
00082 static FontPlatformData* getCachedFontPlatformData(const FontDescription&, const AtomicString& family, bool checkingAlternateName = false);
00083 static FontData* getCachedFontData(const FontPlatformData*);
00084 static FontPlatformData* getLastResortFallbackFont(const FontDescription&);
00085
00086 private:
00087
00088 static FontPlatformData* getSimilarFontPlatformData(const Font&);
00089 static FontPlatformData* createFontPlatformData(const FontDescription&, const AtomicString& family);
00090
00091 friend class FontData;
00092 #ifdef __OWB__
00093 friend class WebCore::FontFallbackList;
00094 #else
00095 friend class FontFallbackList;
00096 #endif //__OWB__
00097 };
00098
00099 }
00100
00101 #endif //BTFontCache_h