Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
impeller::FontGlyphAtlas Class Reference

An object that can look up glyph locations within the GlyphAtlas for a particular typeface. More...

#include <glyph_atlas.h>

Public Member Functions

 FontGlyphAtlas ()=default
 
std::optional< RectFindGlyphBounds (const Glyph &glyph) const
 Find the location of a glyph in the atlas.
 

Friends

class GlyphAtlas
 

Detailed Description

An object that can look up glyph locations within the GlyphAtlas for a particular typeface.

Definition at line 185 of file glyph_atlas.h.

Constructor & Destructor Documentation

◆ FontGlyphAtlas()

impeller::FontGlyphAtlas::FontGlyphAtlas ( )
default

Member Function Documentation

◆ FindGlyphBounds()

std::optional< Rect > impeller::FontGlyphAtlas::FindGlyphBounds ( const Glyph glyph) const

Find the location of a glyph in the atlas.

Parameters
[in]glyphThe glyph
Returns
The location of the glyph in the atlas. std::nullopt if the glyph is not in the atlas.

Definition at line 111 of file glyph_atlas.cc.

111 {
112 const auto& found = positions_.find(glyph);
113 if (found == positions_.end()) {
114 return std::nullopt;
115 }
116 return found->second;
117}

Friends And Related Symbol Documentation

◆ GlyphAtlas

friend class GlyphAtlas
friend

Definition at line 200 of file glyph_atlas.h.


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