"Fossies" - the Fresh Open Source Software Archive  

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

tt_analyze.cpp  (TeXmacs-1.99.4-src):tt_analyze.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 71 skipping to change at line 71
metric_struct* m= fnm->get (test); metric_struct* m= fnm->get (test);
int pw= m->x4 - m->x3; int pw= m->x4 - m->x3;
int lw= m->x2 - m->x1; int lw= m->x2 - m->x1;
if (7 * pw < 6 * lw) return false; if (7 * pw < 6 * lw) return false;
} }
return true; return true;
} }
void void
analyze_range (font fn, font_metric fnm, array<string>& r, string family) { analyze_range (font fn, font_metric fnm, array<string>& r, string family) {
(void) fn;
bool ec= starts (family, "ec") && ends (family, "10"); bool ec= starts (family, "ec") && ends (family, "10");
string lfn= locase_all (family); string lfn= locase_all (family);
if (starts (lfn, "lastresort") || if (starts (lfn, "lastresort") ||
starts (lfn, "tex ams blackboard bold") || starts (lfn, "tex ams blackboard bold") ||
(starts (lfn, "tex blackboard bold") && (starts (lfn, "tex blackboard bold") &&
!starts (lfn, "tex blackboard bold variant")) || !starts (lfn, "tex blackboard bold variant")) ||
starts (lfn, "tex calligraphic capitals") || starts (lfn, "tex calligraphic capitals") ||
starts (lfn, "tex double stroke") || starts (lfn, "tex double stroke") ||
starts (lfn, "tex ralph smith")) starts (lfn, "tex ralph smith"))
return; return;
skipping to change at line 535 skipping to change at line 536
d_ex + d_em + d_lvw + d_lhw + d_fillp + d_vcnt + d_ex + d_em + d_lvw + d_lhw + d_fillp + d_vcnt +
d_lasprat + d_pasprat + d_lasprat + d_pasprat +
d_loasc + d_lodes + d_dides + d_slant; d_loasc + d_lodes + d_dides + d_slant;
//+ d_upw + d_uph + d_upc + d_low + d_loh + d_loc; //+ d_upw + d_uph + d_upc + d_low + d_loh + d_loc;
//cout << a1 << ", " << a2 << "\n"; //cout << a1 << ", " << a2 << "\n";
//cout << " ----> " << d_fillp << ", " << d_vcnt << ", " << r << "\n"; //cout << " ----> " << d_fillp << ", " << d_vcnt << ", " << r << "\n";
return r; return r;
} }
/****************************************************************************** /******************************************************************************
* Nice accessors
******************************************************************************/
static double
get_ratio (array<string> a, string prop) {
string ex = find_attribute_value (a, "ex");
string val= find_attribute_value (a, prop);
if (ex == "" || val == "" || as_double (ex) == 0.0) return 0.0;
return as_double (val) / as_double (ex);
}
double get_M_width (array<string> a) { return get_ratio (a, "em"); }
double get_lo_pen_width (array<string> a) { return get_ratio (a, "lvw"); }
double get_lo_pen_height (array<string> a) { return get_ratio (a, "lhw"); }
double get_up_pen_width (array<string> a) { return get_ratio (a, "uvw"); }
double get_up_pen_height (array<string> a) { return get_ratio (a, "uhw"); }
/******************************************************************************
* Master routine * Master routine
******************************************************************************/ ******************************************************************************/
extern bool get_glyph_fatal; extern bool get_glyph_fatal;
array<string> array<string>
tt_analyze (string family) { tt_analyze (string family) {
array<string> r; array<string> r;
font fn= tt_font (family, 10, 1200); font fn= tt_font (family, 10, 1200);
font_metric fnm= tt_font_metric (family, 10, 1200); font_metric fnm= tt_font_metric (family, 10, 1200, 1200);
//cout << "Analyzing " << family << "\n"; //cout << "Analyzing " << family << "\n";
get_glyph_fatal= false; get_glyph_fatal= false;
analyze_range (fn, fnm, r, family); analyze_range (fn, fnm, r, family);
analyze_special (fn, fnm, r); analyze_special (fn, fnm, r);
analyze_major (fn, fnm, r); analyze_major (fn, fnm, r);
//analyze_trace (fn, fnm, r); //analyze_trace (fn, fnm, r);
get_glyph_fatal= true; get_glyph_fatal= true;
//cout << " -> " << r << "\n"; //cout << " -> " << r << "\n";
skipping to change at line 568 skipping to change at line 587
#else #else
array<string> array<string>
tt_analyze (string family) { tt_analyze (string family) {
(void) family; (void) family;
array<string> r; array<string> r;
return r; return r;
} }
double double trace_distance (string v1, string v2, double m) { return 0; }
trace_distance (string v1, string v2, double m) { string find_attribute_value (array<string> a, string s) { return ""; }
return 0; int characteristic_distance (array<string> a, array<string> s) { return 0; }
}
double get_M_width (array<string> a) { return 0.0; }
string double get_lo_pen_width (array<string> a) { return 0.0; }
find_attribute_value (array<string> a, string s) { double get_lo_pen_height (array<string> a) { return 0.0; }
return ""; double get_up_pen_width (array<string> a) { return 0.0; }
} double get_up_pen_height (array<string> a) { return 0.0; }
int
characteristic_distance (array<string> a, array<string> s) {
return 0;
}
#endif // USE_FREETYPE #endif // USE_FREETYPE
 End of changes. 4 change blocks. 
15 lines changed or deleted 29 lines changed or added

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