Now ji_font_load_bmp() uses ji_apply_guiscale() to resize the bitmap font.

This commit is contained in:
David Capello 2010-03-08 22:58:46 -02:00
parent 5af4ed0d55
commit f0cb918717

View File

@ -40,6 +40,35 @@
#include "jinete/jfont.h"
#include "jinete/jintern.h"
#include "jinete/jtheme.h"
FONT* ji_font_load(const char* filepathname)
{
FONT* f = ji_font_load_bmp(filepathname);
if (!f)
f = ji_font_load_ttf(filepathname);
return f;
}
FONT* ji_font_load_bmp(const char* filepathname)
{
int old_color_conv = _color_conv;
FONT* f = NULL;
PALETTE junk;
BITMAP *bmp;
set_color_conversion(COLORCONV_NONE);
bmp = load_bitmap(filepathname, junk);
set_color_conversion(old_color_conv);
if (bmp) {
bmp = ji_apply_guiscale(bmp);
f = _ji_bitmap2font(bmp);
destroy_bitmap(bmp);
}
return f;
}
/**********************************************************************/
#if 1 /* with FreeType */
@ -326,33 +355,6 @@ void _ji_font_exit()
}
}
FONT* ji_font_load(const char *filepathname)
{
FONT* f = ji_font_load_bmp(filepathname);
if (!f)
f = ji_font_load_ttf(filepathname);
return f;
}
FONT* ji_font_load_bmp(const char *filepathname)
{
int old_color_conv = _color_conv;
FONT* f = NULL;
PALETTE junk;
BITMAP *bmp;
set_color_conversion(COLORCONV_NONE);
bmp = load_bitmap(filepathname, junk);
set_color_conversion(old_color_conv);
if (bmp) {
f = _ji_bitmap2font(bmp);
destroy_bitmap(bmp);
}
return f;
}
FONT* ji_font_load_ttf(const char *filepathname)
{
FONT_AA_DATA* af;
@ -941,33 +943,6 @@ void _ji_font_exit()
{
}
FONT* ji_font_load(const char* filepathname)
{
FONT* f = ji_font_load_bmp(filepathname);
if (!f)
f = ji_font_load_ttf(filepathname);
return f;
}
FONT* ji_font_load_bmp(const char* filepathname)
{
int old_color_conv = _color_conv;
FONT* f = NULL;
PALETTE junk;
BITMAP *bmp;
set_color_conversion(COLORCONV_NONE);
bmp = load_bitmap(filepathname, junk);
set_color_conversion(old_color_conv);
if (bmp) {
f = _ji_bitmap2font(bmp);
destroy_bitmap(bmp);
}
return f;
}
FONT* ji_font_load_ttf(const char* filepathname)
{
return NULL;