Project

General

Profile

Bug #5039

bug in WRasterImage-skia.C occurs in 3.3.6 RC 2

Added by Dennis Felippa over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
High
Assignee:
Target version:
Start date:
07/05/2016
Due date:
% Done:

0%

Estimated time:

Description

In

WRasterImage-skia.C

method "CreateFromName" is no longer supported

Please around line 387 replace

impl*->textPaint*.setTypeface(SkTypeface::CreateFromName(base,

(SkTypeface::Style)style))->unref();

with:

impl*->textPaint*.setTypeface(sk_ref_sp(SkTypeface::MakeFromName(base, SkFontStyle::FromOldStyle(style)).release()));

#1

Updated by Wim Dumon over 5 years ago

  • Assignee set to Wim Dumon

Hey,

Skia's API is a bit unstable lately, and we needed to update skia for msvs2015 support. Therefore, I selected one particular version to support, and wrote that version in the WRasterImage-skia.C file. Given the amount of changes I've seen from one version to another, I'm not surprised that this will happen quite a few times. Are you using the version annotated in the .C file? Do you have a particular reason not to use the version that is annotated in the .C file?

Wim.

#2

Updated by Dennis Felippa over 5 years ago

Skia master branch from github

The relevant file is: SkTypeface.h

From the file history in github, I see now that this has been commited recently (02/06):

#ifdef SK_SUPPORT_LEGACY_TYPEFACE_PTR

static SkTypeface* CreateFromName(const char familyName[], Style style) {

return MakeFromName(familyName, SkFontStyle::FromOldStyle(style)).release();

}

#endif

I use Windows but it does not make a difference in this case

Anyway the i think the fix I propose will work with older versions and latest versions of skia.

Thank you,

Dennis

#3

Updated by Wim Dumon over 5 years ago

Mmm, SkTypeface::MakeFromName is not present in the version Wt uses. I'll have to fix this next time I upgrade skia (may be required for msvs2015 update 3 support?)

Wim.

#4

Updated by Dennis Felippa over 5 years ago

One suggestion:

It might be a good idea to fork in GitHub the supported versions of the projects Wt depends on (skia, openssl, etc.)

Also available in: Atom PDF