Skip to content

Commit

Permalink
Add Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiWonder committed Nov 25, 2022
1 parent ed20de8 commit 548aeec
Show file tree
Hide file tree
Showing 15 changed files with 21,252 additions and 16,680 deletions.
6 changes: 4 additions & 2 deletions README-TC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
繁體字體制作 簡轉繁字型 同義字(簡體字 繁體字 異體字)補全字型檔 合併簡繁字型 合併字型等。

## 功能
#### 1. 生成繁體字型
#### 1. 生成簡轉繁字型
提供繁體、繁體臺灣、繁體香港、繁體舊字形 4 種風格。
對於簡繁一對多情況可選擇不處理、使用單一常用字、使用詞彙正確處理簡繁一對多。
#### 2. 同義字補全字型檔
Expand All @@ -13,7 +13,9 @@
#### 4. 合併兩個字型
可以是簡體 GB2312 併入繁體 BIG5 的字型,也可以是字元較少的字型併入字元較全的字型,用以補充字型檔中字形的數目。
#### 5. 日本新字轉為傳承正字
針對日本字型的處理。
針對部分日本字型的處理。
#### 6. 生成繁轉簡字型
繁入簡出的字型。

## 常見問題
#### 1. 如何顯示轉換過程中的命令視窗?
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
繁体字体制作 简转繁字体 同义字(简体字 繁体字 异体字)补全字库 合并简繁字体 合并字体等。

## 功能
#### 1. 生成繁体字体
#### 1. 生成简转繁字体
提供繁体、繁体台湾、繁体香港、繁体旧字形 4 种风格。
对于简繁一对多情况可选择不处理、使用单一常用字、使用词汇正确处理简繁一对多。
#### 2. 同义字补全字库
Expand All @@ -13,7 +13,9 @@
#### 4. 合并两个字体
可以是简体 GB2312 并入繁体 BIG5 的字体,也可以是字符较少的字体并入字符较全的字体,用以补充字库中字形的数目。
#### 5. 日本新字转为传承正字
针对日本字体的处理。
针对部分日本字体的处理。
#### 6. 生成繁转简字体
繁入简出的字体。

## 常见问题
#### 1. 如何显示转换过程中的命令窗口?
Expand Down
115 changes: 65 additions & 50 deletions gui/TCFontCreator/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 18 additions & 11 deletions gui/TCFontCreator/FormMain.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Windows.Forms;

namespace TCFontCreator
Expand Down Expand Up @@ -123,7 +123,7 @@ private void ButtonStart_Click(object sender, EventArgs e)
switch (comboBoxSys.SelectedIndex)
{
case 0:
stmode = "tc";
stmode = "st";
break;
case 1:
stmode = "var";
Expand All @@ -137,27 +137,30 @@ private void ButtonStart_Click(object sender, EventArgs e)
case 4:
stmode = "jt";
break;
case 5:
stmode = "ts";
break;
default:
stmode = "tc";
stmode = "st";
break;
}
if (stmode == "tc")
if (stmode == "st")
{
if (comboBoxVar.SelectedIndex==1)
if (comboBoxVar.SelectedIndex == 1)
{
stmode += "tw";
}
else if (comboBoxVar.SelectedIndex==2)
else if (comboBoxVar.SelectedIndex == 2)
{
stmode += "hk";
}
else if (comboBoxVar.SelectedIndex==3)
else if (comboBoxVar.SelectedIndex == 3)
{
stmode += "t";
stmode += "cl";
}
}
SetExec();
if ((!System.IO.File.Exists(filein)) || (!System.IO.File.Exists(filein2) && (stmode == "sat"|| stmode == "faf")) || string.IsNullOrWhiteSpace(fileout))
if ((!System.IO.File.Exists(filein)) || (!System.IO.File.Exists(filein2) && (stmode == "sat" || stmode == "faf")) || string.IsNullOrWhiteSpace(fileout))
{
MessageBox.Show(this, "文件無效,請重新選擇。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
Expand Down Expand Up @@ -278,7 +281,7 @@ private void P_OutputDataReceived(object sender, System.Diagnostics.DataReceived

private void P_ErrorDataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e)
{
if (!string.IsNullOrWhiteSpace(e.Data) && (e.Data.Contains("Error") || e.Data.Contains("ERROR") || e.Data.Contains("[Errno")))
if (!string.IsNullOrWhiteSpace(e.Data) && (e.Data.Contains("Error") || e.Data.Contains("ERROR") || e.Data.Contains("[Errno")) && !e.Data.Contains("raise"))
{
err += e.Data + "\r\n";
}
Expand Down Expand Up @@ -307,7 +310,6 @@ private void ComboBoxSys_SelectedIndexChanged(object sender, EventArgs e)
{
checkBoxYitizi.Enabled = comboBoxSys.SelectedIndex != 1;
panelTC.Enabled = comboBoxSys.SelectedIndex == 0;
//labelMilti.Enabled = comboBoxSys.SelectedIndex < 4;
labeli2.Enabled = comboBoxSys.SelectedIndex == 2 || comboBoxSys.SelectedIndex == 3;
textBoxIn2.Enabled = comboBoxSys.SelectedIndex == 2 || comboBoxSys.SelectedIndex == 3;
linkLabelIn2.Enabled = comboBoxSys.SelectedIndex == 2 || comboBoxSys.SelectedIndex == 3;
Expand Down Expand Up @@ -336,5 +338,10 @@ private void LinkLabelOut_LinkClicked(object sender, LinkLabelLinkClickedEventAr
textBoxOut.Text = saveFileDialog1.FileName;
}
}

private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("/~https://github.com/GuiWonder/TCFontCreator");
}
}
}
Loading

0 comments on commit 548aeec

Please sign in to comment.