aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-04-10 11:27:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-09 14:24:45 +0000
commit1c2bcd8b14e029a70e88b1e81acd29553cab0d1c (patch)
tree723a0c85100bcb59590bd2e46fc5eb5c10472406 /src/core
parenta2595f925596aca234d4ac4e35da689ef13cc27c (diff)
SkAdvancedTypefaceMetrics: factor out GlyphToUnicode
Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63 Reviewed-on: https://skia-review.googlesource.com/126507 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkAdvancedTypefaceMetrics.h10
-rw-r--r--src/core/SkTypeface.cpp1
-rw-r--r--src/core/SkTypeface_remote.h4
3 files changed, 5 insertions, 10 deletions
diff --git a/src/core/SkAdvancedTypefaceMetrics.h b/src/core/SkAdvancedTypefaceMetrics.h
index 6be3d443bf..e9af831422 100644
--- a/src/core/SkAdvancedTypefaceMetrics.h
+++ b/src/core/SkAdvancedTypefaceMetrics.h
@@ -10,9 +10,7 @@
#include "SkBitmaskEnum.h"
#include "SkRect.h"
-#include "SkRefCnt.h"
#include "SkString.h"
-#include "SkTDArray.h"
/** \class SkAdvancedTypefaceMetrics
@@ -21,11 +19,6 @@
SkTypeface::getAdvancedMetrics.
*/
struct SkAdvancedTypefaceMetrics {
- SkAdvancedTypefaceMetrics() {}
- SkAdvancedTypefaceMetrics(const SkAdvancedTypefaceMetrics&) = delete;
- SkAdvancedTypefaceMetrics& operator=(const SkAdvancedTypefaceMetrics&) = delete;
- ~SkAdvancedTypefaceMetrics() {}
-
// The PostScript name of the font. See `FontName` and `BaseFont` in PDF standard.
SkString fPostScriptName;
SkString fFontName;
@@ -70,9 +63,6 @@ struct SkAdvancedTypefaceMetrics {
int16_t fCapHeight = 0; // Height (from baseline) of top of flat capitals.
SkIRect fBBox = {0, 0, 0, 0}; // The bounding box of all glyphs (in font units).
-
- // The mapping from glyph to Unicode; array indices are glyph ids.
- SkTDArray<SkUnichar> fGlyphToUnicode;
};
namespace skstd {
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index c6337d7852..af3e810560 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -50,6 +50,7 @@ protected:
return nullptr;
}
void onFilterRec(SkScalerContextRec*) const override { }
+ void getGlyphToUnicodeMap(SkUnichar*) const override { }
std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override {
return nullptr;
}
diff --git a/src/core/SkTypeface_remote.h b/src/core/SkTypeface_remote.h
index 691b124049..ad729aded3 100644
--- a/src/core/SkTypeface_remote.h
+++ b/src/core/SkTypeface_remote.h
@@ -111,6 +111,10 @@ protected:
void onGetFontDescriptor(SkFontDescriptor*, bool*) const override {
SK_ABORT("Should never be called.");
}
+ void getGlyphToUnicodeMap(SkUnichar*) const override {
+ SK_ABORT("Should never be called.");
+ }
+
std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override {
SK_ABORT("Should never be called.");
return nullptr;