int get_native_mathex_param(int f, int n) { int rval = 0; if (n == math_quad) rval = fontsize[f]; else { if (n < sizeof(TeX_ext_to_OT_map) / sizeof(mathConstantIndex)) { mathConstantIndex ot_index = TeX_ext_to_OT_map[n]; if (ot_index != unknown) rval = get_ot_math_constant(f, (int)ot_index); } } // fprintf(stderr, " math_ex(%d, %d) returns %.3f\n", f, n, Fix2D(rval)); return rval; }
int get_native_mathsy_param(int f, int n) { int rval = 0; if (n == math_quad) { rval = fontsize[f]; } else if (n == delim2) { // XXX not sure what OT parameter we should use here; // for now we use 1.5em, clamped to delim1 height rval = std::min<int>(1.5 * fontsize[f], get_native_mathsy_param(f, delim1)); } else { if (n < sizeof(TeX_sym_to_OT_map) / sizeof(mathConstantIndex)) { mathConstantIndex ot_index = TeX_sym_to_OT_map[n]; if (ot_index != unknown) rval = get_ot_math_constant(f, (int)ot_index); } } // fprintf(stderr, " math_sy(%d, %d) returns %.3f\n", f, n, Fix2D(rval)); return rval; }