23 #include "wtf/Platform.h"
38 using namespace SVGNames;
40 SVGHKernElement::SVGHKernElement(
const QualifiedName& tagName, Document* doc)
41 : SVGElement(tagName, doc)
45 SVGHKernElement::~SVGHKernElement()
49 void SVGHKernElement::insertedIntoDocument()
51 Node* fontNode = parentNode();
52 if (fontNode && fontNode->hasTagName(
fontTag)) {
53 if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
54 element->invalidateGlyphCache();
58 void SVGHKernElement::removedFromDocument()
60 Node* fontNode = parentNode();
61 if (fontNode && fontNode->hasTagName(
fontTag)) {
62 if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode))
63 element->invalidateGlyphCache();
67 SVGHorizontalKerningPair SVGHKernElement::buildHorizontalKerningPair()
const
69 SVGHorizontalKerningPair kerningPair;
71 kerningPair.unicode1 = getAttribute(
u1Attr);
72 kerningPair.glyphName1 = getAttribute(
g1Attr);
73 kerningPair.unicode2 = getAttribute(
u2Attr);
74 kerningPair.glyphName2 = getAttribute(
g2Attr);
75 kerningPair.kerning = getAttribute(
kAttr).string().toDouble();
82 #endif // ENABLE(SVG_FONTS)
DOM::QualifiedName fontTag
DOM::QualifiedName u1Attr
DOM::QualifiedName g2Attr
DOM::QualifiedName u2Attr
DOM::QualifiedName g1Attr