I'm trying to write a funny style writing targeting a young audience. At some point, I would like some words to have "wave" effect on each character according to their position.
I've already found this article that use pgf/TikZ to simulate WordArt, but I would like to be able to do it without pgf.
So the idea should be to be able to write something like this
I can write a \bubbletext{bubble-like} wavy text.
So far, based on this example, I was able to at least get a randomized effect. My problem comes from the fact that I would like something more consistant.
\ExplSyntaxOn
\NewDocumentCommand{\bubblechar}{ O{0.25} m }
{
\group_begin:
\tl_set:Nn \l_tmpa_tl { #2 }
\tl_replace_all:Nnn \l_tmpa_tl { ~ } { \c_space_tl }
\tl_map_inline:Nn \l_tmpa_tl {
\int_case:nnF { \int_mod:nn {\int_rand:nn{0}{400}} {4} }
{
{1} {\raisebox { #1 ex} { ##1 } }
{3} {\raisebox {-#1 ex} { ##1 } }
}
{##1}
}
\group_end:
}
\ExplSyntaxOff
To achieve that, I have to replace the \int_rand:nn{0}{400} with the actual position I currently am in the list, but I don't find how to reach that value. So basically, the effect I want will have a similar effect that if I had writen this line
I can write a b\raisebox{-0.25ex}ub\raisebox{0.25ex}bl\raisebox{-.25ex}e-\raisebox{0.25ex}li\raisebox{-0.25ex}ke wavy text.
With the 400, I'm sometime lucky, but it's not always the case (far from it). (In the following example, it was pretty close / almost perfect, but most of the time, the effect is barely visible.)
Thanks in advance.

