Flutter Impeller
IMPELLER_HPP_NAMESPACE::TypographyContext Class Referencefinal

#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 887 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 897 of file impeller.hpp.

898  {
899  if (!mapping) {
900  return false;
901  }
902  ImpellerMapping c_mapping = {};
903  c_mapping.data = mapping->GetMapping();
904  c_mapping.length = mapping->GetSize();
905  c_mapping.on_release = [](void* user_data) {
906  delete reinterpret_cast<Mapping*>(user_data);
907  };
908  return gGlobalProcTable.ImpellerTypographyContextRegisterFont(
909  Get(), //
910  &c_mapping, //
911  mapping.release(), //
912  optional_family_name_alias //
913  );
914  }
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:562
uint64_t length
Definition: impeller.h:561
const uint8_t *IMPELLER_NONNULL data
Definition: impeller.h:560

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: