我正在尝试使用这个答案https://tex.stackexchange.com/a/75652/134574 带有阿拉伯字母:
我可以替换徽标中心的 MTG(\ism
用序言中的命令替换为阿拉伯字母),但我无法在圆圈周围进行替换(我将我的尝试放在评论中)。这是我的工作修改:
% !TeX program = xelatex
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.text}
\usepackage{fontspec,amssymb}
\setmainfont{OptimusPrinceps}
\definecolor{byublue}{RGB}{0 34 85}
\newfontfamily\bolderfont{OptimusPrincepsSemiBold}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{DecoType Thuluth II}
%\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
\newcommand{\ism}{\textarabic{بسم الله الرحمن الرحيم}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{tikzpicture}
\begin{scope}
\draw[color=gray,fill=byublue] (0,0) circle (3.5cm);
\draw[color=gray,fill=white] (0,0) circle (2.6cm);
\end{scope}
%\draw[color=gray] (0,0) circle (2.5cm) node[scale=1.5] (m)
%{\Huge\bolderfont MTG};
\draw[color=gray] (0,0) circle (2.5cm) node[scale=1.5] (m)
{\large\bolderfont \ism};
\draw[color=gray] (0,0) circle (3.6cm);
\path [postaction={decorate,decoration={raise=-1ex,text along path,
reverse path,text align=center, text={|\huge\color{white}|Quick Latin
Motto Erratum Et Al.}}}] (-30:3.05cm) arc (-30:210:3.05cm);
\node[white,rotate=-60] at (210:3.05cm) {$\blacklozenge$};
\node[white,rotate=60] at (330:3.05cm) {$\blacklozenge$};
\path [postaction={decorate,decoration={raise=-1ex,text along path, text
align=center, text={|\huge\color{white}|St. John's College }}}]
(210:3.05cm) arc (210:330:3.05cm);
%%%%%%%%\path [postaction={decorate,decoration={raise=-1ex,text along
%%%path, text align=center, text={|\huge\color{white}| \ism }}}]
%%(210:3.05cm) arc (210:330:3.05cm);
\end{tikzpicture}
\end{document}
我使用的字体可以在这里找到:苏尔斯字体。
这是我的输出 pdf:
答案1
(如果文字没有任何意义,请见谅,但是)请看这里:
您的代码无法工作,因为您无法在那里使用宏 ( \ism
),只能使用纯文本,因为用于使文本循环的命令不会扩展宏。而且您还必须明确告诉它使用,\arabicfont
否则它将找不到所需的字形。
% !TeX program = xelatex
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.text}
\usepackage{fontspec,amssymb}
\setmainfont{OptimusPrinceps}
\definecolor{byublue}{RGB}{0 34 85}
\newfontfamily\bolderfont{OptimusPrincepsSemiBold}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{DecoType Thuluth II}
%\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
\newcommand{\ism}{\textarabic{بسم الله الرحمن الرحيم}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{tikzpicture}
\begin{scope}
\draw[color=gray,fill=byublue] (0,0) circle (3.5cm);
\draw[color=gray,fill=white] (0,0) circle (2.6cm);
\end{scope}
%\draw[color=gray] (0,0) circle (2.5cm) node[scale=1.5] (m)
%{\Huge\bolderfont MTG};
\draw[color=gray] (0,0) circle (2.5cm) node[scale=1.5] (m)
{\large\bolderfont \ism};
\draw[color=gray] (0,0) circle (3.6cm);
\path [postaction={decorate,decoration={raise=-0.5ex,text along path,
reverse path,text align=center, text={|\LARGE\color{white}\arabicfont|بسم الله الرحمن الرحيم بسم الله الرحم
}}}] (-20:3.05cm) arc (-20:200:3.05cm);
\node[white,rotate=-60] at (200:3.05cm) {$\blacklozenge$};
\node[white,rotate=60] at (-20:3.05cm) {$\blacklozenge$};
\path [postaction={decorate,decoration={raise=-0.5ex,text along
path, text align=center, text={|\LARGE\color{white}\arabicfont|بسم الله الرحمن الرحيم
}}}]
(200:3.05cm) arc (200:340:3.05cm);
\end{tikzpicture}
\end{document}