From 2c3b94ba74c15b946c2a83d309f7ad2803764eaa Mon Sep 17 00:00:00 2001 From: David Lee Date: Thu, 28 Nov 2024 00:11:47 +0800 Subject: [PATCH] Fix non-functional Typeface::MakeFromData() for Core Graphics backend. --- src/core/vectors/coregraphics/CGTypeface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/vectors/coregraphics/CGTypeface.cpp b/src/core/vectors/coregraphics/CGTypeface.cpp index 538affcd..2781971f 100644 --- a/src/core/vectors/coregraphics/CGTypeface.cpp +++ b/src/core/vectors/coregraphics/CGTypeface.cpp @@ -93,7 +93,7 @@ std::shared_ptr Typeface::MakeFromData(std::shared_ptr data, int return nullptr; } auto cfData = - CFDataCreateWithBytesNoCopy(kCFAllocatorNull, static_cast(data->data()), + CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, static_cast(data->data()), static_cast(data->size()), kCFAllocatorNull); if (cfData == nullptr) { return nullptr;