Grid Sage Forums

Grid Sage Forums

  • November 23, 2024, 07:10:46 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Lucide

Pages: [1]
1
Everything REXPaint / Re: Show off your REXPAINT creations
« on: February 02, 2021, 10:08:54 AM »
I managed to find time to polish an old pet project of mine, a cross-platform C99 library to create unicode text graphics easily, on UTF-8 capable terminals.
I have adopted REXPaint as a natively supported editor to create assets.
I've used the project as a learning workbench over the years till it became a thing of its own, so it's a bit of niche tool. It requires a basic level of proficiency in both C and CMake.
It can do realtime games too, if the user knows what is doing. The repo provides some examples.
It's called VisualT, and the docs are published on readthedocs.

I've made the logo, the VTCat, with REXPaint :)

2
Everything REXPaint / Re: Saving/Exporting at higher resolutions?
« on: February 02, 2021, 08:08:59 AM »
What you're likely looking for is a Nearest-neighbor upscaler, which is a technique to scale images while preserving hard edges. You can find some online by searching for "pixel art upscaler" or something like that, results can be mixed. To get a decent result you must resize the image by a "perfect amount" (x2, x4, ...).
REXPaint is a bitmap editor, so the only way to output bigger images is to use bigger fonts, like Kyzrati said. That's also the reason why you can't resize the window, the ui is text-based too!
If you have a copy of photoshop available to you, it's provides a really good nn upscaler, often mentioned online. :)

3
Everything REXPaint / Re: a Font Atlas Generator
« on: January 14, 2021, 04:17:25 AM »
Ahahah, my bad, it looks like a brain fart between ascending and increasing.
Thank you for the info

4
Everything REXPaint / Re: a Font Atlas Generator
« on: January 11, 2021, 11:04:24 AM »
Hey @Kyzrati, I'd like to ask you a detail about the charset file specs: the manual states:
Quote
Indices start from 0 and proceed in row-major order, as displayed in the font bitmap, and any index not specified in the file will produce a "?" where an imagine using that glyph is exported.
The indices guaranteed to be in crescent order, right? All they can do is skip some indices?

5
Everything REXPaint / Re: REXPaint's markown manual
« on: October 27, 2020, 11:38:38 AM »
The manual was updated for v1.60

6
Everything REXPaint / Re: a Font Atlas Generator
« on: September 30, 2020, 01:03:04 PM »
Updates!
image and charset export buttons have been added
Additional export options will be added if requested or needed

7
Everything REXPaint / Re: a Font Atlas Generator
« on: September 28, 2020, 06:31:14 AM »
Hooray! I apologize for the file error, must've been really frustrating. I wouldn't have noticed in a year.
I also had misinterpreted the space behaviour, and on top of that I thought I was using my space (my font was actually missing the space char altogether!). Didn't notice REXPaint was showing space instead of A. Which makes perfectly sense of course.

If you tell me this will be roughly the final layout, I'll add the first export option to the generator. with a non-space '32' warning

8
Everything REXPaint / Re: a Font Atlas Generator
« on: September 27, 2020, 06:55:21 AM »
Yes I'm aware of that, I thought I had filled the empty cells with an actual "space" from the font in the layer below. If I don't leave any empty cell but I keep a custom space-filled layer at the bottom shouldn't I be fine?

9
Everything REXPaint / Re: a Font Atlas Generator
« on: September 26, 2020, 03:33:00 PM »
Updates!
you can now define an arbitrary stack of fallback fonts
In the real world, text rendering is often a hodgepodge of different fonts. Even on the Ubuntu terminal, the fallback font when DejaVu doesn't deliver is Symbola.
But why stop to one fallback font when you can have many

10
Everything REXPaint / Re: a Font Atlas Generator
« on: September 26, 2020, 03:26:41 PM »
Not sure of what I'm doing wrong, but I can't get it to work. Might be the late hour.
Here's my setup

11
Everything REXPaint / Re: a Font Atlas Generator
« on: September 25, 2020, 05:30:06 AM »
It's cool, comment support (for displaying glyphs), shared files, shorthand "-", it's all there.
If I may, I would suggest calling the charset files with their charset name "_cp437.txt" instead of "_utf8.txt", it's clearer to show what they are for. (and what they contain).
The "Unicode" parameter might be better called "Charset" too.

The default fonts are named after their charset, fair enough. If I were to create some custom cp437 font, I'd call it "Bob" and assign the "_cp437.txt"/"-" charset to it.
If I were to create some custom kaomoji font, I'd call it "Adaji" and assign the "_kaomoji.txt" charset to it. An eventual "Alice" font could use "_kaomoji.txt" too.

