LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

GPUTCHR2

Root / Submissions / [.]

MZ952Created:
Download:BBRE7E4E
Version:Déjà vuSize:
A kind of replacement for GPUTCHR. Edit 05/04/2020: fixed bug in GPUTCHR2 function, can now draw char sizes other than 8 px. Included unantialiased SB4 font data in project folder.

Instructions:

Call the function like you would its namesake. Keep in mind it's uh likely a bit slower than GPUTCHR. The test page of the main program generates in about 130 milliseconds. GPUTCHR2 OffsetX,OffsetY,TextString$,ScaleX#,ScaleY#,Color Code,Fill Flag Fill flag determines whether or not GPUTCHR searches for areas of the vectorised text to fill. For example, the period character, a 2x2 pixel square, will be filled should the flag be turned on, otherwise it will be a simple box. A similar logic applies to other characters which have "filled" spaces inside of them, for example the multiplication symbol. The project also contains "GPUTCHR2_FNTLD", which is the algorithm used to generate the data inside the GPUTCHR2 def block. You can generate your own font data by first loading in your font traditionally and peehaps changing some of the necessary parameters in the file (such as the slot into which to load the generated data, the square size of the character font (for use in SB BIG or SB4)).

I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
4V348Q51S

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
Whoa, many thanks! Did you encounter any issues running the code on SB4, does it draw okay on SB4 by any chance? Edit: nah it wouldn't have worked, discovered some problems in the code.

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
Awesome, it works! Question: does GPUTCHR on SB4 not draw chars at full 16x16 quality (I know there's some antialiasing in them, maybe that's why)? I seem to remember it that the chars were multiple pixels "thick" (although I've never used GPUTCHR on the SB4 font), while the data here seems to be all one-pixel wide, like 8x8 font scaled up. Edit: Perhaps GPUTCHR works differently in SB4? The data points you sent me are definitely a 16x16 font, it's just they're mostly 1-pixel thick (the alphanumerics at least), which the 16x16 font in SB4 isn't. I don't think there's anything wrong with my algorithm, at least SB3 side it renders multipixel thick font well.

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
If your algorithm can't handle translucent pixels it will break on the 16x16 SB4 font. There's full alpha now, so the font uses antialiasing to look a lot smoother.

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
oh yeah I used the alternate 16x16 font because I didn't think it would work with the antialiased version

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
Right. My algorithm looks for non-zero pixels. There must be something wrong Edit: ah, yeah, that's it lol. It won't get the antialiasing right at all (it'll mark any non-zero pixel), but I was okay with that. Now I'm thinking about how to preserve the antialiasing, but I wonder if it's necessary.

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
It probably isn't possible with this method, or not easy or straightforward to get decent results. This seems similar in principle to a PC outline font, and I couldn't generate an outline font for the SB4 16x because you can't replicate how it looks exactly with the antialiasing with the approach of tracing.

Replying to:MZ952
I'm looking for anyone willing to run this code in SB4 and share the export data. It would be neat to have the resolution of SB4 font in SB3 (I also really like the SB4 font I guess?).
I don't think the antialiasing would be a major problem. The tracing can handle groups of pixels, and it should look okay redrawn with the fill flag ticked on. The translucent pixels would be converted into opaque pixels. The redraw may look a bit "bloated" because of this, but it shouldn't be so bad to make chars not legible.