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

Unified Diff: Source/core/rendering/svg/SVGTextMetrics.h

Issue 181443002: Use glyph-ids for lookups of SVG font kerning-pairs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Vector<...>::append -> Vector<...>::appendVector. Created 6 years, 10 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: Source/core/rendering/svg/SVGTextMetrics.h
diff --git a/Source/core/rendering/svg/SVGTextMetrics.h b/Source/core/rendering/svg/SVGTextMetrics.h
index 362933997edfbaec6b204c1663681b005476fe6e..8c3bb26bb51c9010609126a7198dba0c4d09f5b9 100644
--- a/Source/core/rendering/svg/SVGTextMetrics.h
+++ b/Source/core/rendering/svg/SVGTextMetrics.h
@@ -20,6 +20,7 @@
#ifndef SVGTextMetrics_h
#define SVGTextMetrics_h
+#include "platform/fonts/Glyph.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -36,12 +37,12 @@ public:
SVGTextMetrics();
SVGTextMetrics(MetricsType);
- SVGTextMetrics(RenderSVGInlineText*, unsigned position, unsigned length, float width, const String& glyphName);
+ SVGTextMetrics(RenderSVGInlineText*, unsigned position, unsigned length, float width, Glyph glyphNameGlyphId);
static SVGTextMetrics measureCharacterRange(RenderSVGInlineText*, unsigned position, unsigned length);
static TextRun constructTextRun(RenderSVGInlineText*, unsigned position, unsigned length);
- bool isEmpty() const { return !m_width && !m_height && !m_glyph.isValid && m_length == 1; }
+ bool isEmpty() const { return !m_width && !m_height && m_length <= 1; }
float width() const { return m_width; }
void setWidth(float width) { m_width = width; }
@@ -49,19 +50,8 @@ public:
float height() const { return m_height; }
unsigned length() const { return m_length; }
- struct Glyph {
- Glyph()
- : isValid(false)
- {
- }
-
- bool isValid;
- String name;
- String unicodeString;
- };
-
// Only useful when measuring individual characters, to lookup ligatures.
- const Glyph& glyph() const { return m_glyph; }
+ Glyph glyph() const { return m_glyph; }
private:
SVGTextMetrics(RenderSVGInlineText*, const TextRun&);
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp ('k') | Source/core/rendering/svg/SVGTextMetrics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698