Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skottie::internal::CustomFont::GlyphCompMapper Class Referencefinal

#include <Font.h>

Inheritance diagram for skottie::internal::CustomFont::GlyphCompMapper:
SkRefCnt SkRefCntBase

Public Member Functions

 GlyphCompMapper (std::vector< std::unique_ptr< CustomFont > > &&fonts)
 
 ~GlyphCompMapper () override=default
 
sk_sp< sksg::RenderNodegetGlyphComp (const SkTypeface *, SkGlyphID) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Detailed Description

Definition at line 56 of file Font.h.

Constructor & Destructor Documentation

◆ GlyphCompMapper()

skottie::internal::CustomFont::GlyphCompMapper::GlyphCompMapper ( std::vector< std::unique_ptr< CustomFont > > &&  fonts)
inlineexplicit

Definition at line 58 of file Font.h.

59 : fFonts(std::move(fonts)) {}

◆ ~GlyphCompMapper()

skottie::internal::CustomFont::GlyphCompMapper::~GlyphCompMapper ( )
overridedefault

Member Function Documentation

◆ getGlyphComp()

sk_sp< sksg::RenderNode > skottie::internal::CustomFont::GlyphCompMapper::getGlyphComp ( const SkTypeface tf,
SkGlyphID  gid 
) const

Definition at line 212 of file Font.cpp.

213 {
214 for (const auto& font : fFonts) {
215 if (font->typeface().get() == tf) {
216 auto* comp_node = font->fGlyphComps.find(gid);
217 return comp_node ? *comp_node : nullptr;
218 }
219 }
220
221 return nullptr;
222}
font
Font Metadata and Metrics.

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