Skip to content

Commit 30e49a0

Browse files
committed
Fixed typos
1 parent 129dac8 commit 30e49a0

File tree

156 files changed

+911
-923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+911
-923
lines changed

Wrapper/Config/Set-ConsoleFont.ps1

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,111 @@
11
<#
2-
.SYNOPSIS
3-
Set console font to Consolas when script is called from the Wrapper due to it is not loaded by default
2+
.SYNOPSIS
3+
Set console font to Consolas when script is called from the Wrapper due to it is not loaded by default
44
5-
.LINK
6-
https://github.com/ReneNyffenegger/ps-modules-console
5+
.LINK
6+
https://github.com/ReneNyffenegger/ps-modules-console
77
#>
88
function Set-ConsoleFont
99
{
10-
$Signature = @{
11-
Namespace = "WinAPI"
12-
Name = "ConsoleFont"
13-
Language = "CSharp"
14-
MemberDefinition = @"
10+
$Signature = @{
11+
Namespace = "WinAPI"
12+
Name = "ConsoleFont"
13+
Language = "CSharp"
14+
MemberDefinition = @"
1515
[StructLayout(LayoutKind.Sequential)]
1616
1717
public struct COORD
1818
{
19-
public short X;
20-
public short Y;
21-
22-
public COORD(short x, short y)
23-
{
24-
X = x;
25-
Y = y;
26-
}
19+
public short X;
20+
public short Y;
21+
22+
public COORD(short x, short y)
23+
{
24+
X = x;
25+
Y = y;
26+
}
2727
}
2828
2929
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
3030
3131
public struct CONSOLE_FONT_INFOEX
3232
{
33-
public uint cbSize;
34-
public uint n;
35-
public COORD size;
36-
37-
// The four low-order bits of 'family' specify information about the pitch and the technology:
38-
// 1 = TMPF_FIXED_PITCH, 2 = TMPF_VECTOR, 4 = TMPF_TRUETYPE, 8 = TMPF_DEVICE.
39-
// The four high-order bits specifies the fonts family:
40-
// 80 = FF_DECORATIVE, 0 = FF_DONTCARE, 48 = FF_MODERN, 16 = FF_ROMAN, 64 = FF_SCRIPT, 32 = FF_SWISS
41-
// I assume(!) this value is always 48.
42-
// (In fact, it seems that family is is always 54 = TMPF_VECTOR + TMPF_TRUETYPE + FF_MODERN)
43-
public int family;
44-
public int weight;
45-
46-
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
47-
public string name;
33+
public uint cbSize;
34+
public uint n;
35+
public COORD size;
36+
37+
// The four low-order bits of 'family' specify information about the pitch and the technology:
38+
// 1 = TMPF_FIXED_PITCH, 2 = TMPF_VECTOR, 4 = TMPF_TRUETYPE, 8 = TMPF_DEVICE.
39+
// The four high-order bits specifies the fonts family:
40+
// 80 = FF_DECORATIVE, 0 = FF_DONTCARE, 48 = FF_MODERN, 16 = FF_ROMAN, 64 = FF_SCRIPT, 32 = FF_SWISS
41+
// I assume(!) this value is always 48.
42+
// (In fact, it seems that family is is always 54 = TMPF_VECTOR + TMPF_TRUETYPE + FF_MODERN)
43+
public int family;
44+
public int weight;
45+
46+
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
47+
public string name;
4848
}
4949
5050
[DllImport("kernel32.dll", SetLastError = true)]
5151
public static extern IntPtr GetStdHandle(int nStdHandle);
5252
5353
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
5454
extern static bool GetCurrentConsoleFontEx(
55-
IntPtr hConsoleOutput,
56-
bool bMaximumWindow,
57-
ref CONSOLE_FONT_INFOEX lpConsoleCurrentFont
55+
IntPtr hConsoleOutput,
56+
bool bMaximumWindow,
57+
ref CONSOLE_FONT_INFOEX lpConsoleCurrentFont
5858
);
5959
6060
[DllImport("kernel32.dll", SetLastError = true)]
6161
static extern Int32 SetCurrentConsoleFontEx(
62-
IntPtr ConsoleOutput,
63-
bool MaximumWindow,
64-
ref CONSOLE_FONT_INFOEX lpConsoleCurrentFont
62+
IntPtr ConsoleOutput,
63+
bool MaximumWindow,
64+
ref CONSOLE_FONT_INFOEX lpConsoleCurrentFont
6565
);
6666
6767
public static CONSOLE_FONT_INFOEX GetFont()
6868
{
69-
CONSOLE_FONT_INFOEX ret = new CONSOLE_FONT_INFOEX();
69+
CONSOLE_FONT_INFOEX ret = new CONSOLE_FONT_INFOEX();
7070
71-
ret.cbSize = (uint) Marshal.SizeOf(ret);
72-
if (GetCurrentConsoleFontEx(GetStdHandle(-11), false, ref ret))
73-
{
74-
return ret;
75-
}
71+
ret.cbSize = (uint) Marshal.SizeOf(ret);
72+
if (GetCurrentConsoleFontEx(GetStdHandle(-11), false, ref ret))
73+
{
74+
return ret;
75+
}
7676
77-
throw new Exception("something went wrong with GetCurrentConsoleFontEx");
77+
throw new Exception("something went wrong with GetCurrentConsoleFontEx");
7878
}
7979
8080
public static void SetFont(CONSOLE_FONT_INFOEX font)
8181
{
82-
if (SetCurrentConsoleFontEx(GetStdHandle(-11), false, ref font ) == 0)
83-
{
84-
throw new Exception("something went wrong with SetCurrentConsoleFontEx");
85-
}
82+
if (SetCurrentConsoleFontEx(GetStdHandle(-11), false, ref font ) == 0)
83+
{
84+
throw new Exception("something went wrong with SetCurrentConsoleFontEx");
85+
}
8686
}
8787
8888
public static void SetSize(short w, short h)
8989
{
90-
CONSOLE_FONT_INFOEX font = GetFont();
91-
font.size.X = w;
92-
font.size.Y = h;
93-
SetFont(font);
90+
CONSOLE_FONT_INFOEX font = GetFont();
91+
font.size.X = w;
92+
font.size.Y = h;
93+
SetFont(font);
9494
}
9595
9696
public static void SetName(string name)
9797
{
98-
CONSOLE_FONT_INFOEX font = GetFont();
99-
font.name = name;
100-
SetFont(font);
98+
CONSOLE_FONT_INFOEX font = GetFont();
99+
font.name = name;
100+
SetFont(font);
101101
}
102102
"@
103-
}
104-
if (-not ("WinAPI.ConsoleFont" -as [type]))
105-
{
106-
Add-Type @Signature
107-
}
108-
[WinAPI.ConsoleFont]::SetName("Consolas")
103+
}
104+
if (-not ("WinAPI.ConsoleFont" -as [type]))
105+
{
106+
Add-Type @Signature
107+
}
108+
[WinAPI.ConsoleFont]::SetName("Consolas")
109109
}
110110

