[Ttssh2-commit] [6856] フォント設定ダイアログで非表示フォントを一覧に表示できるようにした Ticket : #35733

svnno****@sourc***** svnno****@sourc*****
2017年 7月 12日 (水) 18:25:47 JST


Revision: 6856
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6856
Author:   doda
Date:     2017-07-12 18:25:47 +0900 (Wed, 12 Jul 2017)
Log Message:
-----------
フォント設定ダイアログで非表示フォントを一覧に表示できるようにした Ticket: #35733

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/35733

Modified Paths:
--------------
    trunk/installer/release/TERATERM.INI
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/ttpdlg/ttdlg.c
    trunk/teraterm/ttpset/ttset.c

-------------- next part --------------
Modified: trunk/installer/release/TERATERM.INI
===================================================================
--- trunk/installer/release/TERATERM.INI	2017-07-11 11:24:23 UTC (rev 6855)
+++ trunk/installer/release/TERATERM.INI	2017-07-12 09:25:47 UTC (rev 6856)
@@ -535,6 +535,9 @@
 ; Language selection
 LanguageSelection=on
 
+; List hiddeon fonts (Windows 7 or later)
+ListHiddenFonts=off
+
 ; Lock Terminal Unique ID
 LockTUID=on
 

Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2017-07-11 11:24:23 UTC (rev 6855)
+++ trunk/teraterm/common/tttypes.h	2017-07-12 09:25:47 UTC (rev 6856)
@@ -640,7 +640,7 @@
 	int ZmodemTimeOutInit;
 	int ZmodemTimeOutFin;
 	WORD WaitCom;
-	WORD Dummy5;	// \x8B\x8CTrimTrailingNLonPaste. PasteFlag\x82ɓ\x9D\x8D\x87\x82\xB5\x82\xBD\x88הp\x8E~\x81B\x91\xBC\x82֓]\x97p
+	WORD ListHiddenFonts;
 	char LogTimestampFormat[48];
 };
 

Modified: trunk/teraterm/ttpdlg/ttdlg.c
===================================================================
--- trunk/teraterm/ttpdlg/ttdlg.c	2017-07-11 11:24:23 UTC (rev 6855)
+++ trunk/teraterm/ttpdlg/ttdlg.c	2017-07-12 09:25:47 UTC (rev 6856)
@@ -3507,6 +3507,9 @@
 	return FALSE;
 }
 
+#ifndef CF_INACTIVEFONTS
+#define CF_INACTIVEFONTS 0x02000000L
+#endif
 BOOL PASCAL ChooseFontDlg(HWND WndParent, LPLOGFONT LogFont, PTTSet ts)
 {
 	CHOOSEFONT cf;
@@ -3519,6 +3522,9 @@
 	cf.Flags = CF_SCREENFONTS | CF_INITTOLOGFONTSTRUCT |
 	           CF_FIXEDPITCHONLY | CF_SHOWHELP | CF_NOVERTFONTS |
 	           CF_ENABLEHOOK;
+	if (ts->ListHiddenFonts) {
+		cf.Flags |= CF_INACTIVEFONTS;
+	}
 	cf.lpfnHook = (LPCFHOOKPROC)(&TFontHook);
 	cf.nFontType = REGULAR_FONTTYPE;
 	cf.hInstance = hInst;

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2017-07-11 11:24:23 UTC (rev 6855)
+++ trunk/teraterm/ttpset/ttset.c	2017-07-12 09:25:47 UTC (rev 6856)
@@ -1968,6 +1968,9 @@
 	// Disable SO/SI.
 	ts->EnableSOSI = GetOnOff(Section, "EnableSOSI", FName, TRUE);
 
+	// List Inactive Font
+	ts->ListHiddenFonts = GetOnOff(Section, "ListHiddenFonts", FName, FALSE);
+
 	// Fallback to CP932 (Experimental)
 	ts->FallbackToCP932 = GetOnOff(Section, "FallbackToCP932", FName, FALSE);
 
@@ -3242,6 +3245,9 @@
 	// Disable SO/SI.
 	WriteOnOff(Section, "EnableSOSI", FName, ts->EnableSOSI);
 
+	// List Inactive Font
+	WriteOnOff(Section, "ListHiddenFonts", FName, ts->ListHiddenFonts);
+
 	// CygTerm Configuration File
 	WriteCygtermConfFile(ts);
 }



Ttssh2-commit メーリングリストの案内