Bug in Telnet

Topics: Developer Forum
Oct 15, 2008 at 3:11 AM
"Edit Connection" - "Telnet" - "Font:"
I see not font name, but: "[Font: Name=Courier New, Size=9.75, Units=3, GdiCharSet=0, GdiVerticalFont=False]"
When i press "..." nothing hapen. 
In CurrentLog.txt:
FATAL 2008-10-15 10:31:50,101 151298045ms Terminals              on_ThreadException - Application Exception
System.ArgumentException: Значение '0' недопустимо для 'emSize'. 'emSize' должно быть больше 0 и меньше или равно System.Single.MaxValue.
Имя параметра: emSize
   в System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   в System.Drawing.Font..ctor(String familyName, Single emSize)
   в Terminals.FontParser.ParseFontName(String FontName) в C:\Source\Terminals\Terminals\FontParser.cs:строка 26
   в Terminals.NewTerminalForm.TelnetFontButton_Click(Object sender, EventArgs e) в C:\Source\Terminals\Terminals\NewTerminalForm.cs:строка 599
   в System.Windows.Forms.Control.OnClick(EventArgs e)
   в System.Windows.Forms.Button.OnClick(EventArgs e)
   в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   в System.Windows.Forms.Control.WndProc(Message& m)
   в System.Windows.Forms.ButtonBase.WndProc(Message& m)
   в System.Windows.Forms.Button.WndProc(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

P.S. thanks fo the good programm and i'am sorry for my english
Oct 26, 2008 at 7:14 PM
Ahh, the font name parsing is done manually (very ugly) and it looks like its broken for some non-english language locales.

I will have to come up with a new way to handle this...