KHtml

SVGFontFaceElement.h
1 /*
2  Copyright (C) 2007 Eric Seidel <[email protected]>
3  Copyright (C) 2007 Nikolas Zimmermann <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef SVGFontFaceElement_h
22 #define SVGFontFaceElement_h
23 
24 #if ENABLE(SVG_FONTS)
25 #include "SVGElement.h"
26 
27 namespace WebCore
28 {
29 
30 class CSSFontFaceRule;
31 class CSSMutableStyleDeclaration;
32 class SVGFontElement;
33 
34 class SVGFontFaceElement : public SVGElement
35 {
36 public:
37  SVGFontFaceElement(const QualifiedName &, Document *);
38  virtual ~SVGFontFaceElement();
39 
40  virtual void parseMappedAttribute(MappedAttribute *);
41 
42  virtual void childrenChanged(bool changedByParser = false, Node *beforeChange = 0, Node *afterChange = 0, int childCountDelta = 0);
43  virtual void insertedIntoDocument();
44 
45  unsigned unitsPerEm() const;
46  int xHeight() const;
47  float horizontalOriginX() const;
48  float horizontalOriginY() const;
49  float horizontalAdvanceX() const;
50  float verticalOriginX() const;
51  float verticalOriginY() const;
52  float verticalAdvanceY() const;
53  int ascent() const;
54  int descent() const;
55  String fontFamily() const;
56 
57  SVGFontElement *associatedFontElement() const;
58  void rebuildFontFace();
59 
60 private:
61  RefPtr<CSSFontFaceRule> m_fontFaceRule;
62  RefPtr<CSSMutableStyleDeclaration> m_styleDeclaration;
63 
64  RefPtr<SVGFontElement> m_fontElement;
65 };
66 
67 } // namespace WebCore
68 
69 #endif // ENABLE(SVG_FONTS)
70 #endif
71 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 26 2021 22:48:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.