in illustrator: draw a rectangle or any shape. With the type tool click in side the box to type.
The fill will be none. select any color for the type. from the type menu bar select area type option to situate the type in the sahpe.
With the direct selection tool select only the shape and fill it with white.