Made a common static load of the mono spaced font

This commit is contained in:
Lars Brubaker 2016-08-10 15:40:09 -07:00
parent 0d2e60a1dc
commit ef0f2be119
7 changed files with 26 additions and 13 deletions

View file

@ -1213,8 +1213,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
case SliceSettingData.DataEditTypes.MULTI_LINE_TEXT:
{
string convertedNewLines = sliceSettingValue.Replace("\\n", "\n");
string pathToFont = StaticData.Instance.ReadAllText(Path.Combine("Fonts", "LiberationMono.svg"));
var stringEdit = new MHTextEditWidget(convertedNewLines, pixelWidth: 320, pixelHeight: multiLineEditHeight, multiLine: true, tabIndex: tabIndexForItem++, typeFace: TypeFace.LoadFrom(pathToFont))
var stringEdit = new MHTextEditWidget(convertedNewLines, pixelWidth: 320, pixelHeight: multiLineEditHeight, multiLine: true, tabIndex: tabIndexForItem++, typeFace: ApplicationController.MonoSpacedTypeFace)
{
HAnchor = HAnchor.ParentLeftRight,
};