"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Plugins/Freetype/unicode_math_font.cpp" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

unicode_math_font.cpp  (TeXmacs-1.99.4-src):unicode_math_font.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 34 skipping to change at line 34
font bold_upright; font bold_upright;
font bold_italic; font bold_italic;
font fall_back; font fall_back;
hashmap<string,int> mapper; hashmap<string,int> mapper;
hashmap<string,string> rewriter; hashmap<string,string> rewriter;
unicode_math_font_rep (string name, unicode_math_font_rep (string name,
font upright, font italic, font upright, font italic,
font bold_upright, font bold_italic, font bold_upright, font bold_italic,
font fall_back); font fall_back);
int search_font_sub (string s); int search_font_sub (string s);
font search_font (string& s); font search_font (string& s);
bool supports (string c); bool supports (string c);
void get_extents (string s, metric& ex); void get_extents (string s, metric& ex);
void get_xpositions (string s, SI* xpos); void get_xpositions (string s, SI* xpos);
void get_xpositions (string s, SI* xpos, SI xk); void get_xpositions (string s, SI* xpos, SI xk);
void draw_fixed (renderer ren, string s, SI x, SI y); void draw_fixed (renderer ren, string s, SI x, SI y);
void draw_fixed (renderer ren, string s, SI x, SI y, SI xk); void draw_fixed (renderer ren, string s, SI x, SI y, SI xk);
font magnify (double zoom); font magnify (double zoomx, double zoomy);
glyph get_glyph (string s); glyph get_glyph (string s);
int index_glyph (string s, font_metric& fnm, font_glyphs& fng);
double get_left_slope (string s); double get_left_slope (string s);
double get_right_slope (string s); double get_right_slope (string s);
SI get_left_correction (string s); SI get_left_correction (string s);
SI get_right_correction (string s); SI get_right_correction (string s);
}; };
/****************************************************************************** /******************************************************************************
* Initialization of main font parameters * Initialization of main font parameters
******************************************************************************/ ******************************************************************************/
skipping to change at line 72 skipping to change at line 73
{ {
this->copy_math_pars (it); this->copy_math_pars (it);
} }
/****************************************************************************** /******************************************************************************
* Find the font and the corresponding character * Find the font and the corresponding character
******************************************************************************/ ******************************************************************************/
static bool static bool
unicode_provides (string s) { unicode_provides (string s) {
return cork_to_utf8 (s) != s; return strict_cork_to_utf8 (s) != s;
} }
static unsigned int static unsigned int
cork_to_unicode (string s) { cork_to_unicode (string s) {
int i= 0; int i= 0;
return decode_from_utf8 (cork_to_utf8 (s), i); return decode_from_utf8 (strict_cork_to_utf8 (s), i);
} }
//static string //static string
//unicode_to_hexcode (unsigned int i) { //unicode_to_hexcode (unsigned int i) {
// return "<#" * as_hexadecimal (i) * ">"; // return "<#" * as_hexadecimal (i) * ">";
//} //}
int int
unicode_math_font_rep::search_font_sub (string s) { unicode_math_font_rep::search_font_sub (string s) {
//cout << "Searching " << s << "\n"; //cout << "Searching " << s << "\n";
skipping to change at line 238 skipping to change at line 239
fn->draw_fixed (ren, s, x, y); fn->draw_fixed (ren, s, x, y);
} }
void void
unicode_math_font_rep::draw_fixed (renderer ren, string s, SI x, SI y, SI xk) { unicode_math_font_rep::draw_fixed (renderer ren, string s, SI x, SI y, SI xk) {
font fn= search_font (s); font fn= search_font (s);
fn->draw_fixed (ren, s, x, y, xk); fn->draw_fixed (ren, s, x, y, xk);
} }
font font
unicode_math_font_rep::magnify (double zoom) { unicode_math_font_rep::magnify (double zoomx, double zoomy) {
return unicode_math_font (upright->magnify (zoom), return unicode_math_font (upright->magnify (zoomx, zoomy),
italic->magnify (zoom), italic->magnify (zoomx, zoomy),
bold_upright->magnify (zoom), bold_upright->magnify (zoomx, zoomy),
bold_italic->magnify (zoom), bold_italic->magnify (zoomx, zoomy),
fall_back->magnify (zoom)); fall_back->magnify (zoomx, zoomy));
} }
glyph glyph
unicode_math_font_rep::get_glyph (string s) { unicode_math_font_rep::get_glyph (string s) {
font fn= search_font (s); font fn= search_font (s);
return fn->get_glyph (s); return fn->get_glyph (s);
} }
int
unicode_math_font_rep::index_glyph (string s, font_metric& fnm,
font_glyphs& fng) {
font fn= search_font (s);
return fn->index_glyph (s, fnm, fng);
}
/****************************************************************************** /******************************************************************************
* Metric properties * Metric properties
******************************************************************************/ ******************************************************************************/
double double
unicode_math_font_rep::get_left_slope (string s) { unicode_math_font_rep::get_left_slope (string s) {
font fn= search_font (s); font fn= search_font (s);
return fn->get_left_slope (s); return fn->get_left_slope (s);
} }
 End of changes. 6 change blocks. 
18 lines changed or deleted 26 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS