File indexing completed on 2024-04-28 15:24:34
0001 /* 0002 Copyright (C) 2007 Eric Seidel <eric@webkit.org> 0003 Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 0004 Copyright (C) 2008 Apple, Inc 0005 0006 This library is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU Library General Public 0008 License as published by the Free Software Foundation; either 0009 version 2 of the License, or (at your option) any later version. 0010 0011 This library is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 Library General Public License for more details. 0015 0016 You should have received a copy of the GNU Library General Public License 0017 along with this library; see the file COPYING.LIB. If not, write to 0018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 Boston, MA 02110-1301, USA. 0020 */ 0021 0022 #ifndef SVGHKernElement_h 0023 #define SVGHKernElement_h 0024 0025 #if ENABLE(SVG_FONTS) 0026 #include "SVGStyledElement.h" 0027 0028 #include <limits> 0029 #include "Path.h" 0030 0031 namespace khtml 0032 { 0033 class AtomicString; 0034 } 0035 0036 namespace WebCore 0037 { 0038 0039 //class AtomicString; 0040 using khtml::AtomicString; 0041 class SVGFontData; 0042 0043 // Describe an SVG <hkern> element 0044 struct SVGHorizontalKerningPair { 0045 String unicode1; 0046 String glyphName1; 0047 String unicode2; 0048 String glyphName2; 0049 double kerning; 0050 0051 SVGHorizontalKerningPair() 0052 : kerning(0) 0053 { 0054 } 0055 }; 0056 0057 class SVGHKernElement : public SVGElement 0058 { 0059 public: 0060 SVGHKernElement(const QualifiedName &, Document *); 0061 virtual ~SVGHKernElement(); 0062 0063 void insertedIntoDocument() override; 0064 void removedFromDocument() override; 0065 0066 bool rendererIsNeeded(RenderStyle *) override 0067 { 0068 return false; 0069 } 0070 0071 SVGHorizontalKerningPair buildHorizontalKerningPair() const; 0072 0073 // KHTML ElementImpl pure virtual method 0074 quint32 id() const override 0075 { 0076 return SVGNames::textTag.id(); 0077 } 0078 }; 0079 0080 } // namespace WebCore 0081 0082 #endif // ENABLE(SVG_FONTS) 0083 #endif