Skip to content

m122: SkFontMgr::RefDefault() has been deleted #231

@HinTak

Description

@HinTak

Skia m122 has a rather troubling change:

    Milestone 122
    -------------
      * `SkFontMgr::RefDefault()` has been deleted. Clients should instantiate and manage their own
        `SkFontMgr`s and use them to explicitly create `SkTypeface`s

This functionality is being moved into Chromium itself:

chromium/chromium@a6166e8

I see no good alternative except essentially copying most of chromium:skia/ext/font_utils.cc and stick it near the top of our src/skia/Font.cpp, emulating the removed SkFontMgr::RefDefault(). Without a workingSkFontMgr::RefDefault() or equivalent (SkFontMgr::RefEmpty() is interface-identical and available, but it does nothing ; if you want something, you need to call SkFontMgr_New_FCI [linux fontconfig] etc directly, for each platform ), we are getting an extra of 44 failed and 62 errors compared to two days ago.

This is essentially all the difference between upstream skia m121 and m122, as far as skia-python is concerned, moving the "central font mgr api" into chromium. @kyamagu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions