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)  

DvipsEncoding Class Reference

#include <dvipsencoding.hh>

Collaboration diagram for DvipsEncoding:
[legend]

Classes

struct  Ligature
 
struct  WordType
 

Public Types

enum  {
  JT_KERN = 32 , JT_LIG = 64 , JT_ADDLIG = 128 , JT_LIGALL = 199 ,
  JL_LIG = JT_LIG | JT_ADDLIG , JL_CLIG = JL_LIG | 1 , JL_CLIG_S = JL_LIG | 2 , JL_LIGC = JL_LIG | 3 ,
  JL_LIGC_S = JL_LIG | 4 , JL_CLIGC = JL_LIG | 5 , JL_CLIGC_S = JL_LIG | 6 , JL_CLIGC_SS = JL_LIG | 7 ,
  JT_NOLIGKERN = JT_KERN | JT_LIG , J_ALL = 0x7FFFFFFF
}
 

Public Member Functions

 DvipsEncoding ()
 
 operator bool () const
 
const Stringname () const
 
const Stringfilename () const
 
int boundary_char () const
 
const Stringcoding_scheme () const
 
void set_coding_scheme (const String &s)
 
void set_warn_missing (bool wm)
 
void encode (int, PermString)
 
int encoding_of (PermString) const
 
int encoding_of (PermString, bool encode)
 
bool encoded (int e) const
 
PermString encoding (int e) const
 
int encoding_size () const
 
int parse (String filename, bool ignore_ligkern, bool ignore_other, ErrorHandler *)
 
int parse_ligkern (const String &ligkern_text, int override, ErrorHandler *)
 
int parse_position (const String &ligkern_text, int override, ErrorHandler *)
 
int parse_unicoding (const String &unicoding_text, int override, ErrorHandler *)
 
bool file_had_ligkern () const
 
void make_metrics (Metrics &, const FontInfo &, Secondary *, bool literal, ErrorHandler *)
 
void make_base_mappings (Vector< int > &mappings, const FontInfo &)
 
void apply_ligkern_lig (Metrics &, ErrorHandler *) const
 
void apply_ligkern_kern (Metrics &, ErrorHandler *) const
 
void apply_position (Metrics &, ErrorHandler *) const
 

Static Public Member Functions

static void add_glyphlist (String)
 

Private Types

enum  { WT_LIGKERN = 0 , WT_POSITION , WT_UNICODING }
 
enum  { EPARSE = 90000 }
 

Private Member Functions

void add_ligkern (const Ligature &, int override)
 
int parse_ligkern_words (Vector< String > &, int override, ErrorHandler *)
 
int parse_position_words (Vector< String > &, int override, ErrorHandler *)
 
int parse_unicoding_words (Vector< String > &, int override, ErrorHandler *)
 
void parse_word_group (Vector< String > &, int override, int wt, ErrorHandler *)
 
int parse_words (const String &, int override, int wt, ErrorHandler *)
 
void bad_codepoint (int, Metrics &, HashMap< PermString, int > &bad_unicodes)
 
bool x_unicodes (PermString chname, Vector< uint32_t > &unicodes) const
 
String landmark (int line) const
 

Static Private Member Functions

static bool glyphname_unicode (String, Vector< uint32_t > &)
 

Private Attributes

Vector< PermString_e
 
Vector< bool_encoding_required
 
int _boundary_char
 
int _altselector_char
 
Vector< Ligature_lig
 
Vector< Ligature_pos
 
HashMap< PermString, int_unicoding_map
 
Vector< uint32_t_unicoding
 
Vector< uint32_t_unicodes
 
String _name
 
String _filename
 
String _printable_filename
 
String _coding_scheme
 
String _initial_comment
 
String _final_text
 
bool _file_had_ligkern
 
bool _warn_missing
 

Static Private Attributes

static const WordType word_types []
 
static PermString dot_notdef
 

Friends

bool operator== (const Ligature &, const Ligature &)
 

Detailed Description

Definition at line 10 of file dvipsencoding.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
JT_KERN 
JT_LIG 
JT_ADDLIG 
JT_LIGALL 
JL_LIG 
JL_CLIG 
JL_CLIG_S 
JL_LIGC 
JL_LIGC_S 
JL_CLIGC 
JL_CLIGC_S 
JL_CLIGC_SS 
JT_NOLIGKERN 
J_ALL 

Definition at line 46 of file dvipsencoding.hh.

◆ anonymous enum

anonymous enum
private
Enumerator
WT_LIGKERN 
WT_POSITION 
WT_UNICODING 

Definition at line 86 of file dvipsencoding.hh.

◆ anonymous enum

anonymous enum
private
Enumerator
EPARSE 

Definition at line 89 of file dvipsencoding.hh.

Constructor & Destructor Documentation

◆ DvipsEncoding()

DvipsEncoding::DvipsEncoding ( )

Definition at line 187 of file dvipsencoding.cc.

Member Function Documentation

◆ add_glyphlist()

void DvipsEncoding::add_glyphlist ( String  text)
static

