Bug #5039
openbug in WRasterImage-skia.C occurs in 3.3.6 RC 2
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()));
WD Updated by Wim Dumon about 10 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.
DF Updated by Dennis Felippa about 10 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
WD Updated by Wim Dumon about 10 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.
DF Updated by Dennis Felippa about 10 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.)