Skip to content

Commit

Permalink
format code and update test document
Browse files Browse the repository at this point in the history
  • Loading branch information
KeShih committed Oct 6, 2024
1 parent aac5876 commit 51ff998
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 51 deletions.
23 changes: 0 additions & 23 deletions 80_6.tmu

This file was deleted.

40 changes: 40 additions & 0 deletions devel/80_6.tmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<TMU|<tuple|1.0.4|1.2.9.3-rc2>>

<style|<tuple|generic|chinese>>

<\body>
Asana Math:

<\equation*>
<around*|{|<sqrt|1234|abc>|}><sqrt|1+<sqrt|2+<sqrt|3+<sqrt|4+<sqrt|5+<sqrt|6+<sqrt|7+<sqrt|8+\<cdots\>>>>>>>>>
</equation*>

Fira Math:

<\equation*>
<with|font|Fira Math|<around*|{|<sqrt|1234|abc>|}><sqrt|1+<sqrt|2+<sqrt|3+<sqrt|4+<sqrt|5+<sqrt|6+<sqrt|7+<sqrt|8+\<cdots\>>>>>>>>>>
</equation*>

TeX Gyre Pagella Math:

<\equation*>
<with|font|TeX Gyre Pagella Math|<around*|{|<sqrt|1234|abc>|}><sqrt|1+<sqrt|2+<sqrt|3+<sqrt|4+<sqrt|5+<sqrt|6+<sqrt|7+<sqrt|8+\<cdots\>>>>>>>>>>
</equation*>

\ TeX Gyre Schola Math:

<with|font|TeX Gyre Schola Math|<\equation*>
<around*|{|<sqrt|1234|abc>|}><sqrt|1+<sqrt|2+<sqrt|3+<sqrt|4+<sqrt|5+<sqrt|6+<sqrt|7+<sqrt|8+\<cdots\>>>>>>>>>
</equation*>>
</body>

<\initial>
<\collection>
<associate|font|Asana Math>
<associate|font-family|rm>
<associate|font-shape|italic>
<associate|math-font|math-dejavu>
<associate|page-medium|paper>
<associate|page-screen-margin|false>
</collection>
</initial>
38 changes: 19 additions & 19 deletions src/Graphics/Fonts/font.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,26 @@ struct font_rep : rep<font> {
SI yshift; // vertical script shift inside fractions

// only for opentype fonts
SI upper_limit_gap_min;
SI upper_limit_baseline_rise_min;
SI lower_limit_gap_min;
SI lower_limit_baseline_drop_min;
SI frac_rule_thickness;
SI frac_num_shift_up;
SI frac_num_disp_shift_up;
SI frac_num_gap_min;
SI frac_num_disp_gap_min;
SI frac_denom_shift_down;
SI frac_denom_disp_shift_down;
SI frac_denom_gap_min;
SI frac_denom_disp_gap_min;
SI sqrt_ver_gap;
SI sqrt_ver_disp_gap;
SI sqrt_rule_thickness;
SI sqrt_extra_ascender;
SI upper_limit_gap_min;
SI upper_limit_baseline_rise_min;
SI lower_limit_gap_min;
SI lower_limit_baseline_drop_min;
SI frac_rule_thickness;
SI frac_num_shift_up;
SI frac_num_disp_shift_up;
SI frac_num_gap_min;
SI frac_num_disp_gap_min;
SI frac_denom_shift_down;
SI frac_denom_disp_shift_down;
SI frac_denom_gap_min;
SI frac_denom_disp_gap_min;
SI sqrt_ver_gap;
SI sqrt_ver_disp_gap;
SI sqrt_rule_thickness;
SI sqrt_extra_ascender;
int sqrt_degree_rise_percent;
SI sqrt_kern_before_degree;
SI sqrt_kern_after_degree;
SI sqrt_kern_before_degree;
SI sqrt_kern_after_degree;

SI wpt; // width of one point in font
SI hpt; // height of one point in font (usually wpt)
Expand Down
14 changes: 7 additions & 7 deletions src/Plugins/Freetype/unicode_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,19 +478,19 @@ unicode_font_rep::unicode_font_rep (string name, string family2, int size2,
frac_denom_disp_gap_min= design_unit_to_metric (
math_table->constants_table[fractionDenominatorGapMin]);
// sqrt boxes
sqrt_ver_gap = design_unit_to_metric (
sqrt_ver_gap= design_unit_to_metric (
math_table->constants_table[radicalVerticalGap]);
sqrt_ver_disp_gap = design_unit_to_metric (
sqrt_ver_disp_gap= design_unit_to_metric (
math_table->constants_table[radicalDisplayStyleVerticalGap]);
sqrt_rule_thickness = design_unit_to_metric (
sqrt_rule_thickness= design_unit_to_metric (
math_table->constants_table[radicalRuleThickness]);
sqrt_extra_ascender = design_unit_to_metric (
sqrt_extra_ascender= design_unit_to_metric (
math_table->constants_table[radicalExtraAscender]);
sqrt_degree_rise_percent =
sqrt_degree_rise_percent=
math_table->constants_table[radicalDegreeBottomRaisePercent];
sqrt_kern_before_degree = design_unit_to_metric (
sqrt_kern_before_degree= design_unit_to_metric (
math_table->constants_table[radicalKernBeforeDegree]);
sqrt_kern_after_degree = design_unit_to_metric (
sqrt_kern_after_degree= design_unit_to_metric (
math_table->constants_table[radicalKernAfterDegree]);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Typeset/Concat/concat_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ concater_rep::typeset_sqrt (tree t, path ip) {
bool use_opentype=
(lfn->math_type == MATH_TYPE_OPENTYPE) && (lfn->sqrt_ver_gap > 0);
if (use_opentype) {
gap= (disp ? lfn->sqrt_ver_disp_gap : lfn->sqrt_ver_gap) +
(lfn->wline >> 1);
gap=
(disp ? lfn->sqrt_ver_disp_gap : lfn->sqrt_ver_gap) + (lfn->wline >> 1);
}
box sqrtb= delimiter_box (decorate_left (ip), "<large-sqrt>", lfn, env->pen,
b->y1, b->y2 + gap);
Expand Down

0 comments on commit 51ff998

Please sign in to comment.