-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using DrawText with a different font size #2
Comments
hm! that isn't possible right now, no. the only work around I can think of is creating different sizes yourself. the various DrawText methods return the coordinates they left off at, so you might even be able to string DrawText calls together, one after another, to change font size as you go??? I haven't tried that - there may be issues. anyway, sorry: you've definitely identified a limitation. I'll keep that in mind as a possible, future improvement. can you tell me more about the effect you're aiming for, with multiple font sizes? the easiest thing for me to implement would probably be some integer size multiplier as an additional parameter to the DrawText methods... but I don't know if that would actually let you accomplish what you're trying to do! |
Yeah that's what I ended up doing 😅
That would perfectly cover the use case I was thinking of! I'm sorry if I didn't explain myself correctly in the original issue description. Let me add an example. Suppose you load a single font and you want to use that same font for the title, menu options, chat bubbles, etc. It is very likely that you want each of those items to have different font size. For example, the title might be bigger that the menu options, and so on. |
I've been thinking and another option in the meantime is to just use different-sized font files! As a side question, is there an easy way to produce font png's starting from, say, a |
hi! First of all, I wanted to thank you for publishing this project 😄 I've wanted to start using MonoGame for a while now, but I always got discouraged by its complexity and I'm finding
PlayPlayMini
provides just the right level of abstraction.Anyway, I wanted to ask whether it was possible to use
Graphics.DrawText
to draw some text with varying font sizes. Right now, unless I'm mistaken, it seems to be taking the font size directly from what I specify when initializingFontMeta
.I know scaling fonts can create a whole lot of issues, but I was just curious whether this was possible as it is right now.
The text was updated successfully, but these errors were encountered: