Could just have a black outline or background for the text like this:
Also, just a sidenote, I much prefer having more than 4 rows of items visible at a time. It enables you to see more without so much scrolling.
And considering screen resolutions these days as opposed to the late 90s when this game came out, having more screen space taken up by the inventory isn't that big of a deal.