Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.h

Issue 2204923002: Untangle HarfBuzz callbacks for glyph width and extents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Untangle HarfBuzz callbacks for glyph width and extents Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698