Browse Source

fix "Only TrueType fonts are supported. This is not a TrueType font."

tags/3.0
Gang Zhuo 9 years ago
parent
commit
2ec1340261
1 changed files with 12 additions and 4 deletions
  1. +12
    -4
      shadowsocks-csharp/View/LogForm.cs

+ 12
- 4
shadowsocks-csharp/View/LogForm.cs View File

@@ -134,11 +134,19 @@ namespace Shadowsocks.View
private void ChangeFontButton_Click(object sender, EventArgs e)
{
FontDialog fd = new FontDialog();
fd.Font = LogMessageTextBox.Font;
if (fd.ShowDialog() == DialogResult.OK)
try
{
LogMessageTextBox.Font = fd.Font;
FontDialog fd = new FontDialog();
fd.Font = LogMessageTextBox.Font;
if (fd.ShowDialog() == DialogResult.OK)
{
LogMessageTextBox.Font = new Font(fd.Font.FontFamily, fd.Font.Size, fd.Font.Style);
}
}
catch (Exception ex)
{
Logging.LogUsefulException(ex);
MessageBox.Show(ex.Message);
}
}


Loading…
Cancel
Save