aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gospodnetich <me@kylegospodneti.ch>2022-07-21 15:38:16 -0700
committerGitHub <noreply@github.com>2022-07-22 00:38:16 +0200
commitfdc38f3867a3727edf097ec0241efc0b59d75395 (patch)
tree6ccee3fb2c4227b59043a4363301c9f21fd79c64
parenta7df0676bfc21eb9471aa4f486b0383b533a1317 (diff)
downloadNorthstarMods-fdc38f3867a3727edf097ec0241efc0b59d75395.tar.gz
NorthstarMods-fdc38f3867a3727edf097ec0241efc0b59d75395.zip
Fix missing fonts under Linux (#437)
* Replace Arial and Lucidia fonts with Lato and Fira Code respectively, this fixes Linux users needing to install proprietary fonts to use the in-game console. * Clean up gitattributes and encoding.yml to be more specific about the txt files it checks against. UTF-16LE-BOM will crash the game with a division by zero error if it's not expecting the file to be encoded as such. * Replace Fira Code with Northstar Mono (Modified Fira Mono Regular)
-rw-r--r--.gitattributes2
-rw-r--r--.github/workflows/encoding.yml2
-rw-r--r--Northstar.Client/mod/resource/Lato-Regular.ttfbin0 -> 657212 bytes
-rw-r--r--Northstar.Client/mod/resource/NorthstarMono.ttfbin0 -> 170600 bytes
-rw-r--r--Northstar.Client/mod/resource/fontfiletable.txt40
5 files changed, 42 insertions, 2 deletions
diff --git a/.gitattributes b/.gitattributes
index f18a3db77..c6a941dff 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-/Northstar.Client/mod/resource/*.txt text diff working-tree-encoding=UTF-16LE-BOM \ No newline at end of file
+/Northstar.Client/mod/resource/northstar_client_localisation_*.txt text diff working-tree-encoding=UTF-16LE-BOM \ No newline at end of file
diff --git a/.github/workflows/encoding.yml b/.github/workflows/encoding.yml
index 0b54639e4..ac63e7844 100644
--- a/.github/workflows/encoding.yml
+++ b/.github/workflows/encoding.yml
@@ -9,5 +9,5 @@ jobs:
uses: actions/checkout@v2
- name: Check localization files encoding
run: |
- files=$(ls Northstar.Client/mod/resource/*.txt)
+ files=$(ls Northstar.Client/mod/resource/northstar_client_localisation_*.txt)
IFS=$'\n'; files=($files); unset IFS; ! file --mime "${files[@]}" | grep -v "charset=utf-16le"
diff --git a/Northstar.Client/mod/resource/Lato-Regular.ttf b/Northstar.Client/mod/resource/Lato-Regular.ttf
new file mode 100644
index 000000000..adbfc467d
--- /dev/null
+++ b/Northstar.Client/mod/resource/Lato-Regular.ttf
Binary files differ
diff --git a/Northstar.Client/mod/resource/NorthstarMono.ttf b/Northstar.Client/mod/resource/NorthstarMono.ttf
new file mode 100644
index 000000000..2814eee69
--- /dev/null
+++ b/Northstar.Client/mod/resource/NorthstarMono.ttf
Binary files differ
diff --git a/Northstar.Client/mod/resource/fontfiletable.txt b/Northstar.Client/mod/resource/fontfiletable.txt
new file mode 100644
index 000000000..b42381341
--- /dev/null
+++ b/Northstar.Client/mod/resource/fontfiletable.txt
@@ -0,0 +1,40 @@
+FontFileTable
+{
+ "Default" "resource/MetronicPro-Regular.vfont" [!$JAPANESE && !$TCHINESE]
+ "Default" "resource/NotoSansJP-Regular.vfont" [$JAPANESE]
+ "Default" "resource/NotoSansTC-Regular.vfont" [$TCHINESE]
+
+ "DefaultBold" "resource/MetronicPro-SemiBold.vfont" [!$JAPANESE && !$TCHINESE]
+ "DefaultBold" "resource/NotoSansJP-Regular.vfont" [$JAPANESE]
+ "DefaultBold" "resource/NotoSansTC-Regular.vfont" [$TCHINESE]
+
+ "Titanfall" "resource/Titanfall-Regular.vfont" [!$JAPANESE && !$TCHINESE && !$RUSSIAN]
+ "Titanfall" "resource/NotoSansJP-Regular.vfont" [$JAPANESE]
+ "Titanfall" "resource/NotoSansTC-Regular.vfont" [$TCHINESE]
+ "Titanfall" "resource/MetronicPro-SemiBold.vfont" [$RUSSIAN]
+
+ "marlett" "vgui/fonts/marlett.ttf"
+
+ // Everything below is DONOTSHIP / Dev only
+
+ "arial unicode ms" "resource/Lato-Regular.ttf"
+
+ "lucida console" "resource/NorthstarMono.ttf" [$PC]
+ "lucida console" "resource/MetronicPro-Regular.vfont" [$GAMECONSOLE]
+
+ "tahoma" "fonts\\tahoma.ttf" [$PC]
+ "tahoma" "resource/MetronicPro-Regular.vfont" [$GAMECONSOLE]
+
+ "tahoma bold" "fonts\\tahomabd.ttf" [$PC]
+ "tahoma bold" "resource/MetronicPro-SemiBold.vfont" [$GAMECONSOLE]
+
+ "courier new" "fonts\\cour.ttf" [$PC]
+ "courier new" "vgui/fonts/cour.ttf" [$GAMECONSOLE]
+
+ "times new roman" "fonts\\times.ttf" [$PC]
+ "times new roman" "vgui/fonts/times.ttf" [$GAMECONSOLE]
+
+ "arial" "resource/Lato-Regular.ttf"
+ "arial bold" "resource/Lato-Regular.ttf"
+ "arial narrow" "resource/Lato-Regular.ttf"
+}