| Flutter Impeller |

Public Member Functions | List of all members
impeller::interop::TypographyContext Class Referencefinal

`#include <typography_context.h>`

Inheritance diagram for impeller::interop::TypographyContext:

## Public Member Functions
| TypographyContext ()
| ~TypographyContext () override
| TypographyContext (const TypographyContext &)=delete
TypographyContext & | operator= (const TypographyContext &)=delete
bool | IsValid () const
const std::shared_ptr< txt::FontCollection > & | GetFontCollection () const
Public Member Functions inherited from impeller::interop::ObjectBase
| ObjectBase ()=default
virtual | ~ObjectBase ()=default
| ObjectBase (const ObjectBase &)=delete
| ObjectBase (ObjectBase &&)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
ObjectBase & | operator= (ObjectBase &&)=delete
void | Retain ()
void | Release ()
uint64_t | GetRefCountForTests () const

## Additional Inherited Members
Public Types inherited from impeller::interop::Object< TypographyContext, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerTypographyContext)>
using | InteropClass = TypographyContext
using | InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerTypographyContext)
Static Public Member Functions inherited from impeller::interop::ObjectBase
static void | SafeRetain (void *ptr)
static void | SafeRelease (void *ptr)

## Detailed Description

Definition at line 16 of file typography_context.h.

## Constructor & Destructor Documentation

## ◆ TypographyContext() [1/2]

impeller::interop::TypographyContext::TypographyContext | ( |  | ) |

Definition at line 14 of file typography_context.cc.

15 : collection_(std::make_shared<txt::FontCollection>()) {
16 static std::once_flag sICUInitOnceFlag;
17 std::call_once(sICUInitOnceFlag, []() {
18 auto icu_data = std::make_unique<fml::NonOwnedMapping>(
19 impeller_embedded_icu_data_data, impeller_embedded_icu_data_length);
20 fml::icu::InitializeICUFromMapping(std::move(icu_data));
21 });
22 collection_->SetupDefaultFontManager(0u);
23 }

## ◆ ~TypographyContext()

impeller::interop::TypographyContext::~TypographyContext | ( |  | ) |
| override default

## ◆ TypographyContext() [2/2]

impeller::interop::TypographyContext::TypographyContext | ( | const TypographyContext & |  | ) |
| delete

## Member Function Documentation

## ◆ GetFontCollection()

const std::shared_ptr< txt::FontCollection > & impeller::interop::TypographyContext::GetFontCollection | ( |  | ) | const

Definition at line 32 of file typography_context.cc.

32 {
33 return collection_;
34 }

Referenced by impeller::interop::ParagraphBuilder::ParagraphBuilder().

## ◆ IsValid()

bool impeller::interop::TypographyContext::IsValid | ( |  | ) | const

Definition at line 27 of file typography_context.cc.

27 {
28 return !!collection_;
29 }

Referenced by impeller::interop::ParagraphBuilder::ParagraphBuilder().

## ◆ operator=()

TypographyContext& impeller::interop::TypographyContext::operator= | ( | const TypographyContext & |  | ) |
| delete

The documentation for this class was generated from the following files:

- impeller/toolkit/interop/typography_context.h
- impeller/toolkit/interop/typography_context.cc