Spherical forums

Sphere Development => Sphere Support => Font Support => Topic started by: Miscreant on August 19, 2017, 10:31:03 pm

Title: ZeC: Fonts
Post by: Miscreant on August 19, 2017, 10:31:03 pm
I have a lengthy message in ZeC that I am trying to keep within the borders of the message box. As you can see from the screencaps only 1 font comes close without having to resize the box. Might anyone know of some other fonts that might function as intended?
Title: Re: ZeC: Fonts
Post by: Fat Cerberus on August 19, 2017, 11:42:29 pm
If you're trying to fit text within the bounds of a box and you know the size of the box, then the Sphere v1 API has two functions for that purpose:

Font#wordWrapString() word-wraps text in advance and gives you an array of strings you can draw line-by-line later:
https://github.com/sphere-group/sphere/blob/master/sphere/docs/development/api.txt#L1526-L1528

Font#drawTextBox() does the word-wrapping and rendering in one step:
https://github.com/sphere-group/sphere/blob/master/sphere/docs/development/api.txt#L1514-L1525

Then you can use any font you want. 8)
Title: Re: ZeC: Fonts
Post by: Miscreant on August 19, 2017, 11:46:33 pm

Font#drawTextBox() does the word-wrapping and rendering in one step:
https://github.com/sphere-group/sphere/blob/master/sphere/docs/development/api.txt#L1514-L1525

Then you can use any font you want. 8)

The boxes are being drawn with Font#drawTextBox already or I should say the text is. Refering to screencaps 3, 4, 5. The first is a copy of the font from final fantasy 2 or 3. The second was the original font I was using and the 3rd is the default system font from sphere.
Title: Re: ZeC: Fonts
Post by: Miscreant on August 20, 2017, 01:34:17 am
I went through the downloads repository and downloaded a buch of different things trying to find fonts i could use. I also imported over 50 windows fonts of varying sizes. The only font I have found so far is one that (I think it was @DaVince ) is called s_capt.rfn. I'm still trying to find a font though.

Below is a screencap of the s_capt font in use.

Until I find a font that goes well with the rest of ZeC, may I use the s_capt font?
Title: Re: ZeC: Fonts
Post by: Miscreant on August 20, 2017, 02:38:37 am
Quick note: Looking at the author info from the sphere project with s_capt.rfn, it is listed as NeoLogiX not DaVince.
Title: Re: ZeC: Fonts
Post by: DaVince on August 21, 2017, 07:54:01 am
Anything in the downloads repository is exactly there to be used, and I'm sure N E O would be more than flattered if you did. :)

Don't forget, you could always try importing a ttf-based pixel font too! The original editor has a Windows font to Sphere font converter and I believe miniSphere may even support TTF natively.
Title: Re: ZeC: Fonts
Post by: Miscreant on August 21, 2017, 08:48:10 am
I also imported over 50 windows fonts of varying sizes.