[Tex/LaTex] Creating custom mathematical symbols


I need to create two custom symbols for an article I am writing. The two symbols should have the same size as usual mathematical symbols, and should look like this:

(sorry for the small size). I would define them pixel by pixel, but I don't know how to do it, nor what the correct conventions are (like height/width depending if it is a normal equation, inline equation or sub/superscript). Could anyone help or explain how to do it?

The symbols \upspoon and \upfilledspoon in the MnSymbol package are close to what I want, but I'd prefer if they had little squares instead of little circles. Same thing for \upspoon and \upblackspoon in fdsymbol.

However, both those packages appear to interfere with the packages I already use for mathematical symbols.

Best Answer

Picture mode!







enter image description here

Just for fun and learning, here's a version with the drawing commands in expl3.



\dim_new:N \l_nicoud_yesno_ht_dim

\cs_new_protected:Nn \nicoud_yesno:nn
 {% #1 = math style, #2 = stroke or fill the path
  \mkern 0.5mu
  \draw_linewidth:n { \nicoud_line_thickness:n { #1 } }
  \hbox_set:Nn \l_tmpa_box { $#1X$ }
  \dim_set:Nn \l_nicoud_yesno_ht_dim
   {% the height of X minus the line thickness
    \box_ht:N \l_tmpa_box - \nicoud_line_thickness:n { #1 }
  % the top part
  \nicoud_path:n { #2 }
  % the bottom part
  \draw_path_moveto:n {0.35\l_nicoud_yesno_ht_dim,0.0\l_nicoud_yesno_ht_dim}
  \draw_path_lineto:n {0.35\l_nicoud_yesno_ht_dim,0.5\l_nicoud_yesno_ht_dim}
  \draw_path_use_clear:n { stroke }
  \mkern 0.5mu
\cs_new_protected:Nn \nicoud_path:n
  \draw_path_moveto:n {0.1\l_nicoud_yesno_ht_dim,0.5\l_nicoud_yesno_ht_dim}
  \draw_path_lineto:n {0.1\l_nicoud_yesno_ht_dim,1.0\l_nicoud_yesno_ht_dim}
  \draw_path_lineto:n {0.6\l_nicoud_yesno_ht_dim,1.0\l_nicoud_yesno_ht_dim}
  \draw_path_lineto:n {0.6\l_nicoud_yesno_ht_dim,0.5\l_nicoud_yesno_ht_dim}
  \draw_path_use_clear:n { #1 }
\cs_new:Nn \nicoud_line_thickness:n
  \str_case:nn { #1 }





enter image description here