| Flutter Impeller |

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

`#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 1116 of file impeller.hpp.

## Constructor & Destructor Documentation

## ◆ TypographyContext()

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

Definition at line 1119 of file impeller.hpp.

1120 : Object(gGlobalProcTable.ImpellerTypographyContextNew(),
1121 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 1126 of file impeller.hpp.

1127 {
1128 if (!mapping) {
1129 return false;
1130 }
1131 ImpellerMapping c_mapping = {};
1132 c_mapping.data = mapping->GetMapping();
1133 c_mapping.length = mapping->GetSize();
1134 c_mapping.on_release = [](void* user_data) {
1135 delete reinterpret_cast<Mapping*>(user_data);
1136 };
1137 return gGlobalProcTable.ImpellerTypographyContextRegisterFont(
1138 Get(), //
1139 &c_mapping, //
1140 mapping.release(), //
1141 optional_family_name_alias //
1142 );
1143 }
IMPELLER_HPP_NAMESPACE::Object< ImpellerTypographyContext, ImpellerTypographyContextTraits >::Get
ImpellerTypographyContext Get() const
Definition: impeller.hpp:269
ImpellerMapping
Definition: impeller.h:602
ImpellerMapping::on_release
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:605
ImpellerMapping::length
uint64_t length
Definition: impeller.h:604
ImpellerMapping::data
const uint8_t *IMPELLER_NONNULL data
Definition: impeller.h:603

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