Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert text to upside-down form
| ResourceFunction["UpsideDownTextConvert"][txt] writes the given text txt upside-down. | 
Write text upside-down:
| In[1]:= | ![ResourceFunction["UpsideDownTextConvert"]["Mathematica in the cloud"]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/2ab2fe41d5984b65.png) | 
| Out[1]= |  | 
Write that result upside-down too:
| In[2]:= | ![ResourceFunction["UpsideDownTextConvert"][%]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/54f0d0a423828c20.png) | 
| Out[2]= |  | 
UpsideDownTextConvert works on sequences of lines. Consider the random haiku (obtained with the resource function RandomEnglishHaiku):
| In[3]:= | ![SeedRandom[9883];
text = ResourceFunction["RandomEnglishHaiku"][]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/59657d6570aac5e0.png) | 
| Out[2]= |  | 
Here is the corresponding upside down version:
| In[4]:= | ![ResourceFunction["UpsideDownTextConvert"][text]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/76c9d0424f5de0be.png) | 
| Out[4]= |  | 
Here we split into verses and make the upside down versions (by invoking UpsideDownTextConvert only once):
| In[5]:= | ![textLines = StringSplit[text, "\n"];
ResourceFunction["UpsideDownTextConvert"][textLines]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/7f056041821018f2.png) | 
| Out[6]= |  | 
Certain special characters are also inverted:
| In[7]:= | ![ResourceFunction[
 "UpsideDownTextConvert"]["the wolf, the ram, and the raccoon went into a bar ⤵ 🙂"]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/213d5d499dd20ad2.png) | 
| Out[7]= |  | 
It is natural to use UpsideDownTextConvert with FlipView (clicking on the output flips it):
| In[8]:= | ![FlipView[{"Mathematica", ResourceFunction["UpsideDownTextConvert"]["Mathematica"]}]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/4b2dc669fc59f2bb.png) | 
| Out[8]= |  | 
ImageReflect can be used to produce images that resemble the output of UpsideDownTextConvert. Here is a text:
| In[9]:= | ![SeedRandom[9883];
text = ResourceFunction["RandomEnglishHaiku"][]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/386ab7f3922da8fc.png) | 
| Out[2]= |  | 
Here is a transformation of the text above with ImageReflect:
| In[10]:= | ![ImageReflect[ImageReflect[Rasterize[text]], Left -> Right]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/172f70bf91b310ea.png) | 
| Out[10]= |  | 
Compare with the output of UpsideDownTextConvert:
| In[11]:= | ![ResourceFunction["UpsideDownTextConvert"][text]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/6e1078fca5edf480.png) | 
| Out[11]= |  | 
Some special symbols do not have upside-down equivalents. In some cases the results might be confusing:
| In[12]:= | ![ResourceFunction["UpsideDownTextConvert"]["ʕ\[Bullet]ᴥ\[Bullet]ʔ"]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/25828fc46fc39a64.png) | 
| Out[12]= |  | 
Show a haiku along with its upside down form:
| In[13]:= | ![SeedRandom[332];
text = ResourceFunction["RandomEnglishHaiku"][];
ColumnForm[{text, Spacer[3], ResourceFunction["UpsideDownTextConvert"][text]}]](https://www.wolframcloud.com/obj/resourcesystem/images/faf/faf1e02e-7697-4160-b1ea-358b80da61c1/249992f02570b387.png) | 
| Out[15]= |  | 
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License