w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Efont::OpenType::Cmap Class Reference

#include <otfcmap.hh>

Public Member Functions

 Cmap (const String &, ErrorHandler *=0)
 
bool ok () const
 
int error () const
 
Glyph map_uni (uint32_t c) const
 
int map_uni (const Vector< uint32_t > &in, Vector< Glyph > &out) const
 
void unmap_all (Vector< std::pair< uint32_t, Glyph > > &ugp) const
 

Private Types

enum  { HEADER_SIZE = 4 , ENCODING_SIZE = 8 , HIBYTE_SUBHEADERS = 524 }
 
enum  Format {
  F_BYTE = 0 , F_HIBYTE = 2 , F_SEGMENTED = 4 , F_TRIMMED = 6 ,
  F_HIBYTE32 = 8 , F_TRIMMED32 = 10 , F_SEGMENTED32 = 12
}
 
enum  { USE_FIRST_UNICODE_TABLE = -2 }
 

Private Member Functions

int parse_header (ErrorHandler *)
 
int first_unicode_table () const
 
int first_table (int platform, int encoding) const
 
int check_table (int t, ErrorHandler *=0) const
 
Glyph map_table (int t, uint32_t, ErrorHandler *=0) const
 
void dump_table (int t, Vector< std::pair< uint32_t, Glyph > > &ugp, ErrorHandler *=0) const
 
const uint8_ttable_data (int t) const
 

Private Attributes

String _str
 
int _error
 
int _ntables
 
int _first_unicode_table
 
Vector< int_table_error
 

Detailed Description

Definition at line 9 of file otfcmap.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
HEADER_SIZE 
ENCODING_SIZE 
HIBYTE_SUBHEADERS 

Definition at line 29 of file otfcmap.hh.

◆ anonymous enum

anonymous enum
private
Enumerator
USE_FIRST_UNICODE_TABLE 

Definition at line 33 of file otfcmap.hh.

◆ Format

Enumerator
F_BYTE 
F_HIBYTE 
F_SEGMENTED 
F_TRIMMED 
F_HIBYTE32 
F_TRIMMED32 
F_SEGMENTED32 

Definition at line 31 of file otfcmap.hh.

Constructor & Destructor Documentation

◆ Cmap()

Efont::OpenType::Cmap::Cmap ( const String s,
ErrorHandler errh = 0 
)

Definition at line 33 of file otfcmap.cc.

References _error, _str, String::align(), errh, parse_header(), and ErrorHandler::silent_handler().

Member Function Documentation

◆ check_table()

◆ dump_table()

void Efont::OpenType::Cmap::dump_table ( int  t,
Vector< std::pair< uint32_t, Glyph > > &  ugp,
ErrorHandler errh = 0 
) const
private

◆ error()

int Efont::OpenType::Cmap::error ( ) const
inline

Definition at line 15 of file otfcmap.hh.

References _error.

Referenced by first_table().

◆ first_table()

int Efont::OpenType::Cmap::first_table ( int  platform,
int  encoding 
) const
private

Definition at line 106 of file otfcmap.cc.

References _ntables, _str, data, e, ENCODING_SIZE, error(), HEADER_SIZE, i, p, platform, String::udata(), and USHORT_AT.

◆ first_unicode_table()

int Efont::OpenType::Cmap::first_unicode_table ( ) const
inlineprivate

Definition at line 36 of file otfcmap.hh.

References _first_unicode_table.

◆ map_table()

Glyph Efont::OpenType::Cmap::map_table ( int  t,
uint32_t  uni,
ErrorHandler errh = 0 
) const
private

◆ map_uni() [1/2]

int Efont::OpenType::Cmap::map_uni ( const Vector< uint32_t > &  in,
Vector< Glyph > &  out 
) const

Definition at line 451 of file otfcmap.cc.

References check_table(), i, map_table(), Vector< T >::size(), t, USE_FIRST_UNICODE_TABLE, and vout.

◆ map_uni() [2/2]

Glyph Efont::OpenType::Cmap::map_uni ( uint32_t  c) const
inline

Definition at line 46 of file otfcmap.hh.

References c, ErrorHandler::default_handler(), map_table(), and USE_FIRST_UNICODE_TABLE.

Referenced by char_bounds(), and SettingSet::show().

◆ ok()

bool Efont::OpenType::Cmap::ok ( ) const
inline

Definition at line 14 of file otfcmap.hh.

References _error.

Referenced by FontInfo::FontInfo(), and FontInfo::ok().

◆ parse_header()

◆ table_data()

const uint8_t * Efont::OpenType::Cmap::table_data ( int  t) const
inlineprivate

◆ unmap_all()

void Efont::OpenType::Cmap::unmap_all ( Vector< std::pair< uint32_t, Glyph > > &  ugp) const
inline

Definition at line 50 of file otfcmap.hh.

References ErrorHandler::default_handler(), dump_table(), and USE_FIRST_UNICODE_TABLE.

Member Data Documentation

◆ _error

int Efont::OpenType::Cmap::_error
private

Definition at line 24 of file otfcmap.hh.

Referenced by check_table(), Cmap(), error(), and ok().

◆ _first_unicode_table

int Efont::OpenType::Cmap::_first_unicode_table
mutableprivate

Definition at line 26 of file otfcmap.hh.

Referenced by check_table(), first_unicode_table(), and parse_header().

◆ _ntables

int Efont::OpenType::Cmap::_ntables
private

Definition at line 25 of file otfcmap.hh.

Referenced by check_table(), first_table(), and parse_header().

◆ _str

String Efont::OpenType::Cmap::_str
private

Definition at line 23 of file otfcmap.hh.

Referenced by check_table(), Cmap(), first_table(), parse_header(), and table_data().

◆ _table_error

Vector<int> Efont::OpenType::Cmap::_table_error
mutableprivate

Definition at line 27 of file otfcmap.hh.

Referenced by check_table(), and parse_header().


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