Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0066ade

Browse files
Revert "custom typeface"
This reverts commit 3a79f33. Reason for revert: MSAN issues Uninitialized value was stored to memory at #0 0x2cd74de in SkFontPriv::GetFontBounds(SkFont const&) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkFont.cpp:400:34 #1 0x31115ad in SkTextBlobBuilder::ConservativeRunBounds(SkTextBlob::RunRecord const&) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:307:31 #2 0x31104d2 in SkTextBlobBuilder::updateDeferredBounds() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:374:47 #3 0x31104d2 in SkTextBlobBuilder::make() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:605:11 #4 0x31175c1 in SkTextBlob::MakeFromText(void const*, unsigned long, SkFont const&, SkTextEncoding) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:782:20 #5 0x1920415 in UserFontGM::onOnceBeforeDraw() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/gm/userfont.cpp:65:17 Original change's description: > custom typeface > > - only paths implemented at the moment > > Seems if we want to serialize/deserialize these, we will need to > register a factory with skia, so it can sniff the beginning of the > font "file", to know how to recreate it. > > Lots of follow-on things to explore: > - do we need to even store/know advance widths? > - should we also (optionally) support a CMAP? names? others? > > Change-Id: If9fa99b7b8f6e265f06eb3ba2ca4fcb073275250 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287157 > Reviewed-by: Ben Wagner <[email protected]> > Commit-Queue: Mike Reed <[email protected]> [email protected],[email protected],[email protected] Change-Id: Iee93db8d0f94d706f0b97566d2d15e2ad2407601 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288463 Reviewed-by: Mike Reed <[email protected]>
1 parent 3a79f33 commit 0066ade

File tree

7 files changed

+0
-488
lines changed

7 files changed

+0
-488
lines changed

gm/userfont.cpp

Lines changed: 0 additions & 82 deletions
This file was deleted.

gn/gm.gni

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ gm_sources = [
378378
"$_gm/trickycubicstrokes.cpp",
379379
"$_gm/typeface.cpp",
380380
"$_gm/unpremul.cpp",
381-
"$_gm/userfont.cpp",
382381
"$_gm/variedtext.cpp",
383382
"$_gm/verifiers/gmverifier.cpp",
384383
"$_gm/vertices.cpp",

gn/utils.gni

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ skia_utils_public = [
1212
"$_include/utils/SkBase64.h",
1313
"$_include/utils/SkCamera.h",
1414
"$_include/utils/SkCanvasStateUtils.h",
15-
"$_include/utils/SkCustomTypeface.h",
1615
"$_include/utils/SkEventTracer.h",
1716
"$_include/utils/SkInterpolator.h",
1817
"$_include/utils/SkNWayCanvas.h",
@@ -41,7 +40,6 @@ skia_utils_sources = [
4140
"$_src/utils/SkCharToGlyphCache.h",
4241
"$_src/utils/SkClipStackUtils.cpp",
4342
"$_src/utils/SkClipStackUtils.h",
44-
"$_src/utils/SkCustomTypeface.cpp",
4543
"$_src/utils/SkDashPath.cpp",
4644
"$_src/utils/SkDashPathPriv.h",
4745
"$_src/utils/SkEventTracer.cpp",

include/utils/SkCustomTypeface.h

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/core/SkGlyph.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ class SkGlyph {
296296
friend class SkStrikeServer;
297297
friend class SkTestScalerContext;
298298
friend class SkTestSVGScalerContext;
299-
friend class SkUserScalerContext;
300299
friend class TestSVGTypeface;
301300
friend class TestTypeface;
302301

src/core/SkTypeface.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "include/core/SkTypeface.h"
1212
#include "include/private/SkMutex.h"
1313
#include "include/private/SkOnce.h"
14-
#include "include/utils/SkCustomTypeface.h"
1514
#include "src/core/SkAdvancedTypefaceMetrics.h"
1615
#include "src/core/SkEndian.h"
1716
#include "src/core/SkFontDescriptor.h"
@@ -162,12 +161,6 @@ sk_sp<SkTypeface> SkTypeface::MakeFromData(sk_sp<SkData> data, int index) {
162161
}
163162

164163
sk_sp<SkTypeface> SkTypeface::MakeFromFontData(std::unique_ptr<SkFontData> data) {
165-
if (data->hasStream()) {
166-
if (auto tf = SkCustomTypefaceBuilder::Deserialize(data->getStream())) {
167-
return tf;
168-
}
169-
}
170-
171164
return SkFontMgr::RefDefault()->makeFromFontData(std::move(data));
172165
}
173166

0 commit comments

Comments
 (0)