Definition at line 41 of file dvipsencoding.cc.

References end, glyphlist, GLYPHLIST_ALTERNATIVE, GLYPHLIST_USEMAP, glyphmap, isspace, s, and u.

Referenced by main().

◆ add_ligkern()

void DvipsEncoding::add_ligkern ( const Ligature l,
int  override 
)
private

◆ apply_ligkern_kern()

void DvipsEncoding::apply_ligkern_kern ( Metrics metrics,
ErrorHandler  
) const

Definition at line 965 of file dvipsencoding.cc.

References assert(), Metrics::CODE_ALL, J_ALL, JT_KERN, and cutout::l.

Referenced by do_file().

◆ apply_ligkern_lig()

void DvipsEncoding::apply_ligkern_lig ( Metrics metrics,
ErrorHandler errh 
) const

◆ apply_position()

void DvipsEncoding::apply_position ( Metrics metrics,
ErrorHandler  
) const

Definition at line 974 of file dvipsencoding.cc.

References _pos, and cutout::l.

Referenced by do_file().

◆ bad_codepoint()

void DvipsEncoding::bad_codepoint ( int  code,
Metrics metrics,
HashMap< PermString, int > &  bad_unicodes 
)
private

◆ boundary_char()

int DvipsEncoding::boundary_char ( ) const
inline

Definition at line 19 of file dvipsencoding.hh.

References _boundary_char.

Referenced by do_file(), do_gsub(), and do_math_spacing().

◆ coding_scheme()

const String& DvipsEncoding::coding_scheme ( ) const
inline

Definition at line 20 of file dvipsencoding.hh.

References _coding_scheme.

◆ encode()

void DvipsEncoding::encode ( int  e,
PermString  what 
)

Definition at line 194 of file dvipsencoding.cc.

References _e, dot_notdef, e, and gen-indic-table::what.

Referenced by encoding_of(), main(), and parse_ligkern_words().

◆ encoded()

bool DvipsEncoding::encoded ( int  e) const
inline

Definition at line 108 of file dvipsencoding.hh.

References _e, dot_notdef, and e.

Referenced by encoding(), make_metrics(), and Metrics::shrink_encoding().

◆ encoding()

PermString DvipsEncoding::encoding ( int  e) const
inline

Definition at line 114 of file dvipsencoding.hh.

References _e, e, and encoded().

Referenced by Metrics::apply_base_encoding().

◆ encoding_of() [1/2]

int DvipsEncoding::encoding_of ( PermString  what) const
inline

◆ encoding_of() [2/2]

int DvipsEncoding::encoding_of ( PermString  what,
bool  encode 
)

◆ encoding_size()

int DvipsEncoding::encoding_size ( ) const
inline

Definition at line 29 of file dvipsencoding.hh.

References _e.

◆ file_had_ligkern()

bool DvipsEncoding::file_had_ligkern ( ) const
inline

Definition at line 36 of file dvipsencoding.hh.

References _file_had_ligkern.

◆ filename()

const String& DvipsEncoding::filename ( ) const
inline

Definition at line 18 of file dvipsencoding.hh.

References _filename.

Referenced by do_file(), and parse().

◆ glyphname_unicode()

◆ landmark()

String DvipsEncoding::landmark ( int  line) const
private

Definition at line 590 of file dvipsencoding.cc.

References _printable_filename, line, and StringAccum::take_string().

Referenced by parse().

◆ make_base_mappings()

void DvipsEncoding::make_base_mappings ( Vector< int > &  mappings,
const FontInfo finfo 
)

◆ make_metrics()

◆ name()

◆ operator bool()

DvipsEncoding::operator bool ( ) const
inline

Definition at line 16 of file dvipsencoding.hh.

References _e.

◆ parse()

◆ parse_ligkern()

int DvipsEncoding::parse_ligkern ( const String ligkern_text,
int  override,
ErrorHandler errh 
)

Definition at line 703 of file dvipsencoding.cc.

References errh, parse_words(), and WT_LIGKERN.

Referenced by main().

◆ parse_ligkern_words()

int DvipsEncoding::parse_ligkern_words ( Vector< String > &  v,
int  override,
ErrorHandler errh 
)
private

◆ parse_position()

int DvipsEncoding::parse_position ( const String ligkern_text,
int  override,
ErrorHandler errh 
)

Definition at line 709 of file dvipsencoding.cc.

References errh, parse_words(), and WT_POSITION.

Referenced by main().

◆ parse_position_words()

int DvipsEncoding::parse_position_words ( Vector< String > &  v,
int  override,
ErrorHandler errh 
)
private

◆ parse_unicoding()

int DvipsEncoding::parse_unicoding ( const String unicoding_text,
int  override,
ErrorHandler errh 
)

Definition at line 715 of file dvipsencoding.cc.

References errh, parse_words(), and WT_UNICODING.

Referenced by main().

◆ parse_unicoding_words()

int DvipsEncoding::parse_unicoding_words ( Vector< String > &  v,
int  override,
ErrorHandler errh 
)
private

