configure 'textboxWidth' for each font
This commit is contained in:
1 parent
14f76982d5
commit
06a35103d4
5 files changed
+5
-3
No files matched your search
@@ -16,7 +16,7 @@ EID.descriptions[languageCode].custom = {} -- table for custom entity descriptio
|
||||
EID.descriptions[languageCode].languageName = "English"
|
||||
|
||||
-- Fonts to be used with this language pack
|
||||
EID.descriptions[languageCode].fonts = {{name="default", lineHeight=11}, {name="inverted", lineHeight=11}, {name="borderless", lineHeight=11}}
|
||||
EID.descriptions[languageCode].fonts = {{name="default", lineHeight=11, textboxWidth = 115}, {name="inverted", lineHeight=11, textboxWidth = 115}, {name="borderless", lineHeight=11, textboxWidth = 115}}
|
||||
|
||||
---------- Collectibles ----------
|
||||
EID.descriptions[languageCode].collectibles={
|
||||
|
||||
@@ -29,7 +29,7 @@ EID.descriptions[languageCode].languageName = "Korean"
|
||||
|
||||
korean_galmoori9, korean_galmoori11 is added for community request.
|
||||
]]
|
||||
EID.descriptions[languageCode].fonts = {{name="korean_hcrdotum", lineHeight=11}, {name="korean_lanapixel", lineHeight=12}, {name="korean_soyakkoma", lineHeight=13}, {name="korean_soyakkoma_borderless", lineHeight=13}, {name="korean_soyakkoma_inverted", lineHeight=13}, {name="korean_soyanon", lineHeight=12}, {name="korean_galmoori9", lineHeight=12}, {name="korean_galmoori11", lineHeight=14}}
|
||||
EID.descriptions[languageCode].fonts = {{name="korean_hcrdotum", lineHeight=11, textboxWidth = 115}, {name="korean_lanapixel", lineHeight=12, textboxWidth = 115}, {name="korean_soyakkoma", lineHeight=13, textboxWidth = 115}, {name="korean_soyakkoma_borderless", lineHeight=13, textboxWidth = 115}, {name="korean_soyakkoma_inverted", lineHeight=13, textboxWidth = 115}, {name="korean_soyanon", lineHeight=12, textboxWidth = 115}, {name="korean_galmoori9", lineHeight=12, textboxWidth = 115}, {name="korean_galmoori11", lineHeight=14, textboxWidth = 115}}
|
||||
|
||||
---------- Collectibles ----------
|
||||
EID.descriptions[languageCode].collectibles={
|
||||
|
||||
@@ -16,7 +16,7 @@ EID.descriptions[languageCode].custom = {} -- table for custom entity descriptio
|
||||
EID.descriptions[languageCode].languageName = "Chinese"
|
||||
|
||||
-- Fonts to be used with this languagepack
|
||||
EID.descriptions[languageCode].fonts = {{name = "default_cn", lineHeight = 14}}
|
||||
EID.descriptions[languageCode].fonts = {{name = "default_cn", lineHeight = 14, textboxWidth = 150}}
|
||||
|
||||
---------- Collectibles ----------
|
||||
EID.descriptions[languageCode].collectibles={
|
||||
|
||||
@@ -1111,6 +1111,7 @@ function EID:fixDefinedFont()
|
||||
end
|
||||
EID.Config["FontType"] = EID.descriptions[curLang].fonts[1].name
|
||||
EID.lineHeight = EID.descriptions[curLang].fonts[1].lineHeight
|
||||
EID.Config["TextboxWidth"] = EID.descriptions[curLang].fonts[1].textboxWidth
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -1014,6 +1014,7 @@ if MCMLoaded then
|
||||
OnChange = function(currentNum)
|
||||
EID.Config["FontType"] = fontNames[currentNum]
|
||||
EID.lineHeight = fonts[currentNum].lineHeight
|
||||
EID.Config["TextboxWidth"] = fonts[currentNum].textboxWidth
|
||||
EID:fixDefinedFont()
|
||||
local fontFile = EID.Config["FontType"] or "default"
|
||||
EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
|
||||
|
||||
Reference in new issue
Block a user