diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-05 22:33:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-05 22:33:41 +0000 |
commit | 541c4ddf7c5b402b9cfe8af5ef4e49ffa15d3e83 (patch) | |
tree | 9e7e04a6ad7c9cfa5d252e8df9f24427d0b5e518 /Master/texmf-dist/source | |
parent | 671551a95af115dfc9afc2cf4ed4caed130b1abf (diff) |
unicode-math (5mar19)
git-svn-id: svn://tug.org/texlive/trunk@50245 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
3 files changed, 18 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx index 9d43d0c18c1..b801b6c0b96 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-fontparam.dtx @@ -279,21 +279,21 @@ % \subsection{Historical commands} % % \begin{macro}{\@@_fontdimen_to_percent:nN} -% \begin{macro}{\@@_fontdimen_to_scale:nN} +% \begin{macro}{\@@_fontdimen_pc_to_pt:nN} % \darg{Font dimen number} % \darg{Font `variable'} % \cmd\fontdimen s |10|, |11|, and |65| aren't actually dimensions, they're percentage values given in units of |sp|. % \cs{@@_fontdimen_to_percent:nn} takes a font dimension number and outputs the decimal value of the associated parameter. -% \cs{@@_fontdimen_to_scale:nn} returns a dimension correspond to the current +% \cs{@@_fontdimen_pc_to_pt:nn} returns a dimension correspond to the current % font size relative proportion based on that percentage. % \begin{macrocode} -\cs_new:Nn \@@_fontdimen_to_percent:nN +\cs_set:Nn \@@_fontdimen_to_percent:nN { - \fp_eval:n { \dim_to_decimal:n { 65536 \fontdimen #1 #2 } / 100 } + \fp_eval:n { \dim_to_decimal_in_sp:n { \fontdimen #1 #2 } / 100 } } -\cs_new:Nn \@@_fontdimen_to_scale:nN +\cs_new:Nn \@@_fontdimen_pc_to_pt:nN { - \fp_eval:n { \@@_fontdimen_to_percent:nN {#1} #2 * \f@size } + \fp_eval:n { \dim_to_decimal_in_sp:n { \fontdimen #1 #2 } / 100 * \f@size } } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx index aec2eb3d5a0..2c6e7bb7db9 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx @@ -127,10 +127,13 @@ % Set the math sizes according to the recommended font parameters. % \begin{macrocode} \tl_new:N \g_@@_main_font_cmd_tl -\cs_new:Nn \@@_sf_size: { \@@_fontdimen_to_scale:nN {10} \g_@@_trial_font } -\cs_new:Nn \@@_ssf_size: { \@@_fontdimen_to_scale:nN {11} \g_@@_trial_font } +\cs_new:Nn \@@_sf_size: { \@@_fontdimen_pc_to_pt:nN {10} \g_@@_trial_font } +\cs_new:Nn \@@_ssf_size: { \@@_fontdimen_pc_to_pt:nN {11} \g_@@_trial_font } \@@_cs_new:Nn \@@_declare_math_sizes: { + \fp_gset:Nn \g_@@_size_tfsf_fp { (\f@size + \@@_sf_size: )/2 } + \fp_gset:Nn \g_@@_size_sfssf_fp { (\@@_sf_size: + \@@_ssf_size:)/2 } + \dim_compare:nF { \fontdimen 10 \g_@@_trial_font == 0pt } { \DeclareMathSizes { \f@size } { \f@size } { \@@_sf_size: } { \@@_ssf_size: } @@ -175,9 +178,6 @@ % \begin{macrocode} \@@_cs_new:Nn \@@_fontspec_select_font: { - \fp_gset:Nn \g_@@_size_tfsf_fp { (\f@size + \@@_sf_size: )/2 } - \fp_gset:Nn \g_@@_size_sfssf_fp { (\@@_sf_size: + \@@_ssf_size:)/2 } - \tl_set:Nx \l_@@_font_keyval_tl { %<LU> Renderer = Basic, @@ -282,13 +282,15 @@ % % \begin{macro}{\@@_setup_legacy_fam_two:} % \TeX\ won't load the same font twice at the same scale, so we need to magnify this one by an imperceptable amount. +% Note that for extreme font sizes, this scaling value might need to be adjusted. +% 1.0001 should be enough for reasonable use cases however. % \begin{macrocode} \@@_cs_new:Nn \@@_setup_legacy_fam_two: { \fontspec_set_family:Nxn \l_@@_fam_two_tl { \l_@@_font_keyval_tl, - ScaleAgain = 1.00001, + ScaleAgain = 1.0001, FontAdjustment = { \@@_copy_fontdimen:nnN { 8} {43} \g_@@_main_font_cmd_tl @@ -329,7 +331,7 @@ \fontspec_set_family:Nxn \l_@@_fam_three_tl { \l_@@_font_keyval_tl, - ScaleAgain = 0.99999, + ScaleAgain = 0.9999, FontAdjustment = { \@@_copy_fontdimen:nnN { 8} {48} \g_@@_main_font_cmd_tl \@@_copy_fontdimen:nnN { 9} {28} \g_@@_main_font_cmd_tl diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx index 004cf213432..59cf98b1885 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx @@ -60,15 +60,15 @@ %<base>\ProvidesExplPackage{unicode-math} %<package&XE>\ProvidesExplPackage{unicode-math-xetex} %<package&LU>\ProvidesExplPackage{unicode-math-luatex} -%<base|package> {2019/02/15} {0.8n} {Unicode maths in XeLaTeX and LuaLaTeX} +%<base|package> {2019/03/04} {0.8o} {Unicode maths in XeLaTeX and LuaLaTeX} % \end{macrocode} % % Here the version and date are setup for typesetting the documentation. % \begin{macrocode} %<*dtx> \date{ - \def\filedate{2019/02/15} - \def\fileversion{0.8n} + \def\filedate{2019/03/04} + \def\fileversion{0.8o} \filedate \qquad \fileversion } %</dtx> |