diff --git a/FModel/App.config b/FModel/App.config index 5c299c5f..bacc115c 100644 --- a/FModel/App.config +++ b/FModel/App.config @@ -140,7 +140,7 @@ - False + True diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj index b1883f2a..cc16058c 100644 --- a/FModel/FModel.csproj +++ b/FModel/FModel.csproj @@ -253,6 +253,7 @@ + diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs index ac0618f0..f449ad1b 100644 --- a/FModel/MainWindow.cs +++ b/FModel/MainWindow.cs @@ -1382,7 +1382,7 @@ namespace FModel //BundleDesign.toDrawOn.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), new Rectangle(107, BundleDesign.theY + 7, 2000, 75)); //rectangle the font needs to be fit with //draw quest description - Font goodFont = FontUtilities.FindFont(BundleDesign.toDrawOn, BundleInfos.BundleData[i].questDescr, new Rectangle(107, BundleDesign.theY + 7, 2000, 93).Size, new Font(FontUtilities.pfc.Families[1], 50)); //size in "new Font()" is never check + Font goodFont = FontUtilities.FindFont(BundleDesign.toDrawOn, BundleInfos.BundleData[i].questDescr, new Rectangle(107, BundleDesign.theY + 7, 2000, 93).Size, new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 50)); //size in "new Font()" is never check BundleDesign.toDrawOn.DrawString(BundleInfos.BundleData[i].questDescr, goodFont, new SolidBrush(Color.White), new Point(100, BundleDesign.theY)); //draw slider + quest count diff --git a/FModel/Methods/ChallengeGenerator/BundleDesign.cs b/FModel/Methods/ChallengeGenerator/BundleDesign.cs index 50a0f02e..7998955d 100644 --- a/FModel/Methods/ChallengeGenerator/BundleDesign.cs +++ b/FModel/Methods/ChallengeGenerator/BundleDesign.cs @@ -57,12 +57,12 @@ namespace FModel GraphicsPath p = new GraphicsPath(); Pen myPen = new Pen(ControlPaint.Light(BundleInfos.getSecondaryColor(myBundle), (float)0.2), 3); myPen.LineJoin = LineJoin.Round; //needed to avoid spikes - p.AddString(BundleInfos.getLastFolder(BundlePath), FontUtilities.pfc.Families[1], (int)FontStyle.Regular, 55, new Point(342, 40), FontUtilities.leftString); + p.AddString(BundleInfos.getLastFolder(BundlePath), Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], (int)FontStyle.Regular, 55, new Point(342, 40), FontUtilities.leftString); toDrawOn.DrawPath(myPen, p); toDrawOn.FillPath(new SolidBrush(ControlPaint.Dark(BundleInfos.getSecondaryColor(myBundle), (float)0.05)), p); //name - toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(325, 70)); + toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(325, 70)); //image string textureFile = Path.GetFileName(myBundle.DisplayStyle.DisplayImage.AssetPathName).Substring(0, Path.GetFileName(myBundle.DisplayStyle.DisplayImage.AssetPathName).LastIndexOf('.')); @@ -95,10 +95,10 @@ namespace FModel toDrawOn.FillRectangle(new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.1)), new Rectangle(0, 271, myBitmap.Width, myBitmap.Height)); //last folder - toDrawOn.DrawString(BundleInfos.getLastFolder(BundlePath), new Font(FontUtilities.pfc.Families[1], 42), new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.05)), new Point(40, 40)); + toDrawOn.DrawString(BundleInfos.getLastFolder(BundlePath), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 42), new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.05)), new Point(40, 40)); //name - toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(25, 70)); + toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(25, 70)); } } @@ -206,7 +206,7 @@ namespace FModel break; } - toDrawOn.DrawString(count == "-1" ? all : any, new Font(FontUtilities.pfc.Families[1], 50), new SolidBrush(Color.White), new Point(100, theY + 22)); + toDrawOn.DrawString(count == "-1" ? all : any, new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 50), new SolidBrush(Color.White), new Point(100, theY + 22)); } /// diff --git a/FModel/Methods/IconGenerator/DrawText.cs b/FModel/Methods/IconGenerator/DrawText.cs index 03d80a63..61d3a1ea 100644 --- a/FModel/Methods/IconGenerator/DrawText.cs +++ b/FModel/Methods/IconGenerator/DrawText.cs @@ -249,7 +249,7 @@ namespace FModel if (theItem.DisplayName != null) { string text = SearchResource.getTextByKey(theItem.DisplayName.Key, theItem.DisplayName.SourceString); - myGraphic.DrawString(text, new Font(FontUtilities.pfc.Families[0], 35), new SolidBrush(Color.White), new Point(522 / 2, 395), FontUtilities.centeredString); + myGraphic.DrawString(text, new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[0], 35), new SolidBrush(Color.White), new Point(522 / 2, 395), FontUtilities.centeredString); } } diff --git a/FModel/Methods/Utilities/FontUtilities.cs b/FModel/Methods/Utilities/FontUtilities.cs index 9b43c833..c9a18e9b 100644 --- a/FModel/Methods/Utilities/FontUtilities.cs +++ b/FModel/Methods/Utilities/FontUtilities.cs @@ -33,6 +33,12 @@ namespace FModel Marshal.Copy(_fontdata, 0, weirdData2, _fontLength); pfc.AddMemoryFont(weirdData2, _fontLength); + _fontLength = Resources.BurbankBigCondensed_Black_vJapanese.Length; + _fontdata = Resources.BurbankBigCondensed_Black_vJapanese; + IntPtr weirdData3 = Marshal.AllocCoTaskMem(_fontLength); + Marshal.Copy(_fontdata, 0, weirdData3, _fontLength); + pfc.AddMemoryFont(weirdData3, _fontLength); + centeredString.Alignment = StringAlignment.Center; rightString.Alignment = StringAlignment.Far; leftString.Alignment = StringAlignment.Near; diff --git a/FModel/Properties/Resources.Designer.cs b/FModel/Properties/Resources.Designer.cs index 597c3dfb..1fee12f8 100644 --- a/FModel/Properties/Resources.Designer.cs +++ b/FModel/Properties/Resources.Designer.cs @@ -80,6 +80,16 @@ namespace FModel.Properties { } } + /// + /// Recherche une ressource localisée de type System.Byte[]. + /// + internal static byte[] BurbankBigCondensed_Black_vJapanese { + get { + object obj = ResourceManager.GetObject("BurbankBigCondensed_Black_vJapanese", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Recherche une ressource localisée de type System.Byte[]. /// diff --git a/FModel/Properties/Resources.resx b/FModel/Properties/Resources.resx index c04b08ba..a723ebbd 100644 --- a/FModel/Properties/Resources.resx +++ b/FModel/Properties/Resources.resx @@ -220,4 +220,7 @@ ..\Resources\reload64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\BurbankBigCondensed-Black-vJapanese.otf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/FModel/Properties/Settings.Designer.cs b/FModel/Properties/Settings.Designer.cs index c424f461..f3617229 100644 --- a/FModel/Properties/Settings.Designer.cs +++ b/FModel/Properties/Settings.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. // //------------------------------------------------------------------------------ @@ -12,7 +12,7 @@ namespace FModel.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -541,7 +541,7 @@ namespace FModel.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] + [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool createIconForCreativeGalleries { get { return ((bool)(this["createIconForCreativeGalleries"])); diff --git a/FModel/Properties/Settings.settings b/FModel/Properties/Settings.settings index 777df40b..cbb02e4f 100644 --- a/FModel/Properties/Settings.settings +++ b/FModel/Properties/Settings.settings @@ -132,7 +132,7 @@ - False + True \ No newline at end of file diff --git a/FModel/Resources/BurbankBigCondensed-Black-vJapanese.otf b/FModel/Resources/BurbankBigCondensed-Black-vJapanese.otf new file mode 100644 index 00000000..3646ab7b Binary files /dev/null and b/FModel/Resources/BurbankBigCondensed-Black-vJapanese.otf differ