Skip to content

Commit

Permalink
Fix fonts patching. Bump to v2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
grandsilence committed Jun 8, 2020
1 parent 1b3c967 commit 40bc624
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
20 changes: 14 additions & 6 deletions TelegramFontPatcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private static void Main(string[] args)
try
{
var proc = processes[0];
var path = proc.MainModule.FileName;
string path = proc.MainModule.FileName;

proc.Kill();
proc.WaitForExit();
Expand All @@ -41,14 +41,22 @@ private static void Main(string[] args)
Console.WriteLine($"NOTICE: Trying to patch {ExeName}...");

var patternsRegular = new PatternList("Arial", new[] {
"Segoe UI", "Segoe UI Semibold",
"Open Sans", "Open Sans Semibold",
"Segoe UI",
"Segoe UI Semibold",
"Open Sans",
"Open Sans Semibold",

"DAOpenSansRegular",
"DAOpenSansRegularItalic",
"DAOpenSansBold",
"DAOpenSansBoldItalic",
"DAOpenSansSemiboldAsBold",
"DAOpenSansSemiboldItalicAsBold",
"DAOpenSansSemibold",
"DAOpenSansSemiboldItalic",

"DAVazirRegular",
"DAVazirMediumAsBold",
"DAVazirMedium",

"Microsoft YaHei",
"Microsoft JhengHei UI",
"Yu Gothic UI"
Expand All @@ -60,7 +68,7 @@ private static void Main(string[] args)

Console.WriteLine("Patching...");

using (var reader = new BinaryReader(new FileStream(ExeName, FileMode.Open)))
using (var reader = new BinaryReader(new FileStream(path, FileMode.Open)))
using (var writer = new BinaryWriter(new FileStream(patchedName, FileMode.Create)))
{
BinaryUtility.Replace(reader, writer, patternsRegular);
Expand Down
4 changes: 2 additions & 2 deletions TelegramFontPatcher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.1.0")]
[assembly: AssemblyFileVersion("2.1.1.0")]
[assembly: AssemblyVersion("2.1.2.0")]
[assembly: AssemblyFileVersion("2.1.2.0")]

0 comments on commit 40bc624

Please sign in to comment.