REXPaint > Everything REXPaint

a Font Atlas Generator

(1/6) > >>

Lucide:
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 supportOut 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
--- End quote ---

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.

Lucide:
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.

Kyzrati:

--- Quote from: Lucide 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:

--- End quote ---
This is awesome! Thanks for sharing :D

Later I'll definitely even want to put a link to this over on the Resources page. To be honest I, too, have never found such a generator that I liked (I've tried many over the years), but yours looks just great.

(By the way, sorry took me a bit to reply--I saw your posts and skimmed them, and even though I've been intermittently responding to other things in the meantime, this thread looked like it would require more thought and attention than I've had recently so I needed to wait for the right opportunity :P)


--- Quote from: Lucide on August 17, 2020, 12:46:29 PM ---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).

--- End quote ---
So what is the specific output here? 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? REXPaint currently does have text-based exporting, although it uses UTF-8 and the default CP437 codepoints.

What is needed here? Just making sure I'm getting this right since I'm not 100% sure I am :P

Lucide:
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?
--- End quote ---
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.

gumix:
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!)

Navigation

[0] Message Index

[#] Next page

Go to full version