Skip to content

Commit

Permalink
Reland "Revert "custom typeface""
Browse files Browse the repository at this point in the history
This reverts commit 61642b3.

Reason for revert: ../../src/utils/SkCustomTypeface.cpp(179,20): error: cannot decompose this type; 'std::tuple_size<const SkPoint>::value' is not a valid integral constant expression

Original change's description:
> Revert "Revert "custom typeface""
> 
> Fix: implement onComputeBounds() and generateFontMetrics()
> 
> This reverts commit 0066ade.
> 
> Change-Id: Idb59336a3d201bb97e494ee0e0bb189e0a7186f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288536
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=bungeman@google.com,reed@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: I6845bb96a00a0c9ee54704a4c299556cc32e6438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288557
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
  • Loading branch information
brianosman committed May 7, 2020
1 parent 1fc1bd3 commit c66cd98
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 518 deletions.
89 changes: 0 additions & 89 deletions gm/userfont.cpp

This file was deleted.

1 change: 0 additions & 1 deletion gn/gm.gni
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ gm_sources = [
"$_gm/trickycubicstrokes.cpp",
"$_gm/typeface.cpp",
"$_gm/unpremul.cpp",
"$_gm/userfont.cpp",
"$_gm/variedtext.cpp",
"$_gm/verifiers/gmverifier.cpp",
"$_gm/vertices.cpp",
Expand Down
2 changes: 0 additions & 2 deletions gn/utils.gni
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ skia_utils_public = [
"$_include/utils/SkBase64.h",
"$_include/utils/SkCamera.h",
"$_include/utils/SkCanvasStateUtils.h",
"$_include/utils/SkCustomTypeface.h",
"$_include/utils/SkEventTracer.h",
"$_include/utils/SkInterpolator.h",
"$_include/utils/SkNWayCanvas.h",
Expand Down Expand Up @@ -41,7 +40,6 @@ skia_utils_sources = [
"$_src/utils/SkCharToGlyphCache.h",
"$_src/utils/SkClipStackUtils.cpp",
"$_src/utils/SkClipStackUtils.h",
"$_src/utils/SkCustomTypeface.cpp",
"$_src/utils/SkDashPath.cpp",
"$_src/utils/SkDashPathPriv.h",
"$_src/utils/SkEventTracer.cpp",
Expand Down
42 changes: 0 additions & 42 deletions include/utils/SkCustomTypeface.h

This file was deleted.

1 change: 0 additions & 1 deletion src/core/SkGlyph.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ class SkGlyph {
friend class SkStrikeServer;
friend class SkTestScalerContext;
friend class SkTestSVGScalerContext;
friend class SkUserScalerContext;
friend class TestSVGTypeface;
friend class TestTypeface;

Expand Down
7 changes: 0 additions & 7 deletions src/core/SkTypeface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "include/core/SkTypeface.h"
#include "include/private/SkMutex.h"
#include "include/private/SkOnce.h"
#include "include/utils/SkCustomTypeface.h"
#include "src/core/SkAdvancedTypefaceMetrics.h"
#include "src/core/SkEndian.h"
#include "src/core/SkFontDescriptor.h"
Expand Down Expand Up @@ -162,12 +161,6 @@ sk_sp<SkTypeface> SkTypeface::MakeFromData(sk_sp<SkData> data, int index) {
}

sk_sp<SkTypeface> SkTypeface::MakeFromFontData(std::unique_ptr<SkFontData> data) {
if (data->hasStream()) {
if (auto tf = SkCustomTypefaceBuilder::Deserialize(data->getStream())) {
return tf;
}
}

return SkFontMgr::RefDefault()->makeFromFontData(std::move(data));
}

Expand Down
Loading

0 comments on commit c66cd98

Please sign in to comment.