- added ifdef INTERNATIONAL for changes in interface.c

- changed switching to smaller/larger fonts, it now does only 1 pnt size.
  with standard font (11), medium is 10, small 9
This commit is contained in:
2003-10-23 22:28:49 +00:00
parent 734637215b
commit 904c039e3c
3 changed files with 26 additions and 24 deletions

View File

@@ -185,8 +185,8 @@ int FTF_TTFont::SetFont(char* str, int size)
fontl = new FTGLPixmapFont(str);
success = fonts->FaceSize(size-2<8?8:size-2);
success = fontm->FaceSize(size);
success = fontl->FaceSize(size+2);
success = fontm->FaceSize(size-1<8?8:size-1);
success = fontl->FaceSize(size);
if(!success) return 0;
success = fonts->CharMap(ft_encoding_unicode);
@@ -238,8 +238,8 @@ void FTF_TTFont::SetEncoding(char* str)
void FTF_TTFont::SetSize(int size)
{
fonts->FaceSize(size-2<8?8:size-2);
fontm->FaceSize(size);
fontl->FaceSize(size+2);
fontm->FaceSize(size-1<8?8:size-1);
fontl->FaceSize(size);
font_size = size;
}

View File

@@ -466,7 +466,6 @@ static void ui_positionblock(uiBlock *block, uiBut *but)
ui_graphics_to_window(block->win, &block->minx, &block->miny);
ui_graphics_to_window(block->win, &block->maxx, &block->maxy);
}
@@ -1695,7 +1694,7 @@ static int ui_do_but_BLOCK(uiBut *but)
but->flag |= UI_SELECT;
ui_draw_but(but);
block= but->block_func(0);
block= but->block_func(but->poin);
block->xofs = -2; /* for proper alignment */
ui_positionblock(block, but);
@@ -2354,6 +2353,24 @@ static int ui_mouse_motion_towards_block(uiBlock *block, uiEvent *uevent)
return 0;
}
static void ui_set_ftf_font(uiBlock *block)
{
#ifdef INTERNATIONAL
if(block->aspect<1.15) {
FTF_SetFontSize('l');
}
else if(block->aspect<1.59) {
FTF_SetFontSize('m');
}
else {
FTF_SetFontSize('s');
}
#endif
}
/* return:
* UI_NOTHING pass event to other ui's
* UI_CONT don't pass event to other ui's
@@ -3055,21 +3072,6 @@ static void ui_set_but_val(uiBut *but, double value)
}
static void ui_set_ftf_font(uiBlock *block)
{
if(block->aspect<1.05) {
FTF_SetFontSize('l');
}
else if(block->aspect<1.59) {
FTF_SetFontSize('m');
}
else {
FTF_SetFontSize('s');
}
}
void uiSetCurFont(uiBlock *block, int index)
{

View File

@@ -212,7 +212,7 @@ void start_interface_font(void) {
}
} else {
U.language= 0;
U.fontsize= 10;
U.fontsize= 11;
U.encoding= 0;
#if defined (__APPLE__)