[Ttssh2-commit] [4412] DEC 特殊文字でも高輝度 / 下線属性でフォントが太字 / 下線付きになるようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 4月 4日 (月) 17:42:54 JST


Revision: 4412
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4412
Author:   doda
Date:     2011-04-04 17:42:54 +0900 (Mon, 04 Apr 2011)

Log Message:
-----------
DEC 特殊文字でも高輝度/下線属性でフォントが太字/下線付きになるようにした。

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtdisp.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2011-04-03 15:33:06 UTC (rev 4411)
+++ trunk/teraterm/teraterm/vtdisp.c	2011-04-04 08:42:54 UTC (rev 4412)
@@ -1950,10 +1950,28 @@
 
   strncpy_s(VTlf.lfFaceName, sizeof(VTlf.lfFaceName),"Tera Special", _TRUNCATE);
   VTFont[AttrSpecial] = CreateFontIndirect(&VTlf);
-  VTFont[AttrSpecial | AttrBold] = VTFont[AttrSpecial];
-  VTFont[AttrSpecial | AttrUnder] = VTFont[AttrSpecial];
-  VTFont[AttrSpecial | AttrBold | AttrUnder] = VTFont[AttrSpecial];
 
+  /* Special font (Underline) */
+  VTlf.lfUnderline = 1;
+  VTlf.lfHeight = FontHeight - 1; // adjust for underline
+  VTFont[AttrSpecial | AttrUnder] = CreateFontIndirect(&VTlf);
+
+  if (ts.FontFlag & FF_BOLD) {
+    /* Special font (Bold) */
+    VTlf.lfUnderline = 0;
+    VTlf.lfHeight = FontHeight;
+    VTlf.lfWeight = FW_BOLD;
+    VTFont[AttrSpecial | AttrBold] = CreateFontIndirect(&VTlf);
+    /* Special font (Bold + Underline) */
+    VTlf.lfUnderline = 1;
+    VTlf.lfHeight = FontHeight - 1; // adjust for underline
+    VTFont[AttrSpecial | AttrBold | AttrUnder] = CreateFontIndirect(&VTlf);
+  }
+  else {
+    VTFont[AttrSpecial | AttrBold] = VTFont[AttrSpecial];
+    VTFont[AttrSpecial | AttrBold | AttrUnder] = VTFont[AttrSpecial | AttrUnder];
+  }
+
   SetLogFont();
 
   for (i = 0 ; i < TermWidthMax; i++)



Ttssh2-commit メーリングリストの案内
Back to archive index