fodev.net

FOnline Development => General Discussion => Topic started by: PennVault on February 22, 2015, 06:41:02 am

Title: FOnline UI font?
Post by: PennVault on February 22, 2015, 06:41:02 am
Hello all. I was wondering if anyone's made a .ttf version of the interface font for FOnline yet. I'm developing a Fallout sprite comic series at the moment and this would be really handy as a resource.
Title: Re: FOnline UI font?
Post by: Wipe on February 22, 2015, 01:02:50 pm
If that's about messagebox font, check jh_fallout-webfont.* (https://github.com/rotators/fodev-status/tree/master/html/fonts/), originally used on ServerBoy (http://www.riget.info/index.php?page=fonlineProjects) by CptRookie (http://fodev.net/forum/index.php?action=profile;u=22).

As for other fonts FOnline uses, i don't think there are .ttf versions - at least i couldn't find any which will be exactly same as ingame. If you're fine about generating images with your text, i wrote small php class (https://github.com/wipe2238/fowww/blob/master/FOnlineFont.php) for automating the process. It can read any .fofnt file [version 2] as well as colorize the output.

Code: (php) [Select]
$font = new FOnlineFont( 'path/to/file.fofnt' );
$image = $font->TextToImage( "Hello world!" );
$image_color = $font->TextToImage( "Hello world!", 255, 51, 153 ); // Wild Strawberry

Note that FOnlineFont class is extremly paranoid and will die() on first spotted error; if you're not sure if given font contains all letters in your string, validate it first.

Code: (php) [Select]
$text = "Hello world!";
$font = new FOnlineFont( 'path/to/file.fofnt' );
$image = NULL;
if( $font->TextValid($text) )
    $image = $font->TextToImage( $text );
else
    $image = your_function_to_generate_error_image();
Title: Re: FOnline UI font?
Post by: PennVault on February 22, 2015, 03:06:29 pm
Thanks for the quick reply. :) Unfortunately JH_Fallout distorts when typed at a face small enough to match the default font size in FOnline or even classic Fallout.  I might just have to generate the text. :-/

Since I've never used PHP before, could you please tell me what I'll need?
Title: Re: FOnline UI font?
Post by: Wipe on February 24, 2015, 09:13:35 pm
Umm you sure about that? Font looks fine for me, at least here (http://fodev.net/status/server/fo2238/) [below logo] :-\
Title: Re: FOnline UI font?
Post by: PennVault on March 01, 2015, 06:46:02 am
It's the lowercase A. The A starts to look exactly like the O when used at a small enough font level in PhotoShop and anything else with a word processor on my machine.