| Flutter Impeller |

Public Member Functions | List of all members
IMPELLER_HPP_NAMESPACE::TypographyContext Class Reference

`#include <impeller.hpp>`

Inheritance diagram for IMPELLER_HPP_NAMESPACE::TypographyContext:

## Public Member Functions
| TypographyContext ()
bool | RegisterFont (std::unique_ptr< Mapping > mapping, const char *optional_family_name_alias=nullptr)
Public Member Functions inherited from IMPELLER_HPP_NAMESPACE::Object< ImpellerTypographyContext, ImpellerTypographyContextTraits >
| Object ()=default
| Object (ImpellerTypographyContext object)
| Object (ImpellerTypographyContext object, AdoptTag)
| Object (Object &&other)
| Object (const Object &other)
| ~Object ()
Object & | operator= (Object &&other)
Object & | operator= (const Object &other)
ImpellerTypographyContext | Get () const
| operator bool () const

## Detailed Description

See also
  ImpellerTypographyContext

Definition at line 1212 of file impeller.hpp.

## Constructor & Destructor Documentation

## ◆ TypographyContext()

IMPELLER_HPP_NAMESPACE::TypographyContext::TypographyContext | ( |  | ) |
| inline

Definition at line 1215 of file impeller.hpp.

1216 : Object(gGlobalProcTable.ImpellerTypographyContextNew(),
1217 AdoptTag::kAdopt) {}
IMPELLER_HPP_NAMESPACE::Object< ImpellerTypographyContext, ImpellerTypographyContextTraits >::Object
Object()=default
IMPELLER_HPP_NAMESPACE::AdoptTag::kAdopt
@ kAdopt
IMPELLER_HPP_NAMESPACE::gGlobalProcTable
ProcTable gGlobalProcTable
Definition: playground_test.cc:25

References IMPELLER_HPP_NAMESPACE::kAdopt.

## Member Function Documentation

## ◆ RegisterFont()

bool IMPELLER_HPP_NAMESPACE::TypographyContext::RegisterFont | ( | std::unique_ptr< Mapping > | mapping,
|  | const char * | optional_family_name_alias = `nullptr`
| ) |  |
| inline

See also
  ImpellerTypographyContextRegisterFont

Definition at line 1222 of file impeller.hpp.

1223 {
1224 if (!mapping) {
1225 return false;
1226 }
1227 ImpellerMapping c_mapping = {};
1228 c_mapping.data = mapping->GetMapping();
1229 c_mapping.length = mapping->GetSize();
1230 c_mapping.on_release = [](void* user_data) {
1231 delete reinterpret_cast<Mapping*>(user_data);
1232 };
1233 return gGlobalProcTable.ImpellerTypographyContextRegisterFont(
1234 Get(), //
1235 &c_mapping, //
1236 mapping.release(), //
1237 optional_family_name_alias //
1238 );
1239 }
IMPELLER_HPP_NAMESPACE::Object< ImpellerTypographyContext, ImpellerTypographyContextTraits >::Get
ImpellerTypographyContext Get() const
Definition: impeller.hpp:278
ImpellerMapping
Definition: impeller.h:626
ImpellerMapping::on_release
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:629
ImpellerMapping::length
uint64_t length
Definition: impeller.h:628
ImpellerMapping::data
const uint8_t *IMPELLER_NONNULL data
Definition: impeller.h:627

References ImpellerMapping::data, IMPELLER_HPP_NAMESPACE::Object< ImpellerTypographyContext, ImpellerTypographyContextTraits >::Get(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, ImpellerMapping::length, and ImpellerMapping::on_release.

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

- impeller/toolkit/interop/impeller.hpp