2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
4 * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
5 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
6 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com>
7 * Copyright (C) 2009 Maxime Simon <simon.maxime@gmail.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public License
22 * along with this library; see the file COPYING.LIB. If not, write to
23 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 * Boston, MA 02111-1307, USA.
28 #ifndef FontPlatformData_h
29 #define FontPlatformData_h
31 #include "FontDescription.h"
32 #include "GlyphBuffer.h"
33 #include <interface/Font.h>
37 class FontPlatformData {
39 FontPlatformData(WTF::HashTableDeletedValueType)
40 : m_font(hashTableDeletedFontValue())
47 FontPlatformData(const FontDescription&, const AtomicString& family);
48 FontPlatformData(float size, bool bold, bool oblique);
49 FontPlatformData(const FontPlatformData&);
53 BFont* font() const { return m_font; }
56 float size() const { return m_size; }
57 bool bold() const { return m_bold; }
58 bool oblique() const { return m_oblique; }
60 unsigned hash() const;
61 bool isHashTableDeletedValue() const;
63 bool operator==(const FontPlatformData&) const;
66 String description() const;
75 static BFont* hashTableDeletedFontValue() { return reinterpret_cast<BFont*>(-1); }
78 } // namespace WebCore