◆ parse_word_group()

void DvipsEncoding::parse_word_group ( Vector< String > &  words,
int  override,
int  wt,
ErrorHandler errh 
)
private

◆ parse_words()

int DvipsEncoding::parse_words ( const String s,
int  override,
int  wt,
ErrorHandler errh 
)
private

Definition at line 568 of file dvipsencoding.cc.

References data, end, errh, first, isspace, parse_word_group(), s, and words.

Referenced by parse(), parse_ligkern(), parse_position(), and parse_unicoding().

◆ set_coding_scheme()

void DvipsEncoding::set_coding_scheme ( const String s)
inline

Definition at line 21 of file dvipsencoding.hh.

References _coding_scheme, and s.

Referenced by main().

◆ set_warn_missing()

void DvipsEncoding::set_warn_missing ( bool  wm)
inline

Definition at line 22 of file dvipsencoding.hh.

References _warn_missing.

Referenced by main().

◆ x_unicodes()

bool DvipsEncoding::x_unicodes ( PermString  chname,
Vector< uint32_t > &  unicodes 
) const
private

Definition at line 754 of file dvipsencoding.cc.

References _unicoding, _unicoding_map, glyphname_unicode(), i, and Vector< T >::push_back().

Referenced by bad_codepoint(), and make_metrics().

Friends And Related Function Documentation

◆ operator==

bool operator== ( const Ligature l1,
const Ligature l2 
)
friend

Definition at line 361 of file dvipsencoding.cc.

Member Data Documentation

◆ _altselector_char

int DvipsEncoding::_altselector_char
private

Definition at line 63 of file dvipsencoding.hh.

Referenced by make_metrics(), and parse_ligkern_words().

◆ _boundary_char

int DvipsEncoding::_boundary_char
private

Definition at line 62 of file dvipsencoding.hh.

Referenced by boundary_char(), encoding_of(), and parse_ligkern_words().

◆ _coding_scheme

String DvipsEncoding::_coding_scheme
private

Definition at line 75 of file dvipsencoding.hh.

Referenced by coding_scheme(), make_metrics(), parse(), and set_coding_scheme().

◆ _e

◆ _encoding_required

Vector<bool> DvipsEncoding::_encoding_required
private

Definition at line 61 of file dvipsencoding.hh.

Referenced by encoding_of(), and make_metrics().

◆ _file_had_ligkern

bool DvipsEncoding::_file_had_ligkern
private

Definition at line 78 of file dvipsencoding.hh.

Referenced by file_had_ligkern(), parse(), and parse_ligkern_words().

◆ _filename

String DvipsEncoding::_filename
private

Definition at line 73 of file dvipsencoding.hh.

Referenced by filename(), and parse().

◆ _final_text

String DvipsEncoding::_final_text
private

Definition at line 77 of file dvipsencoding.hh.

Referenced by parse().

◆ _initial_comment

String DvipsEncoding::_initial_comment
private

Definition at line 76 of file dvipsencoding.hh.

Referenced by parse().

◆ _lig

Vector<Ligature> DvipsEncoding::_lig
private

Definition at line 65 of file dvipsencoding.hh.

◆ _name

String DvipsEncoding::_name
private

Definition at line 72 of file dvipsencoding.hh.

Referenced by name(), and parse().

◆ _pos

Vector<Ligature> DvipsEncoding::_pos
private

Definition at line 66 of file dvipsencoding.hh.

Referenced by apply_position(), and parse_position_words().

◆ _printable_filename

String DvipsEncoding::_printable_filename
private

Definition at line 74 of file dvipsencoding.hh.

Referenced by landmark(), and parse().

◆ _unicodes

Vector<uint32_t> DvipsEncoding::_unicodes
mutableprivate

Definition at line 70 of file dvipsencoding.hh.

◆ _unicoding

Vector<uint32_t> DvipsEncoding::_unicoding
private

Definition at line 68 of file dvipsencoding.hh.

Referenced by parse_unicoding_words(), and x_unicodes().

◆ _unicoding_map

HashMap<PermString, int> DvipsEncoding::_unicoding_map
private

Definition at line 67 of file dvipsencoding.hh.

Referenced by parse_unicoding_words(), and x_unicodes().

◆ _warn_missing

bool DvipsEncoding::_warn_missing
private

Definition at line 79 of file dvipsencoding.hh.

Referenced by bad_codepoint(), parse(), and set_warn_missing().

◆ dot_notdef

PermString DvipsEncoding::dot_notdef
staticprivate

◆ word_types

const DvipsEncoding::WordType DvipsEncoding::word_types
staticprivate
Initial value:
= {
}
int parse_ligkern_words(Vector< String > &, int override, ErrorHandler *)
int parse_unicoding_words(Vector< String > &, int override, ErrorHandler *)
int parse_position_words(Vector< String > &, int override, ErrorHandler *)

Definition at line 85 of file dvipsencoding.hh.

Referenced by parse_word_group().


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