#ifndef CustomFontData_h
#define CustomFontData_h
#include "platform/PlatformExport.h"
#include "platform/fonts/Glyph.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include <unicode/uchar.h>
namespace WebCore {
struct GlyphData;
class GlyphPage;
class SimpleFontData;
struct WidthIterator;
class PLATFORM_EXPORT CustomFontData : public RefCounted<CustomFontData> {
public:
static PassRefPtr<CustomFontData> create() { return adoptRef(new CustomFontData()); }
virtual ~CustomFontData() { }
virtual void beginLoadIfNeeded() const { };
virtual bool isLoading() const { return false; }
virtual bool isLoadingFallback() const { return false; }
virtual bool shouldSkipDrawing() const { return false; }
virtual void clearFontFaceSource() { }
virtual bool isSVGFont() const { return false; }
virtual void initializeFontData(SimpleFontData*, float) { }
virtual float widthForSVGGlyph(Glyph, float) const { return 0.0f; }
virtual bool fillSVGGlyphPage(GlyphPage*, unsigned, unsigned, UChar*, unsigned, const SimpleFontData*) const { return false; }
virtual bool applySVGGlyphSelection(WidthIterator&, GlyphData&, bool, int, unsigned&) const { return false; }
protected:
CustomFontData() { }
};
}
#endif