Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Trouble with Bitmap Font transparency, both with vanilla Monogame and Extended's BitmapFont

$
0
0

@NitsuaKun wrote:

So I recently decided to convert my XNA game over to Monogame. It was surprisingly easy, but the only problem I have is getting bitmap fonts to display correctly or work at all. My game is low resolution so bitmap fonts are the best choice.

If I try to display them just like in XNA, the parts of the text that are supposed to transparent are not, so the black boxes behind the text appear. I tried several different combinations of BlenderStates, as well as the importers and processors in the Pipeline tool. Either there was no transparency, the program wouldn't even run, or all of the text was partially see-through but the black boxes were at least gone also.

So I gave up on that and tried using the BitmapFont class from Extended. With this method I can't get my program to run at all. Either the pipeline tool fails to successfully build the font, or I get an exception error because it can't convert a BitmapFont into a SpriteFont.

If I had to choose, I'd rather not use Extended's BitmapFont, since (for some reason) the MeasureString function can't use the X and Y values with BitmapFonts, since it needs Width and Height instead. That's a lot of changes to my code I'd rather not have to make.

I'm using Monogame 3.8, if that matters at all.

Looking online for a solution just brings me to the same handful of pages, and none of them really seemed to help me in any way. This is the first time I've had to ask a question myself to get help. I'm just truly at my wit's end.

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles