texlive[65009] Master/texmf-dist: unicodefonttable (13nov22)
commits+karl at tug.org
commits+karl at tug.org
Sun Nov 13 22:26:09 CET 2022
Revision: 65009
http://tug.org/svn/texlive?view=revision&revision=65009
Author: karl
Date: 2022-11-13 22:26:09 +0100 (Sun, 13 Nov 2022)
Log Message:
-----------
unicodefonttable (13nov22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/unicodefonttable/README.md
trunk/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt
trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-code.pdf
trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-doc.pdf
trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.pdf
trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex
trunk/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx
trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex
trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty
Modified: trunk/Master/texmf-dist/doc/latex/unicodefonttable/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/unicodefonttable/README.md 2022-11-13 21:25:32 UTC (rev 65008)
+++ trunk/Master/texmf-dist/doc/latex/unicodefonttable/README.md 2022-11-13 21:26:09 UTC (rev 65009)
@@ -16,7 +16,7 @@
https://github.com/FrankMittelbach/fmitex-unicodefonttable/
-The license is LPPL.
+The license is LPPL 1.3c.
For version information see the .dtx file.
Modified: trunk/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt 2022-11-13 21:25:32 UTC (rev 65008)
+++ trunk/Master/texmf-dist/doc/latex/unicodefonttable/changes.txt 2022-11-13 21:26:09 UTC (rev 65009)
@@ -1,3 +1,19 @@
+2022-11-12 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * unicodefonttable.dtx (subsection{The overall table layout}):
+ Change default statistics text so that it makes
+ more sense if only a portion of the font is displayed (gh/4)
+
+ (subsection{User interface commands}):
+ Test for luatex without harfbuzz and display of private area-A
+ and warn that this gives strange results (gh/8)
+
+ Support use in twocolumn mode if inside a table* float (gh/7)
+
+ (subsection{Handling a single row}):
+ Add key hex-digits-row-format to allow customizing the row title
+ on the left (gh/3)}
+
2021-10-29 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* unicodefonttable.dtx (subsection{The overall table layout}):
Modified: trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex 2022-11-13 21:25:32 UTC (rev 65008)
+++ trunk/Master/texmf-dist/doc/latex/unicodefonttable/unicodefonttable-samples.tex 2022-11-13 21:26:09 UTC (rev 65009)
@@ -35,8 +35,8 @@
%%%%% \iffalse meta-comment
%% File: unicodefonttable.dtx (C) Copyright 2019-2021 Frank Mittelbach
-\def\unicodefonttabledate {2021/10/29}
-\def\unicodefonttableversion{v1.0f}
+\def\unicodefonttabledate {2022/11/12}
+\def\unicodefonttableversion{v1.0g}
%!TEX program = lualatex
Modified: trunk/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx 2022-11-13 21:25:32 UTC (rev 65008)
+++ trunk/Master/texmf-dist/source/latex/unicodefonttable/unicodefonttable.dtx 2022-11-13 21:26:09 UTC (rev 65009)
@@ -17,8 +17,8 @@
% for those people who are interested or want to report an issue.
%
-\def\unicodefonttabledate {2021/10/29}
-\def\unicodefonttableversion{v1.0f}
+\def\unicodefonttabledate {2022/11/12}
+\def\unicodefonttableversion{v1.0g}
%<*driver>
@@ -269,7 +269,8 @@
%
% \begin{variable}{
% display-block,
-% hex-digits, color,
+% hex-digits, hex-digits-font,hex-digits-row-format,
+% color,
% }
% These keys handle the inner parts of the table.
%
@@ -318,6 +319,18 @@
% The font to use for the hex digits, by default
% \underline{\cs{ttfamily}\cs{scriptsize}}.{\hfuzz=2.7pt\par}
%
+% \item[\key{hex-digits-row-format}]
+% This key defines the format for the hex digits shown on the left
+% of each row. It accepts one argument hold the hex values for the
+% row except for the last digit, e.g, \texttt{0A3} for the values
+% from \texttt{0A30} to \texttt{0A3F}. The default formatting is
+% \underline{\ttfamily U+\#10\cs{,}-\cs{,}\#1F} and without further
+% adjustments it is automaticaly set
+% in \cs{footnotesize} \cs{ttfamily} and in the color
+% specified by the \key{color} key.
+%
+%
+%
% \item[\key{color}]
% This key determines the color for parts of the table (hex digits
% and Unicode ranges). It can be either \kval{none} or a color
@@ -461,8 +474,15 @@
% higher planes. But if you want to see everything of the font (as
% far as supported by this package) and are prepared to wait for
% the higher
-% planes to be scanned, you can go up to a value of \texttt{FFFFF}.
+% planes to be scanned, you can go up to a value of \texttt{FFFFF}.
%
+% However, please note that the \LuaTeX{} fontloader uses the
+% \enquote{Supplementary Private Use Area-A}, which starts at
+% \texttt{F0000}, as its own playground and places remapping into
+% it, so by default you see random data instead of font data there. You
+% either have to use the \XeTeX{} engine or load the font with
+% \texttt{Renderer=HarfBuzz} in \LuaTeX{}.
+%
% These keys are also quite useful in combination with the previous
% \key{compare-with} key, to display only, for example, the Greek
% letters and see how glyphs from two fonts blend with each other.
@@ -555,6 +575,13 @@
% places, but for \TUB{} this is not practical, so we
% use black and gray.
%
+% Please note that this documentation was produced with
+% \LuaTeX{}. If you reuse the examples with \XeTeX{}, you may have
+% to specify the font names differently (i.e., following to the
+% \pkg{fontspec} documentation for this engine).
+%
+%
+%
% \subsection{Computer Modern Sans --- 7-bit font}
%
% Our first example is the original Computer Modern Sans, with
@@ -573,12 +600,13 @@
%
% This example shows the \TeX\ Gyre Heros 8-bit font,
% in the T1 encoding, with character codes $\le 255$.
-% Command used:
+% We used \key{hex-digits-row-format} to shorten the row titles on
+% the left:
%\begin{verbatim}
-% \displayfonttable*[color=none]{ec-qhvr}
+% \displayfonttable*[color=none,hex-digits-row-format=U+#1]{ec-qhvr}
%\end{verbatim}
%
-%\displayfonttable*[color=none]{ec-qhvr}
+%\displayfonttable*[color=none,hex-digits-row-format=U+#1]{ec-qhvr}
%
% \fi
%
@@ -619,7 +647,7 @@
% \fi
%
%
-% \IfImplementationShownTF{}{\newpage}
+% ^^A \IfImplementationShownTF{}{\newpage}
%
% \subsection{Latin Modern Math compared to New Computer Modern Math}
%
@@ -805,6 +833,21 @@
\fontspec{#2}[#3]
\keys_set:nn{@@}{#1}
% \end{macrocode}
+% If the \LuaTeX{} engine is used without HarfBuzz and the display
+% range includes code points above \texttt{U+EFFFF} the output shows
+% remappings and not what is in the font, so we issue a warning.
+% \changes{v1.0g}{2022/11/12}{Test for luatex without harfbuzz and
+% private area A and warn (gh/8)}
+% \begin{macrocode}
+ \bool_lazy_and:nnT
+ { \sys_if_engine_luatex_p: }
+ { \int_compare_p:nNn { "EFFFF } < { "\l_@@_range_end_tl } }
+ {
+ \directlua{token.put_next(token.create(font.getfont(font.current()).hb~
+ and~ 'use_none:n'~ or~ 'use:n'))}
+ { \msg_warning:nn {unicodefonttable}{noharfbuzz} }
+ }
+% \end{macrocode}
% If the user has asked for a comparsion to some other font we need to set this up:
% \begin{macrocode}
\tl_if_empty:NTF \l_@@_compare_with_tl
@@ -815,6 +858,16 @@
\@@_handle_missing_glyph_compare:n
}
% \end{macrocode}
+% Typesetting the font tables in twocolumn mode makes little sense
+% due to their width, and if \env{longtable} is used it will
+% complain. However there is one case where it should work: in a
+% page-wide float. To make this happen we claim that we are not in
+% twocolumn mode if the display is inside a vertical box.
+% \changes{v1.0g}{2022/11/12}{Support use in twocolumn mode if inside
+% a table* float (gh/7)}
+% \begin{macrocode}
+ \if_mode_vertical: \if_mode_inner: \@twocolumnfalse \fi: \fi:
+% \end{macrocode}
% Then we start the table with 17 columns. We use \texttt{longtable}
% if we produce a caption and \texttt{longtable*} if not (so that
% the table number is not increased, which would look odd if you
@@ -842,9 +895,25 @@
}
% \end{macrocode}
% \end{macro}
-
-
%
+%
+% \begin{macrocode}
+\msg_new:nnn {unicodefonttable}{noharfbuzz}
+ { You~ asked~ for~ displaying~ glyphs~ with~ code \iow_newline:
+ points~ above~ U+EFFFF~ \msg_line_context: ,~ i.e.,~ from~ the~
+ 'Supplementary~ Private~ Use~ Area-A'\iow_newline:
+ without~ specifying~ '[Renderer=Harfbuzz]'~ when~
+ loading~ the~ font.
+ \iow_newline:\iow_newline:
+ With~ LuaLaTeX,~ this~ Unicode~ region~ is~ used~
+ for~ remappings~ (if~ the~ HarfBuzz~ engine~ is~ not~ used).~
+ Thus,~ the~ results~ shown~ do~ not~ reflect~ what~
+ is~ in~ the~ font!
+ }
+% \end{macrocode}
+%
+%
+%
% \begin{macro}{\fonttableglyphcount}
% \begin{macro}{\g_@@_glyph_int,\g_@@_glyph_only_B_int,\g_@@_glyph_also_B_int}
% While generating the font table we count the number of glyphs we
@@ -1044,6 +1113,15 @@
,hex-digits-font .tl_set:N = \l_@@_hex_digits_font_tl
,hex-digits-font .initial:n = \ttfamily \scriptsize
% \end{macrocode}
+% Customizing the row header (on the left) can be done with this
+% key. Defaults for font, fontsize, and color is set on the outside, but can, of
+% course, be overwritten inside if that is desired.
+% \changes{v1.0g}{2022/11/12}{Add key hex-digits-row-format to allow
+% customizing the row title on the left (gh/3)}
+% \begin{macrocode}
+ ,hex-digits-row-format .cs_set:Np = \@@_format_row_hex_digits:n #1
+ ,hex-digits-row-format .initial:n = U+#1 0 \, - \, #1 F
+% \end{macrocode}
% The \key{color} key is used in most places that get colored; some
% have their own key but default to the main color.
% \begin{macrocode}
@@ -1130,9 +1208,11 @@
% And here we have the default text. There is only space for a
% single line. If more text is needed one needs to provide some
% explicit \cs{parbox}.
+% \changes{v1.0g}{2022/11/12}{Change default text so that it makes
+% more sense if only a portion of the font is displayed (gh/4)}
% \begin{macrocode}
,statistics-format .cs_set:Np = \@@_format_stats:nn #1#2
- ,statistics-format .initial:n = Total~ number~ of~ glyphs~ in~ #1:~#2
+ ,statistics-format .initial:n = Total~ number~ of~ glyphs~ shown~ from~ #1:~#2
}
% \end{macrocode}
% \end{macro}
@@ -1461,12 +1541,14 @@
% \end{macrocode}
% If we run a comparison we show different statistics that have
% their own key.
+% \changes{v1.0g}{2022/11/12}{Change default text so that it makes
+% more sense if only a portion of the font is displayed (gh/4)}
% \begin{macrocode}
,statistics-compare-format .cs_set:Np
= \@@_format_compare_stats:nnnnnn #1#2#3#4#5#6
,statistics-compare-format .initial:n
= \parbox{\linewidth}{
- Total~ number~ of~ glyphs~ in~ \texttt{#1}:~#2\\
+ Total~ number~ of~ glyphs~ shown~ from~ \texttt{#1}:~#2\\
Comparison~ font~ \texttt{#3}~ has~ #5~ missing~ and~ #6~
extra~ glyphs}
}
@@ -1602,9 +1684,11 @@
%
% \begin{macro}{\@@_format_row_title:n}
% The function to format the row title on the left, as used above.
+% \changes{v1.0g}{2022/11/12}{Add key hex-digits-row-format to allow
+% customizing the row title on the left (gh/3)}
% \begin{macrocode}
\cs_new:Npn \@@_format_row_title:n #1 {
- \texttt { \footnotesize \l_@@_color_tl U+#1 0 \, - \, #1 F }
+ \texttt { \footnotesize \l_@@_color_tl \@@_format_row_hex_digits:n {#1} }
}
% \end{macrocode}
% \end{macro}
@@ -1782,10 +1866,10 @@
}
% \end{macrocode}
% \end{macro}
-
-
%
%
+%
+%
% \subsection{Handling block titles}
%
% \begin{macro}{g_@@_block_title_tl}
@@ -2103,7 +2187,6 @@
}
% \end{macrocode}
%
-%
% That's all of the programming using the L3 layer.
% \begin{macrocode}
\ExplSyntaxOff
Modified: trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex 2022-11-13 21:25:32 UTC (rev 65008)
+++ trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefont.tex 2022-11-13 21:26:09 UTC (rev 65009)
@@ -35,8 +35,8 @@
%%%%% \iffalse meta-comment
%% File: unicodefonttable.dtx (C) Copyright 2019-2021 Frank Mittelbach
-\def\unicodefonttabledate {2021/10/29}
-\def\unicodefonttableversion{v1.0f}
+\def\unicodefonttabledate {2022/11/12}
+\def\unicodefonttableversion{v1.0g}
\documentclass{article}
Modified: trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty 2022-11-13 21:25:32 UTC (rev 65008)
+++ trunk/Master/texmf-dist/tex/latex/unicodefonttable/unicodefonttable.sty 2022-11-13 21:26:09 UTC (rev 65009)
@@ -35,8 +35,8 @@
%%%%% \iffalse meta-comment
%% File: unicodefonttable.dtx (C) Copyright 2019-2021 Frank Mittelbach
-\def\unicodefonttabledate {2021/10/29}
-\def\unicodefonttableversion{v1.0f}
+\def\unicodefonttabledate {2022/11/12}
+\def\unicodefonttableversion{v1.0g}
\RequirePackage{xcolor}
@@ -64,6 +64,14 @@
\group_begin:
\fontspec{#2}[#3]
\keys_set:nn{__fmuft}{#1}
+ \bool_lazy_and:nnT
+ { \sys_if_engine_luatex_p: }
+ { \int_compare_p:nNn { "EFFFF } < { "\l__fmuft_range_end_tl } }
+ {
+ \directlua{token.put_next(token.create(font.getfont(font.current()).hb~
+ and~ 'use_none:n'~ or~ 'use:n'))}
+ { \msg_warning:nn {unicodefonttable}{noharfbuzz} }
+ }
\tl_if_empty:NTF \l__fmuft_compare_with_tl
{ \tl_clear:N \l__fmuft_compare_font_tl }
{
@@ -71,6 +79,7 @@
\cs_set_eq:NN \__fmuft_handle_missing_glyph:n
\__fmuft_handle_missing_glyph_compare:n
}
+ \if_mode_vertical: \if_mode_inner: \@twocolumnfalse \fi: \fi:
\begin{longtable\bool_if:NF\l__fmuft_display_header_bool{*}}
{@{}r@{\quad}*{16}{c}@{}}
\__fmuft_setup_header_footer:nn{#2}{#3}
@@ -79,7 +88,18 @@
\end{longtable\bool_if:NF\l__fmuft_display_header_bool{*}}
\group_end:
}
-
+\msg_new:nnn {unicodefonttable}{noharfbuzz}
+ { You~ asked~ for~ displaying~ glyphs~ with~ code \iow_newline:
+ points~ above~ U+EFFFF~ \msg_line_context: ,~ i.e.,~ from~ the~
+ 'Supplementary~ Private~ Use~ Area-A'\iow_newline:
+ without~ specifying~ '[Renderer=Harfbuzz]'~ when~
+ loading~ the~ font.
+ \iow_newline:\iow_newline:
+ With~ LuaLaTeX,~ this~ Unicode~ region~ is~ used~
+ for~ remappings~ (if~ the~ HarfBuzz~ engine~ is~ not~ used).~
+ Thus,~ the~ results~ shown~ do~ not~ reflect~ what~
+ is~ in~ the~ font!
+ }
\DeclareDocumentCommand \fonttableglyphcount {}
{ \int_use:N \g__fmuft_glyph_int }
\int_new:N \g__fmuft_glyph_int
@@ -154,6 +174,8 @@
,hex-digits .initial:n = head
,hex-digits-font .tl_set:N = \l__fmuft_hex_digits_font_tl
,hex-digits-font .initial:n = \ttfamily \scriptsize
+ ,hex-digits-row-format .cs_set:Np = \__fmuft_format_row_hex_digits:n #1
+ ,hex-digits-row-format .initial:n = U+#1 0 \, - \, #1 F
,color .choice:
,color / none .code:n = \tl_clear:N \l__fmuft_color_tl
,color / unknown .code:n = \tl_set:Nn \l__fmuft_color_tl { \color {#1} }
@@ -194,7 +216,7 @@
,statistics-font .tl_set:N = \l__fmuft_stats_font_tl
,statistics-font .initial:n = \normalfont\small
,statistics-format .cs_set:Np = \__fmuft_format_stats:nn #1#2
- ,statistics-format .initial:n = Total~ number~ of~ glyphs~ in~ #1:~#2
+ ,statistics-format .initial:n = Total~ number~ of~ glyphs~ shown~ from~ #1:~#2
}
\cs_new:Npn \__fmuft_debug_nl:n #1 {}
\keys_define:nn {__fmuft} {
@@ -307,7 +329,7 @@
= \__fmuft_format_compare_stats:nnnnnn #1#2#3#4#5#6
,statistics-compare-format .initial:n
= \parbox{\linewidth}{
- Total~ number~ of~ glyphs~ in~ \texttt{#1}:~#2\\
+ Total~ number~ of~ glyphs~ shown~ from~ \texttt{#1}:~#2\\
Comparison~ font~ \texttt{#3}~ has~ #5~ missing~ and~ #6~
extra~ glyphs}
}
@@ -359,7 +381,7 @@
}
}
\cs_new:Npn \__fmuft_format_row_title:n #1 {
- \texttt { \footnotesize \l__fmuft_color_tl U+#1 0 \, - \, #1 F }
+ \texttt { \footnotesize \l__fmuft_color_tl \__fmuft_format_row_hex_digits:n {#1} }
}
\tl_new:N \l__fmuft_range_start_tl
\tl_new:N \l__fmuft_range_end_tl
@@ -432,7 +454,6 @@
\int_gzero:N \g__fmuft_glyph_only_B_int
\int_gzero:N \g__fmuft_glyph_also_B_int
}
-
\tl_new:N \g__fmuft_block_title_tl
\cs_new:Npn \__fmuft_update_block_title:n #1 {
More information about the tex-live-commits
mailing list.