From 8848697656fdbc77eb0a8bd806ad69c19a42b419 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 16 Jun 2015 22:22:40 -0600 Subject: [PATCH] Fix font loader on case sensitive filesystems --- .../{dejavu_bold.fnt => DejaVu_Bold.fnt} | 0 .../{dejavu_bold_0.png => DejaVu_Bold_0.png} | Bin .../{dejavu_italic.fnt => DejaVu_Italic.fnt} | 0 ...ejavu_italic_0.png => DejaVu_Italic_0.png} | Bin ...{dejavu_regular.fnt => DejaVu_Regular.fnt} | 0 ...avu_regular_0.png => DejaVu_Regular_0.png} | Bin TrueCraft.Client/Rendering/Font.cs | 4 +- TrueCraft.Client/TrueCraft.Client.csproj | 78 ++++++++---------- 8 files changed, 36 insertions(+), 46 deletions(-) rename TrueCraft.Client/Content/Fonts/{dejavu_bold.fnt => DejaVu_Bold.fnt} (100%) rename TrueCraft.Client/Content/Fonts/{dejavu_bold_0.png => DejaVu_Bold_0.png} (100%) rename TrueCraft.Client/Content/Fonts/{dejavu_italic.fnt => DejaVu_Italic.fnt} (100%) rename TrueCraft.Client/Content/Fonts/{dejavu_italic_0.png => DejaVu_Italic_0.png} (100%) rename TrueCraft.Client/Content/Fonts/{dejavu_regular.fnt => DejaVu_Regular.fnt} (100%) rename TrueCraft.Client/Content/Fonts/{dejavu_regular_0.png => DejaVu_Regular_0.png} (100%) diff --git a/TrueCraft.Client/Content/Fonts/dejavu_bold.fnt b/TrueCraft.Client/Content/Fonts/DejaVu_Bold.fnt similarity index 100% rename from TrueCraft.Client/Content/Fonts/dejavu_bold.fnt rename to TrueCraft.Client/Content/Fonts/DejaVu_Bold.fnt diff --git a/TrueCraft.Client/Content/Fonts/dejavu_bold_0.png b/TrueCraft.Client/Content/Fonts/DejaVu_Bold_0.png similarity index 100% rename from TrueCraft.Client/Content/Fonts/dejavu_bold_0.png rename to TrueCraft.Client/Content/Fonts/DejaVu_Bold_0.png diff --git a/TrueCraft.Client/Content/Fonts/dejavu_italic.fnt b/TrueCraft.Client/Content/Fonts/DejaVu_Italic.fnt similarity index 100% rename from TrueCraft.Client/Content/Fonts/dejavu_italic.fnt rename to TrueCraft.Client/Content/Fonts/DejaVu_Italic.fnt diff --git a/TrueCraft.Client/Content/Fonts/dejavu_italic_0.png b/TrueCraft.Client/Content/Fonts/DejaVu_Italic_0.png similarity index 100% rename from TrueCraft.Client/Content/Fonts/dejavu_italic_0.png rename to TrueCraft.Client/Content/Fonts/DejaVu_Italic_0.png diff --git a/TrueCraft.Client/Content/Fonts/dejavu_regular.fnt b/TrueCraft.Client/Content/Fonts/DejaVu_Regular.fnt similarity index 100% rename from TrueCraft.Client/Content/Fonts/dejavu_regular.fnt rename to TrueCraft.Client/Content/Fonts/DejaVu_Regular.fnt diff --git a/TrueCraft.Client/Content/Fonts/dejavu_regular_0.png b/TrueCraft.Client/Content/Fonts/DejaVu_Regular_0.png similarity index 100% rename from TrueCraft.Client/Content/Fonts/dejavu_regular_0.png rename to TrueCraft.Client/Content/Fonts/DejaVu_Regular_0.png diff --git a/TrueCraft.Client/Rendering/Font.cs b/TrueCraft.Client/Rendering/Font.cs index ea627e0..9900c8e 100644 --- a/TrueCraft.Client/Rendering/Font.cs +++ b/TrueCraft.Client/Rendering/Font.cs @@ -69,7 +69,7 @@ namespace TrueCraft.Client.Rendering /// private void LoadContent(ContentManager contentManager) { - var definitionPath = string.Format("{0}_{1}.fnt", Name.ToLowerInvariant(), Style.ToString().ToLowerInvariant()); + var definitionPath = string.Format("{0}_{1}.fnt", Name, Style); using (var contents = File.OpenRead(Path.Combine(contentManager.RootDirectory, definitionPath))) _definition = FontLoader.Load(contents); @@ -77,7 +77,7 @@ namespace TrueCraft.Client.Rendering _textures = new Texture2D[_definition.Pages.Count]; for (int i = 0; i < _definition.Pages.Count; i++) { - var texturePath = string.Format("{0}_{1}_{2}.png", Name.ToLowerInvariant(), Style.ToString().ToLowerInvariant(), i.ToString()); + var texturePath = string.Format("{0}_{1}_{2}.png", Name, Style, i); _textures[i] = contentManager.Load(texturePath); } } diff --git a/TrueCraft.Client/TrueCraft.Client.csproj b/TrueCraft.Client/TrueCraft.Client.csproj index d2b28e5..9a9bdc7 100644 --- a/TrueCraft.Client/TrueCraft.Client.csproj +++ b/TrueCraft.Client/TrueCraft.Client.csproj @@ -64,38 +64,28 @@ x86 - + ..\packages\MonoGame.Framework.Linux.3.4.0.459\lib\net40\MonoGame.Framework.dll - True + + + ..\lib\Ionic.Zip.Reduced.dll + + + ..\packages\MonoGame.Framework.Linux.3.4.0.459\lib\net40\OpenTK.dll + + + ..\packages\MonoGame.Framework.Linux.3.4.0.459\lib\net40\Tao.Sdl.dll + + + ..\packages\MonoGame.Framework.WindowsGL.3.4.0.459\lib\net40\MonoGame.Framework.dll + + + ..\packages\MonoGame.Framework.WindowsGL.3.4.0.459\lib\net40\OpenTK.dll - - False - ..\lib\Ionic.Zip.Reduced.dll - - - ..\packages\MonoGame.Framework.Linux.3.4.0.459\lib\net40\OpenTK.dll - True - - - ..\packages\MonoGame.Framework.Linux.3.4.0.459\lib\net40\Tao.Sdl.dll - True - - - - - False - ..\packages\MonoGame.Framework.WindowsGL.3.4.0.459\lib\net40\MonoGame.Framework.dll - True - - - False - ..\packages\MonoGame.Framework.WindowsGL.3.4.0.459\lib\net40\OpenTK.dll - True - @@ -171,15 +161,6 @@ - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - PreserveNewest @@ -192,15 +173,6 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - PreserveNewest @@ -208,5 +180,23 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + \ No newline at end of file