Create a new image 5" x 2". Duplicate the layer. Write some red text onto the white.
Flatten the layers. Use the magic wand to select all the red. (Use Select, Similar if necessary).
When all of the red text is selected, Select,Modify,Border. I used a setting of 1 pixel in the dialog box. Click OK.
The color of the foreground color will be the color of the border on your text, and I chose a dark color such as navy or black.
Once the darker foreground (for border) is selected, click on Edit, Fill, Foreground color. Your border has now been placed.
Deselect all selections by clicking Ctrl + D.
Now you still have red text? Use the magic wand to select all text and use Select,Similar if necessary until
all of the text is selected. Change the foreground color in the left tool bar to white.
Click ALT + Backspace to fill the selected lettering with white. Ctrl + D will deselect the text. (You should now see White lettering on a white background, unless you changed the background color
of the new image when you began this project.)
Similarly, by using your background and text colors to match, you could have yellow text on yellow background, just be sure to use your initial text
in a contrasting color so that you can select just the text in order to make the border.
Flatten the layers and crop the image and save in a desired format.