"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Plugins/Freetype/rubber_stix_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.

rubber_stix_font.cpp  (TeXmacs-1.99.4-src):rubber_stix_font.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 34 skipping to change at line 34
bool reg; bool reg;
array<bool> initialized; array<bool> initialized;
array<font> subfn; array<font> subfn;
hashmap<string,int> mapper; hashmap<string,int> mapper;
hashmap<string,string> rewriter; hashmap<string,string> rewriter;
hashmap<string,string> delimiter; hashmap<string,string> delimiter;
rubber_stix_font_rep (string name, font base); rubber_stix_font_rep (string name, font base);
font get_font_sub (int nr); font get_font_sub (int nr);
font get_font (int nr); font get_font (int nr);
int search_font_sub (string s, string& rew, string& ltype); int search_font_sub (string s, string& rew, string& ltype);
int search_font_cached (string s, string& rew, string& ltype); int search_font_cached (string s, string& rew, string& ltype);
font search_font (string& s, SI& dy, string& ltype); font search_font (string& s, SI& dy, string& ltype);
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 195 skipping to change at line 196
rew= s; rew= s;
return 2; return 2;
} }
if (starts (s, "<mid-")) s= "<left-" * s (5, N(s)); if (starts (s, "<mid-")) s= "<left-" * s (5, N(s));
if (starts (s, "<right-")) s= "<left-" * s (7, N(s)); if (starts (s, "<right-")) s= "<left-" * s (7, N(s));
if (starts (s, "<large-")) s= "<left-" * s (7, N(s)); if (starts (s, "<large-")) s= "<left-" * s (7, N(s));
if (starts (s, "<left-")) { if (starts (s, "<left-")) {
int pos= search_backwards ("-", N(s), s); int pos= search_backwards ("-", N(s), s);
if (pos > 6) ltype= s (6, pos); if (pos > 6) ltype= s (6, pos);
} }
if (starts (s, "<left-.")) {
rew= "";
return 0;
}
if (starts (s, "<left-|") || starts (s, "<left-interleave-")) { if (starts (s, "<left-|") || starts (s, "<left-interleave-")) {
int nr= large_size (s); int nr= large_size (s);
if (nr <= 0) { if (nr <= 0) {
string r= large_type (s); string r= large_type (s);
r= r (5, N(r)); r= r (5, N(r));
if (N(r) > 1) r= "<" * r * ">"; if (N(r) > 1) r= "<" * r * ">";
rew= r; rew= r;
return 0; return 0;
} }
else { else {
skipping to change at line 496 skipping to change at line 501
void void
rubber_stix_font_rep::draw_fixed (renderer ren, string s, SI x, SI y, SI xk) { rubber_stix_font_rep::draw_fixed (renderer ren, string s, SI x, SI y, SI xk) {
SI dy; SI dy;
string ltype; string ltype;
font fn= search_font (s, dy, ltype); font fn= search_font (s, dy, ltype);
fn->draw_fixed (ren, s, x, y + dy, xk); fn->draw_fixed (ren, s, x, y + dy, xk);
} }
font font
rubber_stix_font_rep::magnify (double zoom) { rubber_stix_font_rep::magnify (double zoomx, double zoomy) {
return rubber_stix_font (base->magnify (zoom)); return rubber_stix_font (base->magnify (zoomx, zoomy));
} }
glyph glyph
rubber_stix_font_rep::get_glyph (string s) { rubber_stix_font_rep::get_glyph (string s) {
SI dy; SI dy;
string ltype; string ltype;
font fn= search_font (s, dy, ltype); font fn= search_font (s, dy, ltype);
return move (fn->get_glyph (s), 0, dy); return move (fn->get_glyph (s), 0, dy);
} }
int
rubber_stix_font_rep::index_glyph (string s, font_metric& fnm,
font_glyphs& fng) {
SI dy;
string ltype;
font fn= search_font (s, dy, ltype);
if (dy != 0) cout << "TeXmacs] warning: glyph offset ignored\n";
return fn->index_glyph (s, fnm, fng);
}
/****************************************************************************** /******************************************************************************
* Metric properties * Metric properties
******************************************************************************/ ******************************************************************************/
double double
rubber_stix_font_rep::get_left_slope (string s) { rubber_stix_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. 4 change blocks. 
17 lines changed or deleted 32 lines changed or added

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