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

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

Issue 1980913002: Unify glyph metrics to use the same Skia API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed a spurious header line Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.h
diff --git a/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.h b/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..ca85fa424f479c3f0133fdc73179fc031d36753c
--- /dev/null
+++ b/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SkiaTextMetrics_h
+#define SkiaTextMetrics_h
+
+#include "platform/fonts/Glyph.h"
+
+#include <SkPaint.h>
+#include <hb.h>
+
+namespace blink {
+
+class SkiaTextMetrics final {
+public:
+ SkiaTextMetrics(const SkPaint*);
+
+ void getGlyphWidthAndExtentsForHarfBuzz(hb_codepoint_t, hb_position_t* width, hb_glyph_extents_t*);
+
+ void getSkiaBoundsForGlyph(Glyph, SkRect* bounds);
+ float getSkiaWidthForGlyph(Glyph);
+
+private:
+ const SkPaint* m_paint;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698