Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::text::Font::GlyphGrid Struct Reference

A grid representing a rendered glyph, with each grid pixel representing pixel coverage in the range (0,1). More...

#include "font.h"

Collaboration diagram for ion::text::Font::GlyphGrid:

Public Member Functions

 GlyphGrid ()
 
 GlyphGrid (size_t width, size_t height)
 
bool IsZeroSize () const
 Returns true if glyph x- or y-size is zero. More...
 

Public Attributes

base::Array2< double > pixels
 
bool is_sdf
 When a Font is set up for rendering, the pixels are replaced with a signed-distance field (SDF). More...
 

Detailed Description

A grid representing a rendered glyph, with each grid pixel representing pixel coverage in the range (0,1).

This is used internally to create signed-distance field images for a font.

Definition at line 48 of file font.h.

Constructor & Destructor Documentation

ion::text::Font::GlyphGrid::GlyphGrid ( )
inline

Definition at line 49 of file font.h.

ion::text::Font::GlyphGrid::GlyphGrid ( size_t  width,
size_t  height 
)

Definition at line 34 of file font.cc.

Member Function Documentation

bool ion::text::Font::GlyphGrid::IsZeroSize ( ) const

Returns true if glyph x- or y-size is zero.

Definition at line 37 of file font.cc.

Referenced by ion::text::Font::FilterGlyphs().

Member Data Documentation

bool ion::text::Font::GlyphGrid::is_sdf

When a Font is set up for rendering, the pixels are replaced with a signed-distance field (SDF).

This flag is set to true if the grid has SDF data (vs. the original rendered data).

Definition at line 61 of file font.h.

Referenced by ion::text::Font::CacheSdfGrid(), and ion::text::Font::CacheSdfGrids().

base::Array2<double> ion::text::Font::GlyphGrid::pixels
Todo:
(user): Try making this a smaller type than double.

Definition at line 53 of file font.h.

Referenced by ion::text::Font::CacheSdfGrid(), and ion::text::Font::CacheSdfGrids().


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