The hebrew text in red (see code below) was not drew in the right-to-left direction as I expected. How to set proper text direction (around a circle) for right-to-left Hebrew language using TikZ?
\documentclass{article}
\usepackage{tikz}
\usepackage{polyglossia}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary {decorations.text}
\setmainfont[Script=Hebrew]{Cardo}
\setotherlanguage{hebrew}
\begin{document}
\begin{tikzpicture}
\def\mypath{(180:2) -- (240:2) -- (300:2) -- (360:2)}
\tikzset{
mylogo/.style={
regular polygon,
regular polygon sides=6,
minimum size=5cm,
rounded corners,
path picture={
\draw[rounded corners] \mypath;
}
}
}
\foreach \t/\u in {30/-60,90/0,150/60,210/120,270/180,330/240}{
\node[rotate=\u,mylogo](H1) at (\t:4){};
}
\def\mypath{(2.47,3.74)--(2.15,3.74)--(2,4)}
\foreach \t in {0,60,...,300}{
\draw[rotate=\t,rounded corners] \mypath;
}
\path [postaction={
decorate,color=red,
decoration={
raise=-9pt,
text effects along path,
text align=center,
text effects/every character/.style={text along path},
text effects/font = \Large,
text={ץרֶאָֽהָ תאֵ֥וְ םיִמַ֖שָּׁהַ}
% text={הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ} } }] (180:1.7cm) arc (180:360:1.7cm); \pathpostaction={ decorate, color=blue, decoration={ raise=-7pt, text effects along path, text effects/every character/.style={text along path}, reverse path=true, text effects/font = \large, text={בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת}, text color=blue, reverse path, text align/align=right, text effects/reverse text=true } } arc (20:180:2.1cm); \draw[line width=1pt] circle[radius=1.6]; \foreach \t/\l in { 0/\texthebrew{תּוֹרָה שָׁלֶם}, 60/\texthebrew{בְּרֵאשִׁ֖ית}, 120/\texthebrew{שְׁמוֹת}, 180/\texthebrew{וַיִּקְרָא}, 240/\texthebrew{בְּמִדְבַּר}, 300/\texthebrew{דְּבָרִים} }{ \node[rotate={\t+180*(and(\t>90,\t<270))}] at (\t:3.5){\l}; } \end{tikzpicture} \end{document}
polyglossia
automatically loadsfontspec
, so no need to load the latter separately.