Merge pull request #4385 from ShiinaRinne/font-ttc

Add: 添加TTC格式字体支持
pull/4405/head
2dust 1 year ago committed by GitHub
commit e3c8ccfafe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff

@ -1037,7 +1037,7 @@
<value>FontFamily(Require restart)</value>
</data>
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
<value>Copy the font TTF file to the directory guiFonts, restart the settings</value>
<value>Copy the font TTF/TTC file to the directory guiFonts, restart the settings</value>
</data>
<data name="TbSettingsSocksPortTip" xml:space="preserve">
<value>http port=socks port+1</value>

@ -1043,7 +1043,7 @@
<value>Шрифт (требуется перезагрузка)</value>
</data>
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
<value>Скопируйте файл шрифта TTF в каталог guiFonts, перезапустите настройки</value>
<value>Скопируйте файл шрифта TTF/TTC в каталог guiFonts, перезапустите настройки</value>
</data>
<data name="TbSettingsSocksPortTip" xml:space="preserve">
<value>HTTP port=socks port+1</value>

@ -1037,7 +1037,7 @@
<value>当前字体(需重启)</value>
</data>
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
<value>拷贝字体TTF文件到目录guiFonts重启设置</value>
<value>拷贝字体TTF/TTC文件到目录guiFonts重启设置</value>
</data>
<data name="TbSettingsSocksPortTip" xml:space="preserve">
<value>http端口=socks端口+1</value>

@ -1037,7 +1037,7 @@
<value>目前字型(需重啟)</value>
</data>
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
<value>複製字型TTF文件到目錄guiFonts重啟設定</value>
<value>複製字型TTF/TTC文件到目錄guiFonts重啟設定</value>
</data>
<data name="TbSettingsSocksPortTip" xml:space="preserve">
<value>http埠=socks埠+1</value>

@ -89,7 +89,12 @@ namespace v2rayN.Views
//fill fonts
try
{
var files = Directory.GetFiles(Utils.GetFontsPath(), "*.ttf");
string[] searchPatterns = { "*.ttf", "*.ttc" };
var files = new List<string>();
foreach (var pattern in searchPatterns)
{
files.AddRange(Directory.GetFiles(Utils.GetFontsPath(), pattern));
}
var culture = _config.uiItem.currentLanguage == Global.Languages[0] ? "zh-cn" : "en-us";
var culture2 = "en-us";
foreach (var ttf in files)

Loading…
Cancel
Save