From 541c4ddf7c5b402b9cfe8af5ef4e49ffa15d3e83 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 5 Mar 2019 22:33:41 +0000 Subject: unicode-math (5mar19) git-svn-id: svn://tug.org/texlive/trunk@50245 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/unicode-math/um-code-fontparam.dtx | 12 ++++++------ .../source/latex/unicode-math/um-code-main.dtx | 16 +++++++++------- .../source/latex/unicode-math/unicode-math.dtx | 6 +++--- 3 files changed, 18 insertions(+), 16 deletions(-) (limited to 'Master/texmf-dist/source/latex/unicode-math') 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 { % 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 @@ %\ProvidesExplPackage{unicode-math} %\ProvidesExplPackage{unicode-math-xetex} %\ProvidesExplPackage{unicode-math-luatex} -% {2019/02/15} {0.8n} {Unicode maths in XeLaTeX and LuaLaTeX} +% {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 } % -- cgit v1.2.3