111111
# We need to be sure that the Wrapper generated a powershell.exe process. If that true, we need to set Consolas font, unless a Sophia Script logo in console is distored
@@ -114,5 +114,5 @@ $ParrentProcess = Get-Process -Id $PowerShellParentProcessId -ErrorAction Ignore
114114
$WrapperProcess = Get-Process -Name SophiaScriptWrapper -ErrorAction Ignore
115115
if ($ParrentProcess.Id -eq $WrapperProcess.Id)
116116
{
117-
Set-ConsoleFont
117+
Set-ConsoleFont
118118
}

Wrapper/Config/config_Windows_10.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -498,15 +498,15 @@
498498
"Arg": {
499499
"Zero": {
500500
"Tag": "Hide",
501-
"Opposite": "Two"
501+
"Opposite": "Two"
502502
},
503503
"One": {
504504
"Tag": "SearchIcon",
505-
"Opposite": "Zero"
505+
"Opposite": "Zero"
506506
},
507507
"Two": {
508508
"Tag": "SearchBox",
509-
"Opposite": "Zero"
509+
"Opposite": "Zero"
510510
}
511511
},
512512
"Preset": "Zero",
@@ -648,15 +648,15 @@
648648
"Arg": {
649649
"Zero": {
650650
"Tag": "Always",
651-
"Opposite": "Two"
651+
"Opposite": "Two"
652652
},
653653
"One": {
654654
"Tag": "Full",
655-
"Opposite": "Two"
655+
"Opposite": "Two"
656656
},
657657
"Two": {
658658
"Tag": "Never",
659-
"Opposite": "Zero"
659+
"Opposite": "Zero"
660660
}
661661
},
662662
"Preset": "Zero",
@@ -689,15 +689,15 @@
689689
"Arg": {
690690
"Zero": {
691691
"Tag": "LargeIcons",
692-
"Opposite": "One"
692+
"Opposite": "One"
693693
},
694694
"One": {
695695
"Tag": "SmallIcons",
696-
"Opposite": "Zero"
696+
"Opposite": "Zero"
697697
},
698698
"Two": {
699699
"Tag": "Category",
700-
"Opposite": "Two"
700+
"Opposite": "Two"
701701
}
702702
},
703703
"Preset": "Zero",
@@ -867,19 +867,19 @@
867867
"Region": "UI & Personalization",
868868
"Control": "cmb",
869869
"Required": "false",
870-
"Function": "Cursors",
870+
"Function": "Install-Cursors",
871871
"Arg": {
872872
"Zero": {
873873
"Tag": "Default",
874-
"Opposite": "Zero"
874+
"Opposite": "Zero"
875875
},
876876
"One": {
877877
"Tag": "Dark",
878-
"Opposite": "Two"
878+
"Opposite": "Two"
879879
},
880880
"Two": {
881881
"Tag": "Light",
882-
"Opposite": "One"
882+
"Opposite": "One"
883883
}
884884
},
885885
"Preset": "One",
@@ -1312,15 +1312,15 @@
13121312
"Arg": {
13131313
"Zero": {
13141314
"Tag": "Root",
1315-
"Opposite": "Two"
1315+
"Opposite": "Two"
13161316
},
13171317
"One": {
13181318
"Tag": "Custom",
1319-
"Opposite": "Two"
1319+
"Opposite": "Two"
13201320
},
13211321
"Two": {
13221322
"Tag": "Default",
1323-
"Opposite": "One"
1323+
"Opposite": "One"
13241324
}
13251325
},
13261326
"Preset": "Zero",

