Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkFontMgr_data.h File Reference
#include "include/core/SkData.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSpan.h"
#include "include/core/SkTypes.h"

Go to the source code of this file.

Functions

SK_API sk_sp< SkFontMgrSkFontMgr_New_Custom_Data (SkSpan< sk_sp< SkData > >)
 

Function Documentation

◆ SkFontMgr_New_Custom_Data()

SK_API sk_sp< SkFontMgr > SkFontMgr_New_Custom_Data ( SkSpan< sk_sp< SkData > >  datas)

Create a custom font manager which wraps a collection of SkData-stored fonts. This font manager uses FreeType for rendering.

Definition at line 130 of file SkFontMgr_custom_embedded.cpp.

130 {
131 SkASSERT(!datas.empty());
132 return sk_make_sp<SkFontMgr_Custom>(DataFontLoader(datas.data(), datas.size()));
133}
#define SkASSERT(cond)
Definition SkAssert.h:116
constexpr T * data() const
Definition SkSpan_impl.h:94
constexpr bool empty() const
Definition SkSpan_impl.h:96
constexpr size_t size() const
Definition SkSpan_impl.h:95