Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[Feature Request] Parameter to disable smoothing in LuaCanvas.drawText #1411
LuaCanvas.drawText adds smoothing to fonts, which is undesirable when using pixel fonts. There's currently no LuaCanvas equivalent for gui.pixelText to work around this - though, gui.pixelText doesn't currently allow for custom pixel fonts (only fceux and gens). With that in mind, I'd like to see a true/false parameter added to LuaCanvas.drawText, to enable/disable pixel text rendering (keep smooth text rendering as default behavior).
Context for how I'm trying to use LuaCanvas here:
I originally tried creating this border directly on top of the emulator via gui.***, as gui.drawText renders this pixel font cleanly. But BizHawk renders gui draw calls at the emulator core's output resolution - in this case: I'm limited to 256x224 for Same Boy + SGB, with no room for resolution-independent elements (everything renders at 1:1 pixel scale), or anything that extends past the output res (elements get cut off at the sides, so this border would be limited to 8:7 ratio).
can you build the code? change LuaPictureBox.cs code
It fixes my issue completely! I only say "for the time being" because it's the result of an edit rather than an addition - it mucks with current default behavior for rendering text on a lua canvas, and requires a custom build to use it*. I'd love to see it as an on/off parameter that's available to everyone, and finally have a equivalent option for gui.pixelText in lua canvas.
*- to be clear, thanks to BizHawk's compile instructions, the build process was painless! Visual Studio itself was a bit of a hassle, 2015 refused to even install.