Wrapper/Config/config_Windows_10_LTSC.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,15 @@
587587
"Arg": {
588588
"Zero": {
589589
"Tag": "Hide",
590-
"Opposite": "Two"
590+
"Opposite": "Two"
591591
},
592592
"One": {
593593
"Tag": "SearchIcon",
594-
"Opposite": "Zero"
594+
"Opposite": "Zero"
595595
},
596596
"Two": {
597597
"Tag": "SearchBox",
598-
"Opposite": "Zero"
598+
"Opposite": "Zero"
599599
}
600600
},
601601
"Preset": "Zero",
@@ -719,15 +719,15 @@
719719
"Arg": {
720720
"Zero": {
721721
"Tag": "Always",
722-
"Opposite": "Two"
722+
"Opposite": "Two"
723723
},
724724
"One": {
725725
"Tag": "Full",
726-
"Opposite": "Two"
726+
"Opposite": "Two"
727727
},
728728
"Two": {
729729
"Tag": "Never",
730-
"Opposite": "Zero"
730+
"Opposite": "Zero"
731731
}
732732
},
733733
"Preset": "Zero",
@@ -743,15 +743,15 @@
743743
"Arg": {
744744
"Zero": {
745745
"Tag": "LargeIcons",
746-
"Opposite": "One"
746+
"Opposite": "One"
747747
},
748748
"One": {
749749
"Tag": "SmallIcons",
750-
"Opposite": "Zero"
750+
"Opposite": "Zero"
751751
},
752752
"Two": {
753753
"Tag": "Category",
754-
"Opposite": "Two"
754+
"Opposite": "Two"
755755
}
756756
},
757757
"Preset": "Zero",
@@ -943,19 +943,19 @@
943943
"Region": "UI & Personalization",
944944
"Control": "cmb",
945945
"Required": "false",
946-
"Function": "Cursors",
946+
"Function": "Install-Cursors",
947947
"Arg": {
948948
"Zero": {
949949
"Tag": "Default",
950-
"Opposite": "Zero"
950+
"Opposite": "Zero"
951951
},
952952
"One": {
953953
"Tag": "Dark",
954-
"Opposite": "Two"
954+
"Opposite": "Two"
955955
},
956956
"Two": {
957957
"Tag": "Light",
958-
"Opposite": "One"
958+
"Opposite": "One"
959959
}
960960
},
961961
"Preset": "One",
@@ -1295,15 +1295,15 @@
12951295
"Arg": {
12961296
"Zero": {
12971297
"Tag": "Root",
1298-
"Opposite": "Two"
1298+
"Opposite": "Two"
12991299
},
13001300
"One": {
13011301
"Tag": "Custom",
1302-
"Opposite": "Two"
1302+
"Opposite": "Two"
13031303
},
13041304
"Two": {
13051305
"Tag": "Default",
1306-
"Opposite": "One"
1306+
"Opposite": "One"
13071307
}
13081308
},
13091309
"Preset": "Zero",

0 commit comments

Comments
 (0)