From ba6c1f7c6dfb6695f9d99be8ee2950c917043a4d Mon Sep 17 00:00:00 2001 From: niksedk Date: Fri, 13 Jan 2012 22:31:49 +0000 Subject: [PATCH] Minor fixes for Linux version git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@930 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Forms/ExportPngXml.cs | 4 +++- src/Logic/BluRaySup/BluRaySupPicture.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Forms/ExportPngXml.cs b/src/Forms/ExportPngXml.cs index 7d75f316a..5f9354a29 100644 --- a/src/Forms/ExportPngXml.cs +++ b/src/Forms/ExportPngXml.cs @@ -469,7 +469,7 @@ namespace Nikse.SubtitleEdit.Forms catch (Exception exception) { MessageBox.Show(exception.Message); - font = new Font("Verdana", parameter.SubtitleFontSize); + font = new Font(FontFamily.Families[0].Name, parameter.SubtitleFontSize); } var bmp = new Bitmap(400, 200); var g = Graphics.FromImage(bmp); @@ -637,6 +637,8 @@ namespace Nikse.SubtitleEdit.Forms if (string.Compare(x.Name, _subtitleFontName, true) == 0) comboBoxSubtitleFont.SelectedIndex = comboBoxSubtitleFont.Items.Count - 1; } + if (comboBoxSubtitleFont.SelectedIndex == -1) + comboBoxSubtitleFont.SelectedIndex = 0; // take first font if default font not found (e.g. linux) subtitleListView1.Fill(_subtitle); subtitleListView1.SelectIndexAndEnsureVisible(0); diff --git a/src/Logic/BluRaySup/BluRaySupPicture.cs b/src/Logic/BluRaySup/BluRaySupPicture.cs index 7516833a5..354e72cd5 100644 --- a/src/Logic/BluRaySup/BluRaySupPicture.cs +++ b/src/Logic/BluRaySup/BluRaySupPicture.cs @@ -619,7 +619,7 @@ namespace Nikse.SubtitleEdit.Logic.BluRaySup ToolBox.SetWord(headerPCSStart, 2, h); // cropped height ToolBox.SetByte(headerPCSStart, 4, fpsId); ToolBox.SetWord(headerPCSStart, 5, pic.CompositionNumber); - headerPCSStart[14] = (byte)(pic.IsForced ? (byte)0x40 : 0); + headerPCSStart[14] = (byte)(pic.IsForced ? 0x40 : 0); ToolBox.SetWord(headerPCSStart, 15, pic.WindowXOffset); ToolBox.SetWord(headerPCSStart, 17, yOfs); for (int i = 0; i < headerPCSStart.Length; i++)