FontCustomPlatformData.h [plain text]
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include "FontWidthVariant.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
typedef struct FT_FaceRec_* FT_Face;
typedef struct _cairo_font_face cairo_font_face_t;
namespace WebCore {
class FontPlatformData;
class SharedBuffer;
struct FontCustomPlatformData {
WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
public:
FontCustomPlatformData(FT_Face, SharedBuffer&);
~FontCustomPlatformData();
FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
private:
FT_Face m_freeTypeFace;
cairo_font_face_t* m_fontFace;
};
std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer&);
}
#endif