Post subject: Problems with gui.drawText() font
Amaraticando
It/Its
Editor, Player (159)
Joined: 1/10/2012
Posts: 673
Location: Brazil
1) Is there any way to make gui.text() bahave like gui.drawText() ?? gui.text() changes its position when I maximize the screen and displays text in the black area. gui.drawText() only displays text in the proper graphics area (256x224). I don't wanna use the 2nd function because the fonts look ugly and the script seems to run slowly. 2) Can I use the background in the same as Lsnes does? I'd like to have a semitransparent background, not only the contour.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3575)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
1) gui.text() is working as intended. It draws in "client space", meaning the actual window that is being drawn in. Screen resizing affects the positioning of things drawn with gui.text(). This is intended behavior. And for best results, take advantage of the anchor parameter. gui.drawText() works in emulator space, meaning in the emulator core's frame buffer space. If the screen is resized, the text is recalculated just like the game's screen. What you are really compaining about is that the drawText() font is not pleasing. You are happy with its logical behavior, not what it looks like on screen. I changed the topic accordingly. There are fontsize, fontfamily, and fontstyle parameters, have you tried using those to find a font that is more pleasant for you? 2) I don't know what lsnes does, you will have to try it. Also, I don't like sneaking in 2's into a thread ^_^
It's hard to look this good. My TAS projects
Amaraticando
It/Its
Editor, Player (159)
Joined: 1/10/2012
Posts: 673
Location: Brazil
adelikat wrote:
1 You are happy with its logical behavior, not what it looks like on screen.
Basically, yes. The only negative "logical" behavior that I had was a minor slowdown of Draw, but maybe my script wasn't optimized...
adelikat wrote:
There are fontsize, fontfamily, and fontstyle parameters, have you tried using those to find a font that is more pleasant for you?
Look. It seems that no matter what fontfamily I use, the image is blured.
adelikat wrote:
2) I don't know what lsnes does, you will have to try it. Also, I don't like sneaking in 2's into a thread ^_^
I mean the background of the text. Bizhawk's background is a shadown of the text, while lsnes' is a full background. But it's not very important, sorry for sneaking.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
Presently, this is kind of incredibly sloppy, but different kinds of text get drawn by completely different methods. There's no way to 'fix' this nor shall there be until the methods get unified. These different methods have different performance characteristics as well. This was part of the ongoing effort to openglize things. We should probably come up with a way to fix antialiasing though. It looks like the cleartype is applied backwards (BGR for the lua stuff and RGB for the stuff drawn by the OS). They both look blurry to me, but it is strange that the subpixel order isnt correct.