| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Computer, Inc. | 2 * Copyright (C) 2007 Apple Computer, Inc. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #if PLATFORM(DARWIN) | 24 #if PLATFORM(DARWIN) |
| 25 // TODO(port): This #include isn't strictly kosher, but we're currently using | 25 // TODO(port): This #include isn't strictly kosher, but we're currently using |
| 26 // the Mac font code from upstream WebKit, and we need to pick up their header. | 26 // the Mac font code from upstream WebKit, and we need to pick up their header. |
| 27 #undef FontCustomPlatformData_h | 27 #undef FontCustomPlatformData_h |
| 28 #include "third_party/WebKit/WebCore/platform/graphics/mac/FontCustomPlatformDat
a.h" | 28 #include "third_party/WebKit/WebCore/platform/graphics/mac/FontCustomPlatformDat
a.h" |
| 29 #else | 29 #else |
| 30 | 30 |
| 31 #include <wtf/Noncopyable.h> | 31 #include <wtf/Noncopyable.h> |
| 32 | 32 |
| 33 #if PLATFORM(WIN_OS) | 33 #if PLATFORM(WIN_OS) |
| 34 #include "FontRenderingMode.h" |
| 35 #include "PlatformString.h" |
| 34 #include <windows.h> | 36 #include <windows.h> |
| 35 #endif | 37 #endif |
| 36 | 38 |
| 37 namespace WebCore { | 39 namespace WebCore { |
| 38 | 40 |
| 39 class FontPlatformData; | 41 class FontPlatformData; |
| 40 class SharedBuffer; | 42 class SharedBuffer; |
| 41 | 43 |
| 42 struct FontCustomPlatformData : Noncopyable { | 44 struct FontCustomPlatformData : Noncopyable { |
| 43 #if PLATFORM(WIN_OS) | 45 #if PLATFORM(WIN_OS) |
| 44 FontCustomPlatformData(HFONT font) | 46 FontCustomPlatformData(HANDLE fontReference, const String& name) |
| 45 : m_font(font) | 47 : m_fontReference(fontReference) |
| 48 , m_name(name) |
| 46 {} | 49 {} |
| 47 #endif | 50 #endif |
| 48 | 51 |
| 49 ~FontCustomPlatformData(); | 52 ~FontCustomPlatformData(); |
| 50 | 53 |
| 51 FontPlatformData fontPlatformData(int size, bool bold, bool italic); | 54 FontPlatformData fontPlatformData(int size, bool bold, bool italic, |
| 55 FontRenderingMode = NormalRenderingMode); |
| 52 | 56 |
| 53 #if PLATFORM(WIN_OS) | 57 #if PLATFORM(WIN_OS) |
| 54 HFONT m_font; | 58 HANDLE m_fontReference; |
| 59 String m_name; |
| 55 #endif | 60 #endif |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*); | 63 FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*); |
| 59 | 64 |
| 60 } | 65 } |
| 61 | 66 |
| 62 #endif | 67 #endif |
| 63 #endif | 68 #endif |
| OLD | NEW |