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)  

gr_char_info.cpp File Reference
#include <cassert>
#include "graphite2/Segment.h"
#include "inc/CharInfo.h"
Include dependency graph for gr_char_info.cpp:

Go to the source code of this file.

Functions

unsigned int gr_cinfo_unicode_char (const gr_char_info *p)
 
int gr_cinfo_break_weight (const gr_char_info *p)
 
int gr_cinfo_after (const gr_char_info *p)
 
int gr_cinfo_before (const gr_char_info *p)
 
size_t gr_cinfo_base (const gr_char_info *p)
 

Function Documentation

◆ gr_cinfo_after()

int gr_cinfo_after ( const gr_char_info p)

Returns the slot index that after this character is after in the slot stream

In effect each character is associated with a set of slots and this returns the index of the last slot in the segment this character is associated with.

Returns
after slot index between 0 and gr_seg_n_slots()
Parameters
pPointer to charinfo to return information on.

Definition at line 47 of file gr_char_info.cpp.

References assert(), and p.

◆ gr_cinfo_base()

size_t gr_cinfo_base ( const gr_char_info p)

Returns the code unit index of this character in the input string

Returns
code unit index between 0 and the end of the string
Parameters
pPointer to charinfo to return information on.

Definition at line 59 of file gr_char_info.cpp.

References assert(), and p.

Referenced by findNextGraphiteBreak().

◆ gr_cinfo_before()

int gr_cinfo_before ( const gr_char_info p)

Returns the slot index that before this character is before in the slot stream

In effect each character is associated with a set of slots and this returns the index of the first slot in the segment this character is associated with.

Returns
before slot index between 0 and gr_seg_n_slots()
Parameters
pPointer to charinfo to return information on.

Definition at line 53 of file gr_char_info.cpp.

References assert(), and p.

◆ gr_cinfo_break_weight()

int gr_cinfo_break_weight ( const gr_char_info p)

Returns breakweight for a charinfo.

Returns
Breakweight is a number between -50 and 50 indicating the cost of a break before or after this character. If the value < 0, the absolute value is this character's contribution to the overall breakweight before it. If the value

0, then the value is this character's contribution to the overall breakweight after it.

The overall breakweight between two characters is the maximum of the breakweight contributions from the characters either side of it. If a character makes no contribution to the breakweight on one side of it, the contribution is considered to be 0.
Parameters
pPointer to charinfo to return information on.

Definition at line 41 of file gr_char_info.cpp.

References assert(), and p.

Referenced by findNextGraphiteBreak().

◆ gr_cinfo_unicode_char()

unsigned int gr_cinfo_unicode_char ( const gr_char_info p)

Returns Unicode character for a charinfo.

Parameters
pPointer to charinfo to return information on.

Definition at line 34 of file gr_char_info.cpp.

References assert(), and p.