OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SkiaTextMetrics_h | 5 #ifndef SkiaTextMetrics_h |
6 #define SkiaTextMetrics_h | 6 #define SkiaTextMetrics_h |
7 | 7 |
8 #include "platform/fonts/Glyph.h" | 8 #include "platform/fonts/Glyph.h" |
9 | 9 |
10 #include <SkPaint.h> | 10 #include <SkPaint.h> |
11 #include <hb.h> | 11 #include <hb.h> |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class SkiaTextMetrics final { | 15 class SkiaTextMetrics final { |
16 public: | 16 public: |
17 SkiaTextMetrics(const SkPaint*); | 17 SkiaTextMetrics(const SkPaint*); |
18 | 18 |
19 void getGlyphWidthAndExtentsForHarfBuzz(hb_codepoint_t, hb_position_t* width
, hb_glyph_extents_t*); | 19 void getGlyphWidthForHarfBuzz(hb_codepoint_t, hb_position_t* width); |
| 20 void getGlyphExtentsForHarfBuzz(hb_codepoint_t, hb_glyph_extents_t*); |
20 | 21 |
21 void getSkiaBoundsForGlyph(Glyph, SkRect* bounds); | 22 void getSkiaBoundsForGlyph(Glyph, SkRect* bounds); |
22 float getSkiaWidthForGlyph(Glyph); | 23 float getSkiaWidthForGlyph(Glyph); |
23 | 24 |
24 private: | 25 private: |
25 const SkPaint* m_paint; | 26 const SkPaint* m_paint; |
26 }; | 27 }; |
27 | 28 |
28 } // namespace blink | 29 } // namespace blink |
29 | 30 |
30 #endif | 31 #endif |
OLD | NEW |