| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include <objc/objc-auto.h> | 55 #include <objc/objc-auto.h> |
| 56 | 56 |
| 57 inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast<CTFontRef
>(nsFont); } | 57 inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast<CTFontRef
>(nsFont); } |
| 58 #endif // OS(MACOSX) | 58 #endif // OS(MACOSX) |
| 59 | 59 |
| 60 class SkTypeface; | 60 class SkTypeface; |
| 61 typedef uint32_t SkFontID; | 61 typedef uint32_t SkFontID; |
| 62 | 62 |
| 63 namespace blink { | 63 namespace blink { |
| 64 | 64 |
| 65 class Font; |
| 65 class GraphicsContext; | 66 class GraphicsContext; |
| 66 class HarfBuzzFace; | 67 class HarfBuzzFace; |
| 67 | 68 |
| 68 class PLATFORM_EXPORT FontPlatformData { | 69 class PLATFORM_EXPORT FontPlatformData { |
| 69 public: | 70 public: |
| 70 // Used for deleted values in the font cache's hash tables. The hash table | 71 // Used for deleted values in the font cache's hash tables. The hash table |
| 71 // will create us with this structure, and it will compare other values | 72 // will create us with this structure, and it will compare other values |
| 72 // to this "Deleted" one. It expects the Deleted one to be differentiable | 73 // to this "Deleted" one. It expects the Deleted one to be differentiable |
| 73 // from the 0 one (created with the empty constructor), so we can't just | 74 // from the 0 one (created with the empty constructor), so we can't just |
| 74 // set everything to 0. | 75 // set everything to 0. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 137 |
| 137 #if ENABLE(OPENTYPE_VERTICAL) | 138 #if ENABLE(OPENTYPE_VERTICAL) |
| 138 PassRefPtr<OpenTypeVerticalData> verticalData() const; | 139 PassRefPtr<OpenTypeVerticalData> verticalData() const; |
| 139 PassRefPtr<SharedBuffer> openTypeTable(uint32_t table) const; | 140 PassRefPtr<SharedBuffer> openTypeTable(uint32_t table) const; |
| 140 #endif | 141 #endif |
| 141 | 142 |
| 142 #if !OS(MACOSX) | 143 #if !OS(MACOSX) |
| 143 // The returned styles are all actual styles without FontRenderStyle::NoPref
erence. | 144 // The returned styles are all actual styles without FontRenderStyle::NoPref
erence. |
| 144 const FontRenderStyle& fontRenderStyle() const { return m_style; } | 145 const FontRenderStyle& fontRenderStyle() const { return m_style; } |
| 145 #endif | 146 #endif |
| 146 void setupPaint(SkPaint*, GraphicsContext* = 0) const; | 147 void setupPaint(SkPaint*, GraphicsContext* = 0, const Font* = 0) const; |
| 147 | 148 |
| 148 #if OS(WIN) | 149 #if OS(WIN) |
| 149 int paintTextFlags() const { return m_paintTextFlags; } | 150 int paintTextFlags() const { return m_paintTextFlags; } |
| 150 #else | 151 #else |
| 151 static void setHinting(SkPaint::Hinting); | 152 static void setHinting(SkPaint::Hinting); |
| 152 static void setAutoHint(bool); | 153 static void setAutoHint(bool); |
| 153 static void setUseBitmaps(bool); | 154 static void setUseBitmaps(bool); |
| 154 static void setAntiAlias(bool); | 155 static void setAntiAlias(bool); |
| 155 static void setSubpixelRendering(bool); | 156 static void setSubpixelRendering(bool); |
| 156 #endif | 157 #endif |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 int m_paintTextFlags; | 204 int m_paintTextFlags; |
| 204 bool m_useSubpixelPositioning; | 205 bool m_useSubpixelPositioning; |
| 205 unsigned m_minSizeForAntiAlias; | 206 unsigned m_minSizeForAntiAlias; |
| 206 float m_minSizeForSubpixel; | 207 float m_minSizeForSubpixel; |
| 207 #endif | 208 #endif |
| 208 }; | 209 }; |
| 209 | 210 |
| 210 } // namespace blink | 211 } // namespace blink |
| 211 | 212 |
| 212 #endif // ifdef FontPlatformData_h | 213 #endif // ifdef FontPlatformData_h |
| OLD | NEW |