|
From: Shigeharu T. <sh...@ie...> - 2005-01-07 05:03:21
|
shige 01/07 2005
----------------
I found a bug of term/tgif.trm. On tgif terminal, write_multiline
use the specified font in the first line, but in the following
lines the font setting is reset and default font is used.
The following small patch may fix it and this includes the code
for t->set_font("").
----- From here -----
*** term/tgif.trm.ORG Thu Jan 6 12:11:10 2005
--- term/tgif.trm Fri Jan 7 13:44:48 2005
***************
*** 720,728 ****
--- 720,730 ----
uActNr += 2;
+ #if 0
/* reset font size and font, they might have been changed */
uActFontSize = uDefaultFontSize;
strcpy(sActFont, sDefaultFont);
+ #endif
} /* TGIF_put_text */
/*}}} */
***************
*** 1588,1594 ****
TERM_PUBLIC int
TGIF_set_font(const char *font)
{
! int sep = strcspn(font, ",");
if (sep > 0) {
strncpy(sActFont, font, sep);
sActFont[sep] = NUL;
--- 1590,1600 ----
TERM_PUBLIC int
TGIF_set_font(const char *font)
{
! int sep;
!
! if (!font || !(*font))
! font = sDefaultFont;
! sep = strcspn(font, ",");
if (sep > 0) {
strncpy(sActFont, font, sep);
sActFont[sep] = NUL;
----- To here -----
+========================================================+
Shigeharu TAKENO NIigata Institute of Technology
kashiwazaki,Niigata 945-1195 JAPAN
sh...@ie... TEL(&FAX): +81-257-22-8161
+========================================================+
|