Flutter Impeller
IMPELLER_HPP_NAMESPACE::TypographyContext Class Reference

#include <impeller.hpp>

Inheritance diagram for IMPELLER_HPP_NAMESPACE::TypographyContext:
IMPELLER_HPP_NAMESPACE::Object< ImpellerTypographyContext, ImpellerTypographyContextTraits >

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 ()
 
Objectoperator= (Object &&other)
 
Objectoperator= (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

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  }
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:629
uint64_t length
Definition: impeller.h:628
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: