Skip to content

Commit 4839c4c

Browse files
committed
removed prism/nodejs stuff
1 parent f7aca77 commit 4839c4c

File tree

17 files changed

+107
-1151
lines changed

17 files changed

+107
-1151
lines changed

src/WinPrint.Console/WinPrint.Console.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AssemblyName>winprint</AssemblyName>
1010
<StartupObject></StartupObject>
1111

12-
<Version>2.0.3.82</Version>
12+
<Version>2.0.3.90</Version>
1313
<Company>Kindel Systems</Company>
1414
<Product>winprint</Product>
1515
<Authors>Charlie Kindel</Authors>

src/WinPrint.Core/ContentTypeEngines/AnsiCte.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ public override void PaintPage(Graphics g, int pageNum) {
227227
float xPos = lineNumberWidth;
228228
foreach (var run in _screen.Lines[i].Runs) {
229229
System.Drawing.Font font = _cachedFont;
230-
if (run.Attributes.Bold) {
230+
if (!ContentSettings.DisableFontStyles && run.Attributes.Bold) {
231231
if (run.Attributes.Italic) {
232232
font = new System.Drawing.Font(_cachedFont.FontFamily, _cachedFont.SizeInPoints, FontStyle.Bold | FontStyle.Italic, GraphicsUnit.Point);
233233
}
234234
else {
235235
font = new System.Drawing.Font(_cachedFont.FontFamily, _cachedFont.SizeInPoints, FontStyle.Bold, GraphicsUnit.Point);
236236
}
237237
}
238-
else if (run.Attributes.Italic) {
238+
else if (!ContentSettings.DisableFontStyles && run.Attributes.Italic) {
239239
font = new System.Drawing.Font(_cachedFont.FontFamily, _cachedFont.SizeInPoints, FontStyle.Italic, GraphicsUnit.Point);
240240
}
241241
var fg = Color.Black;

src/WinPrint.Core/ContentTypeEngines/PrismCte.cs

Lines changed: 0 additions & 388 deletions
This file was deleted.

src/WinPrint.Core/Models/ContentSettings.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ public class ContentSettings : ModelBase {
4141
public string Style { get => _style; set => SetField(ref _style, value); }
4242
private string _style = string.Empty;
4343

44+
/// <summary>
45+
/// Disables font styles (bold, italic, underline).
46+
/// </summary>
47+
[SafeForTelemetry]
48+
public bool DisableFontStyles { get => _disableFontStyles; set => SetField(ref _disableFontStyles, value); }
49+
private bool _disableFontStyles = false;
50+
4451
/// <summary>
4552
/// If true, content will be drawn with line numbers (if supported)
4653
/// </summary>

src/WinPrint.Core/Models/Settings.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,9 @@ public int NumSheets {
9696
/// <summary>
9797
/// Content type handlers
9898
/// </summary>
99-
// public Dictionary<string, ContentBase> ContentTypes { get; set; }
10099
public AnsiCte AnsiContentTypeEngineSettings { get; set; }
101100
public TextCte TextContentTypeEngineSettings { get; set; }
102101
public HtmlCte HtmlContentTypeEngineSettings { get; set; }
103-
public PrismCte PrismContentTypeEngineSettings { get; set; }
104102

105103
/// <summary>
106104
/// File Type Mappings - note legacy property name. Don't change.
@@ -266,16 +264,6 @@ public static Settings CreateDefaultSettings() {
266264
//},
267265
},
268266

269-
PrismContentTypeEngineSettings = new PrismCte() {
270-
//ContentSettings = new ContentSettings() {
271-
// Font = new Font() { Family = defaultHFFontFamily, Size = defaultHFFontSize, Style = defaultHFFontStyle },
272-
// Darkness = 100,
273-
// Grayscale = false,
274-
// PrintBackground = true
275-
//},
276-
//LineNumbers = true,
277-
},
278-
279267
DefaultSheet = Uuid.DefaultSheet,
280268
Sheets = new Dictionary<string, SheetSettings>()
281269
};

src/WinPrint.Core/Properties/Resources.Designer.cs

Lines changed: 22 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/WinPrint.Core/Properties/Resources.resx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,4 @@
121121
<data name="languages" type="System.Resources.ResXFileRef, System.Windows.Forms">
122122
<value>..\Resources\FileTypeMapping.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
123123
</data>
124-
<data name="prism_winprint" type="System.Resources.ResXFileRef, System.Windows.Forms">
125-
<value>..\resources\prism-winprint.css;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
126-
</data>
127-
<data name="prism_winprint_overrides" type="System.Resources.ResXFileRef, System.Windows.Forms">
128-
<value>..\Resources\prism-winprint-overrides.css;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
129-
</data>
130124
</root>

src/WinPrint.Core/Resources/FileTypeMapping.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -613,15 +613,6 @@
613613
"._html"
614614
]
615615
},
616-
{
617-
"id": "text/prism",
618-
"aliases": [
619-
"prism"
620-
],
621-
"title": "Prism.js Syntax Highlighted",
622-
"extensions": [
623-
]
624-
},
625616
{
626617
"id": "markup",
627618
"aliases": [

src/WinPrint.Core/Resources/prism-winprint-overrides.css

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)