[Tex/LaTex] TikZ Node with multiple shapes

nodestikz-pgf

My use case is drawing a ticked box in line with normal text like this: "Hello ☒ World." (unicode example, your mileage may vary). One solution I managed to come up with is the following rather verbose expression.

Hello \tikz{
      \node[draw,rectangle,minimum size=1.5ex] {};
      \node[draw,cross out,minimum size=1.5ex] {};
} World.

Is there a more elegant way to describe this picture, for example by having the two shapes superimposed on one node?

Alternatively, is there any cross out path operation akin to rectangle, allowing something like the following?

\tikz \draw rectangle (1.5ex,1.5ex) cross out (0,0);

(N.B. This issue is mostly of aesthetic and academic nature, since the first
example does indeed work as expected.)

Clarification: This is single-use so creating a new command is not what I'm after (thanks Peter).

Best Answer

enter image description here

Some explanations about the question and my answer : A node has only one shape, so to modify a shape associated to a node, you can define a new shape with \pgfdeclareshape and it's possible for example to combine two defined shapes and another solution is to modify the shape used. In the next code I added two lines to the rectangle. It's possible to do that with the path picture option. With this option, it's possible to use some anchors of the bounding box but others solutions are possible.

\documentclass{article}
\usepackage{tikz}

   \tikzset{squarecross/.style={draw,path picture={% 
      \draw[black]
       (path picture bounding box.north west) -- (path picture bounding box.south east) 
       (path picture bounding box.south west) -- (path picture bounding box.north east);
      }}}   

\begin{document}
Hello  \tikz \node[squarecross] (mynode) {}; World.
\end{document}