| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FontPlatformDataHarfBuzz_h | 31 #ifndef FontPlatformDataHarfBuzz_h |
| 32 #define FontPlatformDataHarfBuzz_h | 32 #define FontPlatformDataHarfBuzz_h |
| 33 | 33 |
| 34 #include "SkPaint.h" | 34 #include "SkPaint.h" |
| 35 #include "platform/SharedBuffer.h" | 35 #include "platform/SharedBuffer.h" |
| 36 #include "core/platform/graphics/opentype/OpenTypeVerticalData.h" | |
| 37 #include "platform/fonts/FontDescription.h" | 36 #include "platform/fonts/FontDescription.h" |
| 38 #include "platform/fonts/FontOrientation.h" | 37 #include "platform/fonts/FontOrientation.h" |
| 39 #include "platform/fonts/FontRenderStyle.h" | 38 #include "platform/fonts/FontRenderStyle.h" |
| 39 #include "platform/fonts/opentype/OpenTypeVerticalData.h" |
| 40 #include "wtf/Forward.h" | 40 #include "wtf/Forward.h" |
| 41 #include "wtf/HashTableDeletedValueType.h" | 41 #include "wtf/HashTableDeletedValueType.h" |
| 42 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
| 43 #include "wtf/text/CString.h" | 43 #include "wtf/text/CString.h" |
| 44 #include "wtf/text/StringImpl.h" | 44 #include "wtf/text/StringImpl.h" |
| 45 | 45 |
| 46 class SkTypeface; | 46 class SkTypeface; |
| 47 typedef uint32_t SkFontID; | 47 typedef uint32_t SkFontID; |
| 48 | 48 |
| 49 namespace WebCore { | 49 namespace WebCore { |
| 50 | 50 |
| 51 class GraphicsContext; | 51 class GraphicsContext; |
| 52 class HarfBuzzFace; | 52 class HarfBuzzFace; |
| 53 | 53 |
| 54 // ----------------------------------------------------------------------------- | 54 // ----------------------------------------------------------------------------- |
| 55 // FontPlatformData is the handle which WebKit has on a specific face. A face | 55 // FontPlatformData is the handle which WebKit has on a specific face. A face |
| 56 // is the tuple of (font, size, ...etc). Here we are just wrapping a Skia | 56 // is the tuple of (font, size, ...etc). Here we are just wrapping a Skia |
| 57 // SkTypeface pointer and dealing with the reference counting etc. | 57 // SkTypeface pointer and dealing with the reference counting etc. |
| 58 // ----------------------------------------------------------------------------- | 58 // ----------------------------------------------------------------------------- |
| 59 class FontPlatformData { | 59 class PLATFORM_EXPORT FontPlatformData { |
| 60 public: | 60 public: |
| 61 // Used for deleted values in the font cache's hash tables. The hash table | 61 // Used for deleted values in the font cache's hash tables. The hash table |
| 62 // will create us with this structure, and it will compare other values | 62 // will create us with this structure, and it will compare other values |
| 63 // to this "Deleted" one. It expects the Deleted one to be differentiable | 63 // to this "Deleted" one. It expects the Deleted one to be differentiable |
| 64 // from the 0 one (created with the empty constructor), so we can't just | 64 // from the 0 one (created with the empty constructor), so we can't just |
| 65 // set everything to 0. | 65 // set everything to 0. |
| 66 FontPlatformData(WTF::HashTableDeletedValueType); | 66 FontPlatformData(WTF::HashTableDeletedValueType); |
| 67 FontPlatformData(); | 67 FontPlatformData(); |
| 68 FontPlatformData(float textSize, bool fakeBold, bool fakeItalic); | 68 FontPlatformData(float textSize, bool fakeBold, bool fakeItalic); |
| 69 FontPlatformData(const FontPlatformData&); | 69 FontPlatformData(const FontPlatformData&); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 bool m_fakeItalic; | 138 bool m_fakeItalic; |
| 139 FontOrientation m_orientation; | 139 FontOrientation m_orientation; |
| 140 FontRenderStyle m_style; | 140 FontRenderStyle m_style; |
| 141 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; | 141 mutable RefPtr<HarfBuzzFace> m_harfBuzzFace; |
| 142 bool m_isHashTableDeletedValue; | 142 bool m_isHashTableDeletedValue; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace WebCore | 145 } // namespace WebCore |
| 146 | 146 |
| 147 #endif // ifdef FontPlatformDataHarfBuzz_h | 147 #endif // ifdef FontPlatformDataHarfBuzz_h |
| OLD | NEW |