修正低解析度注音輸入字體大小問題

This commit is contained in:
allen.yan 2025-08-08 10:42:48 +08:00
parent 74740b1048
commit 65c7ad7c14

View File

@ -659,6 +659,13 @@ namespace DualScreenDemo
// 從配置中加載字體屬性 // 從配置中加載字體屬性
inputBoxFontName = data["InputBoxZhuYinSingers"]["FontName"]; // 字體名稱 inputBoxFontName = data["InputBoxZhuYinSingers"]["FontName"]; // 字體名稱
inputBoxFontSize = float.Parse(data["InputBoxZhuYinSingers"]["FontSize"]); // 字體大小 inputBoxFontSize = float.Parse(data["InputBoxZhuYinSingers"]["FontSize"]); // 字體大小
Screen screen = Screen.PrimaryScreen;
int screenWidth = screen.Bounds.Width;
int screenHeight = screen.Bounds.Height;
if (screenWidth < 1920 && screenHeight < 1080)
{
inputBoxFontSize = 22;
}
inputBoxFontStyle = (FontStyle)Enum.Parse(typeof(FontStyle), data["InputBoxZhuYinSingers"]["FontStyle"]); // 字體樣式 inputBoxFontStyle = (FontStyle)Enum.Parse(typeof(FontStyle), data["InputBoxZhuYinSingers"]["FontStyle"]); // 字體樣式
inputBoxForeColor = Color.FromName(data["InputBoxZhuYinSingers"]["ForeColor"]); // 字體顏色 inputBoxForeColor = Color.FromName(data["InputBoxZhuYinSingers"]["ForeColor"]); // 字體顏色