In this MWE, if I replace the fancyfoot line with the next one (with color{black}), the page number goes lower (and is even cut).
Why is there a difference between the two versions? I would expect them to do produce the same thing: a black page number at the exact same place.
By the way, I put a "\setlength{\footskip}{50pt}" because I had a warning with the first version (the color-free one). Maybe it has something to do with the explanation...?
\documentclass{article}
\usepackage[a4paper,top=2cm, bottom=2.5cm, left=2cm, right=2cm, twoside=true]{geometry}
\usepackage{fancyhdr}
\usepackage{fontspec}
\usepackage{xcolor}
\begin{document}
\fancypagestyle{plain}{%
\fancyhf{}%
}%
\pagestyle{plain}%
\setlength{\footskip}{50pt}
\fancyfoot[RO, LE]{\fontspec{Arial}\fontsize{50pt}{60pt}\selectfont\thepage}%
%\fancyfoot[RO, LE]{\fontspec{Arial}{\color{black}{\fontsize{50pt}{60pt}\selectfont\thepage}}}%
some text
\end{document}
EDIT: I'm using the lualatex command (lualatex somefilename.tex) on an Ubuntu 22.04 OS (compilation log: "This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian)"). Here are the results:



\colorwith\textcolor? – egreg Jun 04 '22 at 10:03\colorby\textcolorgives the same result (= the page number at the same position) as without\color. Why the difference?! – Michaël Jun 04 '22 at 11:32\textcoloris the best, I think. – Pieter van Oostrum Jun 04 '22 at 12:44footskip=50ptinto geometry BEFORE loading fancyhdr. Fancyhdr does not respond well to changes in page geometry. – John Kormylo Jun 04 '22 at 14:02