Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::Emboss::FontFile Struct Reference

keep information from file about font (store file data itself) More...

#include <src/libslic3r/Emboss.hpp>

+ Collaboration diagram for Slic3r::Emboss::FontFile:

Classes

struct  Info
 

Public Member Functions

 FontFile (std::unique_ptr< std::vector< unsigned char > > data, std::vector< Info > &&infos)
 
bool operator== (const FontFile &other) const
 

Public Attributes

std::unique_ptr< std::vector< unsigned char > > data
 
std::vector< Infoinfos
 

Detailed Description

keep information from file about font (store file data itself)

  • cache data readed from buffer

Class Documentation

◆ Slic3r::Emboss::FontFile::Info

struct Slic3r::Emboss::FontFile::Info
Class Members
int ascent
int descent
int linegap
int unit_per_em

Constructor & Destructor Documentation

◆ FontFile()

Slic3r::Emboss::FontFile::FontFile ( std::unique_ptr< std::vector< unsigned char > >  data,
std::vector< Info > &&  infos 
)
inline
82 : data(std::move(data)), infos(std::move(infos))
83 {
84 assert(this->data != nullptr);
85 assert(!this->data->empty());
86 }
std::vector< Info > infos
Definition Emboss.hpp:78
std::unique_ptr< std::vector< unsigned char > > data
Definition Emboss.hpp:67

Member Function Documentation

◆ operator==()

bool Slic3r::Emboss::FontFile::operator== ( const FontFile other) const
inline
88 {
89 if (data->size() != other.data->size())
90 return false;
91 //if(*data != *other.data) return false;
92 for (size_t i = 0; i < infos.size(); i++)
93 if (infos[i].ascent != other.infos[i].ascent ||
94 infos[i].descent == other.infos[i].descent ||
95 infos[i].linegap == other.infos[i].linegap)
96 return false;
97 return true;
98 }

References data, and infos.

Member Data Documentation

◆ data

◆ infos


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