#ifndef SVGFontFaceElement_h
#define SVGFontFaceElement_h
#if ENABLE(SVG_FONTS)
#include "SVGNames.h"
#include "core/svg/SVGElement.h"
namespace WebCore {
class SVGFontElement;
class StyleRuleFontFace;
class SVGFontFaceElement FINAL : public SVGElement {
public:
static PassRefPtr<SVGFontFaceElement> create(Document&);
unsigned unitsPerEm() const;
int xHeight() const;
float horizontalOriginX() const;
float horizontalOriginY() const;
float horizontalAdvanceX() const;
float verticalOriginX() const;
float verticalOriginY() const;
float verticalAdvanceY() const;
int ascent() const;
int descent() const;
String fontFamily() const;
SVGFontElement* associatedFontElement() const;
void rebuildFontFace();
StyleRuleFontFace* fontFaceRule() const { return m_fontFaceRule.get(); }
private:
explicit SVGFontFaceElement(Document&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void removedFrom(ContainerNode*) OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
RefPtrWillBePersistent<StyleRuleFontFace> m_fontFaceRule;
SVGFontElement* m_fontElement;
};
}
#endif
#endif