I am trying to display Chinese character in watermark, here is the code.
\documentclass{article}
\usepackage{xeCJK}
\usepackage[printwatermark]{xwatermark}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{lipsum}
\newsavebox\mybox
\savebox\mybox{\tikz[color=red,opacity=0.3]\node{Chinese watermark 前言};}
\newwatermark*[
allpages,
angle=45,
scale=6,
xpos=-20,
ypos=15
]{\usebox\mybox}
\begin{document}
this is Chinese 前言
\end{document}
both the Chinese characters in document
and the English part in watermark renders correctly although the Chinese part in watermark is missing.
I run the code above on overleaf and got 2 warnings.
this one
Package xeCJK Warning: Fandol is being set as the default font for CJK text. Please make sure it has been properly installed.
and this one
Package fontspec Warning: Font "FandolSong-Regular" does not contain requested Script "CJK".
what am I missing?