12
Everything REXPaint / Re: a Font Atlas Generator
« on: September 13, 2020, 08:09:05 AM »
Updates!
The app can now be used offline too, once opened for the first time.
When you're in offline mode (no network connectivity and http caches have expired) the animated header line becomes dashed.

There currently are some uncaught exceptions sprinkled in the console. I'm trying to resolve this with workbox's authors. They shouldn't affect functionality.
The issue has been fixed

13
Everything REXPaint / Re: a Font Atlas Generator
« on: August 28, 2020, 10:14:35 AM »
Updates!
I was a bit dissatisfied with the output at lower resolutions (16x16 and lower). Given that REXPaint does no downscaling and all monitors I have are 1920x1080, generating an useful 16x16 output was a feature I needed myself.
New feature: supersampling! for crisper images at lower resolutions (higher resolution rendering+downscaling)

My first attempt was CSS-based, as it lets you choose the scaling algorithm. Unfortunately I later realized I had no way to get the processed image out of the browser.
To keep things simple I'm using a built-in Canvas flag which controls smoothing when scaling. Maybe the choice offered by css was a bit overkill anyway. And inconsistently supported.
It looks better on Chrome.

Improvements: smart page auto-resizing policies
I put a lot of blood and tears into this. I found very difficult to translate vague automatic resizing behaviour ideas to actual, implementable, rules. Now they are here, doing their work unnoticed and they're here to stay.

14
Everything REXPaint / Re: a Font Atlas Generator
« on: August 22, 2020, 05:44:03 AM »
The site has returned to a working state, clipping has been implemented and unavailable glyphs produce blank cells.
I'm doing some research to optionally show nodef glyphs (they look like an uglier version of ☒), but that requires someone who's able to edit font files.
I'll ask in a typography forum, if they exist. But not sure if anyone would find that useful

Phone support is what it is. The page relies on the browser honoring unicode variation selectors, they tell the text engine to not spray emoji everywhere and use the font's glyphs instead.
Chrome for Android ignores them for example. The result is ..interesting but probably not what you're looking for ( ´ ▽ ` )

Fun Fact™! The title is a link that opens the github page

15
Everything REXPaint / Re: a Font Atlas Generator
« on: August 21, 2020, 05:35:37 AM »
Quote
Unless you mean you're looking for REXPaint to expose/do more than that?
No. was just to make sure
to me, utf-8 should be the only encoding available everywhere, when exporting text

16
Everything REXPaint / Re: a Font Atlas Generator
« on: August 21, 2020, 05:09:54 AM »
You've spent just a day!
So, there are just 2 things i miss in it:
- option to clip glyphs in cells
- manual fine x,y global shifting

Other than that it works really great!
(I've tested it on the phone too!)
Ahahah no, it took me about a week, from 0 to up and running. I'm practical of C and Java, I had to learn most of that stuff from scratch, and it's been painful.
I don't like to fiddle with tools until they work, I like to be confident on the choices i make, and that generally requires an understanding of how things work.

That said, I've implemented those features yesterday, but then I ran into a serious font fallback bug I didn't notice till then: if the font chosen doesn't have the requested glyphs, the browser seamlessly chooses an alternative. That's not what the user expects. I'm working to have squares shown instead, I've asked for some help to do that correctly.

17
Everything REXPaint / Re: a Font Atlas Generator
« on: August 21, 2020, 04:49:26 AM »
Ok only mind that those are code points, the actual encoding to UTF-8 seems to be done elsewhere
I'd suggest against the use of wchar to store unicode characters, it was really designed for UCS-2 encoded text, when Unicode was smaller and 2B were sufficient.
Now that Unicode counts 143'859 chars, it's used to store UTF-16 text. That means that a character can take up to 2 wchar. If I remember correctly, wchar I/O functions are also considerably more complex (and slower), as they re-encode the text to match the current locale, but this in Linux I don't know about Windows.
In my library, for example, I store them in uint32 variables, already UTF-8 encoded, but that's an edge case because I move them around like pixels, so that approach might be a waste of memory in other contexts. In your situation, I think a fixed-size approach is still the best way to go, something like char[4], or even uint32, but you have to be careful with endianness.

Quote
which happens to be similar to the external-file-with-default-provided method of dealing with the planned customizable glyph mirroring behavior
Yeah, I've seen related requests here and there in the forum, if you think about it, you could implement some character-based logic to flip/mirror layers, and the mapping would make sure that the most appropriate tile is chosen. But going beyond that looks non trivial. That would require some syntax to define unique pairs, and everything should still be optional. Json may prove to be more versatile (maybe for the settings too, just sayin') :)

