Asymptote 3D Texlive 2022 のフォントの問題

Asymptote 3D Texlive 2022 のフォントの問題

次のコードは texlive 2021 では機能しますが、texlive 2022 では機能しなくなりました。

    % !TeX program = lualatex
    \documentclass{article}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \usepackage[inline]{asymptote}
    \begin{document}

    Alors?

    \begin{asydef}
        texpreamble("\usepackage[math-style=french,bold-style=ISO]{fourier-otf}");
        texpreamble("\setmainfont[Scale=0.72]{Verdana}");
        settings.tex="lualatex";
        \end{asydef}
    \begin{center}
        \begin{asy}
    import three;
    unitsize(1cm);
    //draw('en 2D : $A$ et A',(0,0)--(10,0));
    draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));
            \end{asy}
        \end{center}
    \end{document}

2D では問題ありませんが、3D では PDF が正しく生成されなくなり、PDF の描画とテキストは _ps にのみ表示されます (asy -f pdf essai-1.asy を使用)。

コメント後に修正しました。 64 ビット オペレーティング システム、x64 プロセッサ Windows 10 ファミリ

ここに画像の説明を入力してください

生成されたコード

    if(!settings.multipleView) settings.batchView=false;
    settings.tex="pdflatex";
    settings.inlinetex=true;
    deletepreamble();
    defaultfilename="essai-1";
    if(settings.render < 0) settings.render=4;
    settings.outformat="";
    settings.inlineimage=true;
    settings.embed=true;
    settings.toolbar=false;
    viewportmargin=(2,2);

    texpreamble("\usepackage[math-style=french,bold-style=ISO]{fourier-otf}");
    texpreamble("\setmainfont[Scale=0.72]{Verdana}");
    settings.tex="lualatex";

    import three;
    unitsize(1cm);
    //draw('en 2D : $A$ et A',(0,0)--(10,0));
    draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));

生成されたファイル

ここに画像の説明を入力してください

ファイルessai-1__.ps ここに画像の説明を入力してください

ファイルessai-1_0.pdf ここに画像の説明を入力してください

答え1

TeXLive 2022をダウンロードしました。

/usr/local/texlive/2022/bin/x86_64-linux/asy -f pdf

正常に動作します。test.asyに次の行が含まれています。

import three;
unitsize(1cm);
draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));

asyのバージョンが3Dサポート付きでコンパイルされていることを確認してくださいasy --version。x86_64-linuxバージョンは

Asymptote version 2.79 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

ENABLED OPTIONS:
V3D      3D vector graphics output
WebGL    3D HTML rendering
OpenGL   3D OpenGL rendering
SSBO     GLSL shader storage buffer objects
XDR      External Data Representation (portable binary file format for V3D)
Readline Interactive history and editing
GC       Boehm garbage collector
threads  Render OpenGL in separate thread

DISABLED OPTIONS:
GSL      GNU Scientific Library (special functions)
FFTW3    Fast Fourier transforms
CURL     URL support
LSP      Language Server Protocol
Sigsegv  Distinguish stack overflows from segmentation faults

答え2

おそらく、新しい質問を始めるべきではないと思います。そうすべきでしょうか?

John Bowman による test.asy ファイルを見てみましょう。最初の行を追加すると:

settings.tex="latex";
import three;
unitsize(1cm);
draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));

するとasy -kf pdf test.asyが機能し(test.pdfには行とテキストが含まれます)、test_.texは

\documentclass[12pt]{article}
\newbox\ASYbox
\newdimen\ASYdimen
\def\ASYprefix{}
\long\def\ASYbase#1#2{\leavevmode\setbox\ASYbox=\hbox{#1}%\ASYdimen=\ht\ASYbox%
\setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox}
\pagestyle{empty}
\textheight=2048pt
\textwidth=2048pt
\begin{document}
\makeatletter%
\let\ASYencoding\f@encoding%
\let\ASYfamily\f@family%
\let\ASYseries\f@series%
\let\ASYshape\f@shape%
\makeatother%
\fontsize{12.000000}{14.400000}\selectfont%
\usefont{\ASYencoding}{\ASYfamily}{\ASYseries}{\ASYshape}%
\special{ps:
/ASYx {( ) print ASYX sub 12 string cvs print} bind def
/ASYy {( ) print ASYY sub 12 string cvs print} bind def
/ASY1 true def
/show {ASY1 {/ASYX currentpoint pop def /ASYY currentpoint exch pop def /ASY1 false def} if currentpoint newpath moveto false charpath {(M) print ASYy ASYx} {(L) print ASYy ASYx} {(C) print ASYy ASYx ASYy ASYx ASYy ASYx} {(c) print} pathforall} bind def /V {ASY1 {/ASYX currentpoint pop def /ASYY currentpoint exch pop def ASY1 false def} if Ry neg Rx 4 copy 4 2 roll 2 copy 6 2 roll 2 copy (M) print ASYy ASYx (L) print ASYy add ASYx (L) print add ASYy add ASYx (L) print add ASYy ASYx (c) print} bind def}
en 3D : $B$ et B\ %
\end{document}

「latex」を「pdflatex」に置き換えても同様です。

「latex」を「xelatex」に置き換えると、

settings.tex="xelatex";

するとasy -kf pdf test.asyは機能せず(行のみ、テキストなし)、text_.texは

\documentclass[12pt]{article}
\newbox\ASYbox
\newdimen\ASYdimen
\def\ASYprefix{}
\long\def\ASYbase#1#2{\leavevmode\setbox\ASYbox=\hbox{#1}%\ASYdimen=\ht\ASYbox%
\setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox}
\pagestyle{empty}
\textheight=2048pt
\textwidth=2048pt
\begin{document}
\makeatletter%
\let\ASYencoding\f@encoding%
\let\ASYfamily\f@family%
\let\ASYseries\f@series%
\let\ASYshape\f@shape%
\makeatother%
\fontsize{12.000000}{14.400000}\selectfont%
\usefont{\ASYencoding}{\ASYfamily}{\ASYseries}{\ASYshape}%
en 3D : $B$ et B\ %
\end{document}

問題があるようですね...

PS: Manjaro Linux、Asymptote 2.79、texlive 2022。

関連情報