Unity 2017 compatibility for fonts
This commit is contained in:
@@ -242,7 +242,12 @@ if len(sys.argv) > 4:
|
|||||||
atlasOut += atlasName
|
atlasOut += atlasName
|
||||||
atlasRest = atlas.rest()
|
atlasRest = atlas.rest()
|
||||||
emptyAtlasPoint = findEmptyAtlasPoint(atlasRest, 13)
|
emptyAtlasPoint = findEmptyAtlasPoint(atlasRest, 13)
|
||||||
atlasOut += atlasRest
|
if len(sys.argv) > 5 and sys.argv[5] == "2017":
|
||||||
|
atlasOut += atlasRest[:40]
|
||||||
|
atlasOut += atlasRest[40:44] * 3 # Unity 2017 split m_wrap into U, V, and W
|
||||||
|
atlasOut += atlasRest[44:]
|
||||||
|
else:
|
||||||
|
atlasOut += atlasRest
|
||||||
|
|
||||||
with open(originalFN, "rb") as originalFile:
|
with open(originalFN, "rb") as originalFile:
|
||||||
original = FontFile(originalFile.read(), originalFN)
|
original = FontFile(originalFile.read(), originalFN)
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ fn main() {
|
|||||||
font_path = format!("assets/vanilla/{}/msgothic_0.dat", &chapter);
|
font_path = format!("assets/vanilla/{}/msgothic_0.dat", &chapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let unity_ver_str = if *arc_number >= 8 { "2017" } else { "5" };
|
||||||
|
|
||||||
let status = Command::new("python")
|
let status = Command::new("python")
|
||||||
.env("PYTHONIOENCODING", "utf-8")
|
.env("PYTHONIOENCODING", "utf-8")
|
||||||
.arg("scripts/TMPAssetConverter.py")
|
.arg("scripts/TMPAssetConverter.py")
|
||||||
@@ -113,6 +115,7 @@ fn main() {
|
|||||||
.arg("assets/fonts/msgothic_0 SDF_TextMeshProFont.dat")
|
.arg("assets/fonts/msgothic_0 SDF_TextMeshProFont.dat")
|
||||||
.arg(font_path)
|
.arg(font_path)
|
||||||
.arg(&directory_assets)
|
.arg(&directory_assets)
|
||||||
|
.arg(&unity_ver_str)
|
||||||
.status()
|
.status()
|
||||||
.expect("failed to execute TMPAssetConverter.py");
|
.expect("failed to execute TMPAssetConverter.py");
|
||||||
|
|
||||||
@@ -130,6 +133,7 @@ fn main() {
|
|||||||
.arg("assets/fonts/msgothic_2 SDF_TextMeshProFont.dat")
|
.arg("assets/fonts/msgothic_2 SDF_TextMeshProFont.dat")
|
||||||
.arg(font_path)
|
.arg(font_path)
|
||||||
.arg(&directory_assets)
|
.arg(&directory_assets)
|
||||||
|
.arg(&unity_ver_str)
|
||||||
.status()
|
.status()
|
||||||
.expect("failed to execute TMPAssetConverter.py");
|
.expect("failed to execute TMPAssetConverter.py");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user