I am using Arch Linux. I install TeXLive via system's package manager pacman (the packages installed will be listed later):
If I compile the following code
\documentclass{minimal}
\newcommand{\printinternalcurrentfont}{%
\expandafter\texttt\expandafter{\expandafter\string\the\font}%
}
\newcommand{\printexternalcurrentfont}{%
\expandafter\texttt\expandafter{\fontname\font}%
}
\begin{document}
\printinternalcurrentfont
\printexternalcurrentfont
``test''
\end{document}
by xelatex, it prints
\TU/lmr/m/n/10
"[lmroman10-regular]:mapping=tex-text;" at 10.0pt
``test''
and if it is by pdflatex, it prints:
\OT1/cmr/m/n/10
cmr10
“test”
Notice the difference:
- They use different fonts: for PDFLaTeX, it use cmr (Computer Modern Roman, I guess?), and
- The ligature in the XeLaTeX case is not enabled (without any setups for fonts)
I want to know if this is a matter of the environment, so here is the list of the installed TeXLive packages (from output pacman -Qs texlive):
local/texlive-basic 2023.66594-20 (texlive)
local/texlive-bibtexextra 2023.66594-20 (texlive)
local/texlive-bin 2023.66984-19
local/texlive-binextra 2023.66594-20 (texlive)
local/texlive-doc 2023.66594-20
local/texlive-fontsextra 2023.66594-20 (texlive)
local/texlive-fontsrecommended 2023.66594-20 (texlive)
local/texlive-formatsextra 2023.66594-20 (texlive)
local/texlive-games 2023.66594-20 (texlive)
local/texlive-humanities 2023.66594-20 (texlive)
local/texlive-langchinese 2023.66594-20 (texlive-lang)
local/texlive-langcjk 2023.66594-20 (texlive-lang)
local/texlive-langcyrillic 2023.66594-20 (texlive-lang)
local/texlive-langgreek 2023.66594-20 (texlive-lang)
local/texlive-langjapanese 2023.66594-20 (texlive-lang)
local/texlive-langkorean 2023.66594-20 (texlive-lang)
local/texlive-langother 2023.66594-20 (texlive-lang)
local/texlive-latex 2023.66594-20 (texlive)
local/texlive-latexextra 2023.66594-20 (texlive)
local/texlive-latexrecommended 2023.66594-20 (texlive)
local/texlive-mathscience 2023.66594-20 (texlive)
local/texlive-music 2023.66594-20 (texlive)
local/texlive-pictures 2023.66594-20 (texlive)
local/texlive-plaingeneric 2023.66594-20 (texlive)
local/texlive-pstricks 2023.66594-20 (texlive)
local/texlive-publishers 2023.66594-20 (texlive)
I wish I have provided enough information for reproduction, and if any further information is needed, please ask me in the comments and I will updates the question ASAP.
Ref: XeLaTeX, fontspec and printing the name of the current font