Spherical forums

Sphere Development => Resources => Topic started by: Flying Jester on December 07, 2015, 09:56:37 pm

Title: Some Fonts for Sphere
Post by: Flying Jester on December 07, 2015, 09:56:37 pm
I haven't been all that active in Sphere development these days, but most of my newer projects are still using Sphere-related tech in some way :)

Most consistently I've been using Sphere-format fonts in my other projects. As such, I've got a few fairly good-quality, free-use fonts converted for Sphere-compatible setups, as well as a simple library (well...) for using Sphere fonts in C/C++. I've commited the fonts to the Sphere Group, and the script is up on RMN.

Fonts:
MS Selawik (https://github.com/sphere-group/Selawik), a sans-serif font that looks pretty nice in bold.
SGI Screen (https://github.com/sphere-group/sgi_screen), a classic monospace font.

Both of these fonts were previously proprietary, but have since been released as open by their owners (Microsoft and SGI, respectively).

Sphere Fonts C Source:
http://rpgmaker.net/engines/custom/utilities/102/ (http://rpgmaker.net/engines/custom/utilities/102/)

I've been using a slightly modified version of this utility in a full-custom game I've been working on. It's setup for use with SDL2, but it's pretty simple to modify it to use any other format (such as here (https://github.com/FlyingJester/AthenaTBS/blob/master/src/font.c)). This is particularly interesting because I've ensured that it works via Emscripten, so you could use it to parse rfn fonts on the web.
Title: Re: Some Fonts for Sphere
Post by: N E O on December 08, 2015, 02:21:19 pm

This is particularly interesting because I've ensured that it works via Emscripten, so you could use it to parse rfn fonts on the web.


Out of curiosity, have you benchmarked it against the handwritten reference implementation (https://github.com/sphere-group/web-sphere-utilities/blob/master/rpg.font.js) yet? I'd love to find out which is faster.
Title: Re: Some Fonts for Sphere
Post by: DaVince on December 13, 2015, 06:54:23 pm
Nice! Would you consider uploading them to the Resources folder in the downloads repo too? :)
Title: Re: Some Fonts for Sphere
Post by: Flying Jester on December 19, 2015, 06:06:58 am
@Neo: My implementation is probably faster, mostly just because I do no format conversion and emscripten tends to be just a little faster anyways. I've used it in a couple emscripten/SDL2 demos, and the performance has been quite good.

@DaVince: I certainly can. I need to re-figure-out how to actually do that...
Title: Re: Some Fonts for Sphere
Post by: FBnil on December 25, 2015, 08:05:29 pm
@FJ: I like the Selawik, very useful proportional font. The SGI looks unfinished, what are those weird things before chr 32? Still, good font too.
Title: Re: Some Fonts for Sphere
Post by: N E O on December 26, 2015, 04:12:03 pm
Everything before chr 32 are supposed to be control characters and not usually give visible change when typing except for carriage return, line feed, tab, and maybe vertical tab.
Title: Re: Some Fonts for Sphere
Post by: Flying Jester on December 26, 2015, 07:16:05 pm
Some fonts also use them for box-drawing characters, like what you see in curses. I'm pretty sure Selawik does this, I've seen those characters when I accidentally fed it garbage.

Either way, most of those characters other than the whitespace are control characters that will usually not be used.
Title: Re: Some Fonts for Sphere
Post by: DaVince on December 29, 2015, 11:52:28 pm

@DaVince: I certainly can. I need to re-figure-out how to actually do that...

Just log in to Google Drive, the Spherical folder should be in your "shared with me" section! :)
Title: Re: Some Fonts for Sphere
Post by: Fat Cerberus on December 30, 2015, 12:50:31 pm
Just got a chance to look at these.  SGI Screen is nice, reminds me of a monospace version of the default Sphere font (which I love).  Selawik looks like it was converted with antialiasing turned on, which doesn't look very nice at low resolutions.  It's also a bit on the larger side, though that might be intentional.
Title: Re: Some Fonts for Sphere
Post by: Flying Jester on December 30, 2015, 07:28:07 pm
I ran Selawik at a few sizes and faces. The bold variants look much better than the other ones, although even then they are a little blurry. I've been meaning to do a little cleanup.

The SGI font is also a bit big, but it looks pretty good. Probably because it is converted from a Type 1 font, rather than truetype.
Title: Re: Some Fonts for Sphere
Post by: Fat Cerberus on December 30, 2015, 08:21:48 pm
My favorite monospace font to use for low-res (320x240) games was always Lucida Console @ 7pt.  That's generally a pretty bland and somewhat ugly font (which is why I rejoiced when Vista introduced Consolas), but at small point sizes it's just perfect.