18
Everything REXPaint / Re: a Font Atlas Generator
« on: August 20, 2020, 06:53:35 AM »
Ooh no worries! It has never cross my mind to demand immediate answers on the web

Quote
You mean adding an external way to designate the Unicode associated with a particular glyph, and that is used for a new type of text export option?
Yes. The new txt export feature would work exactly like the current one for the user, but under the hood it would search for some metadata (to define where and how) to match the corresponding character to every tile. A file with a "charset string" would be sufficient, named like the atlas. The output UTF-8 encoded of course.
To enable text export from a text art editor :)

Some tilesets in the site look customized (i.e. with non-existent unicode characters). Those tilesets would simply come without the corresponding charset file, and REXPaint would behave like it does now if the user asks for a txt export. (assume modified ANSI charset)

Then I would modify my importers to ask for those files as well, instead of requiring the user to insert a charset manually when loading an .xp file. People who use REXPaint to make text art for the terminal (like me) would benefit from this.

19
Everything REXPaint / Re: a Font Atlas Generator
« on: August 17, 2020, 12:46:29 PM »
I take this opportunity to ask the devs one or two things about fonts in REXPaint:
I'm working with some friends on a demo for a text graphic library I've been working on, which will consists in a text-art animation runnable from the terminal. Notice text-art animation, not ASCII, not ANSI, not PETSCII. The library supports full unicode.

I'm in the process of choosing an editor or two to support natively (the library is just a graphic library, it provides an "objects with sprites" environment, like Scratch, I'd like to encourage the usage of a proper editor to draw the sprites).
With the latest update rexpaint came a lot closer to an "unicode editor", with the addition of extended fonts. This way we can use the atlas more like a palette, we pick a charset of unicode characters and we use them.

This tile-based approach is quite common, and probably versatile, (also required if dealing with PETscii art: I've found out from talking with Polyducks that the commodore's glyphs have just been added to unicode, almost no fonts support them yet), but it's incomplete, as the "text" concept is lost.
Playscii deals with this by using some metadata along the atlas to pair up every tile with the corresponding character. It would be nice if rexpaint supported this too, to have a proper tex export feature. (that now is just a gimmick from what i gather, as the characters are hard-coded from the default charset).

lvllvl.com has the same "issue" as now, it's something that becomes apparent as soon as different charsets are allowed.

If the glyphs used do not resemble any unicode character (or no metadata is provided), the export behaviour may be the same as now, backward compatible.
This, or the charset would have to be explicitly defined every time a .xp file is loaded in my library, because i use real text. Would be nice to have a native format.

20
Everything REXPaint / a Font Atlas Generator
« on: August 17, 2020, 08:38:57 AM »
After a day spent trying various font atlas generators unsuccessfully, I got upset and made one that provided the features I needed:
  • Custom font support
  • Custom charset
  • User-defined font fallback stack
  • No sprite packing
  • Supersampling
  • Offline support
Out of perhaps a dozen tools I've tried, some extremely old and some newer, none supported all three, so, if you're interested, you can try it out:
Font Atlas Generator

an extract from the readme:
Quote
Generate a texture atlas from a specified font's glyphs, that you can use on REXPaint, lvllvl.com, Playscii, ecc
  • write the glyphs you want to use (charset), the default one is REXPaint's default
  • enter the font name if you have it already available in your system (e.g. it's installed), otherwise, you can load a font file
  • tweak the settings to achieve the desired layout
  • save the image by clicking on save image

Note: due to the way text is rendered in the HTML Canvas, the output will not look good by default for very small font sizes. It's a matter of anti-aliasing algorithms, which are not designed to work with such tight pixel counts. You can try using supersampling+uncheck smooth scaling to get better results.
Keep in mind that the smaller you go, the less sense it makes to use a full-fledged font file.

21
Everything REXPaint / Re: REXPaint's markown manual
« on: August 06, 2020, 03:04:04 AM »
The manual was updated for v1.50

22
Everything REXPaint / REXPaint's markown manual
« on: June 03, 2020, 04:04:24 AM »
The txt version was a bit dense and the html version was a bit dispersed, so I've made a markdown one!
You can export it to pdf, image, html, everything you like, and you're free to choose the appearance you prefer. It's a very well written manual and deserves a formatted version.
Of course, you can do with the files/contents everything you can do with the original, no additional mentions or stuff like that.

I've tried to automate the conversion to some extent, but everything else has been done by hand, so there could be some issues that slipped, but that's why
it's on GitHub, so you can notify issues or propose fixes

view it on GitHub

If you just want to download it, right click here, and choose "save link as" to choose where to save it.

If you're interested in sending a pull request, please check the formatting guidelines






Pages: [1]