diff options
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs')
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs index 2aeda98637..79ae4bcf25 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs @@ -28,6 +28,7 @@ using Gtk; using Mono.TextEditor; using System.Text; using MonoDevelop.Core; +using MonoDevelop.Ide.Editor; namespace MonoDevelop.SourceEditor { @@ -284,11 +285,19 @@ namespace MonoDevelop.SourceEditor private SourceEditorPrintSettings () { - Font = DefaultSourceEditorOptions.Instance.Font; + try { + Font = Pango.FontDescription.FromString (DefaultSourceEditorOptions.Instance.FontName); + } catch { + Console.WriteLine ("Could not load font: {0}", DefaultSourceEditorOptions.Instance.FontName); + } + if (Font == null || String.IsNullOrEmpty (Font.Family)) + Font = Pango.FontDescription.FromString (TextEditorOptions.DEFAULT_FONT); + //if (Font != null) + // Font.Size = (int)(Font.Size * DefaultSourceEditorOptions.Instance.Zoom); TabSize = DefaultSourceEditorOptions.Instance.TabSize; HeaderFormat = "%F"; FooterFormat = GettextCatalog.GetString ("Page %N of %Q"); - ColorScheme = "default"; + ColorScheme = MonoDevelop.Ide.Editor.Highlighting.ColorScheme.DefaultColorStyle; HeaderSeparatorWeight = FooterSeparatorWeight = 0.5; HeaderPadding = FooterPadding = 6; UseHighlighting = true; |