Просмотр исходного кода

Font importing supports multiple render styles

BearishSun 10 лет назад
Родитель
Сommit
e3f01f3c80

+ 38 - 5
BansheeCore/Include/BsFontImportOptions.h

@@ -6,6 +6,17 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	/**
+	 * @brief	Determines how is a font rendered into the bitmap texture.
+	 */
+	enum class FontRenderMode
+	{
+		Smooth, /*< Render antialiased fonts without hinting (slightly more blurry). */
+		Raster, /*< Render non-antialiased fonts without hinting (slightly more blurry). */
+		HintedSmooth, /*< Render antialiased fonts with hinting. */
+		HintedRaster /*< Render non-antialiased fonts with hinting. */
+	};
+
 	/**
 	/**
 	 * @brief	Import options that allow you to control how is a font
 	 * @brief	Import options that allow you to control how is a font
 	 *			imported.
 	 *			imported.
@@ -36,9 +47,19 @@ namespace BansheeEngine
 		void setDPI(UINT32 dpi) { mDPI = dpi; }
 		void setDPI(UINT32 dpi) { mDPI = dpi; }
 
 
 		/**
 		/**
-		 * @brief	Set to true if you want your characters to be antialiased.
+		 * @brief	Set the render mode used for rendering the characters into a bitmap.
 		 */
 		 */
-		void setAntialiasing(bool enabled) { mAntialiasing = enabled; }
+		void setRenderMode(FontRenderMode renderMode) { mRenderMode = renderMode; }
+
+		/**
+		 * @brief	Sets whether the bold font style should be used when rendering.
+		 */
+		void setBold(bool bold) { mBold = bold; }
+
+		/**
+		 * @brief	Sets whether the italic font style should be used when rendering.
+		 */
+		void setItalic(bool italic) { mItalic = italic; }
 
 
 		/**
 		/**
 		 * @brief	Gets the sizes that are to be imported. Ranges are defined as unicode numbers.
 		 * @brief	Gets the sizes that are to be imported. Ranges are defined as unicode numbers.
@@ -56,9 +77,19 @@ namespace BansheeEngine
 		UINT32 getDPI() const { return mDPI; }
 		UINT32 getDPI() const { return mDPI; }
 
 
 		/**
 		/**
-		 * @brief	Query if antialiasing will be used when rendering the characters.
+		 * @brief	Get the render mode used for rendering the characters into a bitmap.
+		 */
+		FontRenderMode getRenderMode() const { return mRenderMode; }
+
+		/**
+		 * @brief	Sets whether the bold font style should be used when rendering.
+		 */
+		bool getBold() const { return mBold; }
+
+		/**
+		 * @brief	Sets whether the italic font style should be used when rendering.
 		 */
 		 */
-		bool getAntialiasing() const { return mAntialiasing; }
+		bool getItalic() const { return mItalic; }
 
 
 		/************************************************************************/
 		/************************************************************************/
 		/* 								SERIALIZATION                      		*/
 		/* 								SERIALIZATION                      		*/
@@ -72,6 +103,8 @@ namespace BansheeEngine
 		Vector<UINT32> mFontSizes;
 		Vector<UINT32> mFontSizes;
 		Vector<std::pair<UINT32, UINT32>> mCharIndexRanges;
 		Vector<std::pair<UINT32, UINT32>> mCharIndexRanges;
 		UINT32 mDPI;
 		UINT32 mDPI;
-		bool mAntialiasing;
+		FontRenderMode mRenderMode;
+		bool mBold;
+		bool mItalic;
 	};
 	};
 }
 }

+ 11 - 3
BansheeCore/Include/BsFontImportOptionsRTTI.h

@@ -18,8 +18,14 @@ namespace BansheeEngine
 		UINT32& getDPI(FontImportOptions* obj) { return obj->mDPI; }
 		UINT32& getDPI(FontImportOptions* obj) { return obj->mDPI; }
 		void setDPI(FontImportOptions* obj, UINT32& value) { obj->mDPI = value; }
 		void setDPI(FontImportOptions* obj, UINT32& value) { obj->mDPI = value; }
 
 
-		bool& getAntialiasing(FontImportOptions* obj) { return obj->mAntialiasing; }
-		void setAntialiasing(FontImportOptions* obj, bool& value) { obj->mAntialiasing = value; }
+		FontRenderMode& getRenderMode(FontImportOptions* obj) { return obj->mRenderMode; }
+		void setRenderMode(FontImportOptions* obj, FontRenderMode& value) { obj->mRenderMode = value; }
+
+		bool& getBold(FontImportOptions* obj) { return obj->mBold; }
+		void setBold(FontImportOptions* obj, bool& value) { obj->mBold = value; }
+
+		bool& getItalic(FontImportOptions* obj) { return obj->mItalic; }
+		void setItalic(FontImportOptions* obj, bool& value) { obj->mItalic = value; }
 
 
 	public:
 	public:
 		FontImportOptionsRTTI()
 		FontImportOptionsRTTI()
@@ -27,7 +33,9 @@ namespace BansheeEngine
 			addPlainField("mFontSizes", 0, &FontImportOptionsRTTI::getFontSizes, &FontImportOptionsRTTI::setFontSizes);
 			addPlainField("mFontSizes", 0, &FontImportOptionsRTTI::getFontSizes, &FontImportOptionsRTTI::setFontSizes);
 			addPlainField("mCharIndexRanges", 1, &FontImportOptionsRTTI::getCharIndexRanges, &FontImportOptionsRTTI::setCharIndexRanges);
 			addPlainField("mCharIndexRanges", 1, &FontImportOptionsRTTI::getCharIndexRanges, &FontImportOptionsRTTI::setCharIndexRanges);
 			addPlainField("mDPI", 2, &FontImportOptionsRTTI::getDPI, &FontImportOptionsRTTI::setDPI);
 			addPlainField("mDPI", 2, &FontImportOptionsRTTI::getDPI, &FontImportOptionsRTTI::setDPI);
-			addPlainField("mAntialiasing", 3, &FontImportOptionsRTTI::getAntialiasing, &FontImportOptionsRTTI::setAntialiasing);
+			addPlainField("mRenderMode", 3, &FontImportOptionsRTTI::getRenderMode, &FontImportOptionsRTTI::setRenderMode);
+			addPlainField("mBold", 4, &FontImportOptionsRTTI::getBold, &FontImportOptionsRTTI::setBold);
+			addPlainField("mItalic", 5, &FontImportOptionsRTTI::getItalic, &FontImportOptionsRTTI::setItalic);
 		}
 		}
 
 
 		virtual const String& getRTTIName() override
 		virtual const String& getRTTIName() override

+ 1 - 1
BansheeCore/Source/BsFontImportOptions.cpp

@@ -4,7 +4,7 @@
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
 	FontImportOptions::FontImportOptions()
 	FontImportOptions::FontImportOptions()
-		:mDPI(72), mAntialiasing(true)
+		:mDPI(96), mRenderMode(FontRenderMode::HintedSmooth), mBold(false), mItalic(false)
 	{
 	{
 		mFontSizes.push_back(10);
 		mFontSizes.push_back(10);
 		mCharIndexRanges.push_back(std::make_pair(33, 166)); // Most used ASCII characters
 		mCharIndexRanges.push_back(std::make_pair(33, 166)); // Most used ASCII characters

+ 3 - 3
BansheeEditor/Source/BsBuiltinEditorResources.cpp

@@ -61,8 +61,8 @@ namespace BansheeEngine
 
 
 	const WString BuiltinEditorResources::DefaultFontFilename = L"arial.ttf";
 	const WString BuiltinEditorResources::DefaultFontFilename = L"arial.ttf";
 	const WString BuiltinEditorResources::DefaultAAFontFilename = L"arialAA.ttf";
 	const WString BuiltinEditorResources::DefaultAAFontFilename = L"arialAA.ttf";
-	const UINT32 BuiltinEditorResources::DefaultFontSize = 11;
-	const UINT32 BuiltinEditorResources::TitleFontSize = 20;
+	const UINT32 BuiltinEditorResources::DefaultFontSize = 8;
+	const UINT32 BuiltinEditorResources::TitleFontSize = 16;
 
 
 	const Color BuiltinEditorResources::TextNormalColor = Color(0.7f, 0.7f, 0.7f);
 	const Color BuiltinEditorResources::TextNormalColor = Color(0.7f, 0.7f, 0.7f);
 	const Color BuiltinEditorResources::TextActiveColor = Color(0.0f, 0.0f, 0.0f);
 	const Color BuiltinEditorResources::TextActiveColor = Color(0.0f, 0.0f, 0.0f);
@@ -365,7 +365,7 @@ namespace BansheeEngine
 
 
 		// Import fonts
 		// Import fonts
 		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, DefaultFontFilename, 
 		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, DefaultFontFilename, 
-			BuiltinDataFolder, { DefaultFontSize }, false, mResourceManifest);
+			BuiltinDataFolder, { DefaultFontSize }, true, mResourceManifest);
 
 
 		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, DefaultAAFontFilename, 
 		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, DefaultAAFontFilename, 
 			BuiltinDataFolder, { TitleFontSize }, true, mResourceManifest);
 			BuiltinDataFolder, { TitleFontSize }, true, mResourceManifest);

+ 1 - 1
BansheeEngine/Source/BsBuiltinResources.cpp

@@ -1027,7 +1027,7 @@ namespace BansheeEngine
 			FontImportOptions* importOptions = static_cast<FontImportOptions*>(fontImportOptions.get());
 			FontImportOptions* importOptions = static_cast<FontImportOptions*>(fontImportOptions.get());
 
 
 			importOptions->setFontSizes(fontSizes);
 			importOptions->setFontSizes(fontSizes);
-			importOptions->setAntialiasing(antialiasing);
+			importOptions->setRenderMode(antialiasing ? FontRenderMode::HintedSmooth : FontRenderMode::HintedRaster);
 		}
 		}
 		else
 		else
 			return;
 			return;

+ 55 - 5
BansheeFontImporter/Source/BsFontImporter.cpp

@@ -74,16 +74,51 @@ namespace BansheeEngine
 		Vector<UINT32> fontSizes = fontImportOptions->getFontSizes();
 		Vector<UINT32> fontSizes = fontImportOptions->getFontSizes();
 		UINT32 dpi = fontImportOptions->getDPI();
 		UINT32 dpi = fontImportOptions->getDPI();
 
 
-		FT_Int32 loadFlags = FT_LOAD_RENDER;
-		if(!fontImportOptions->getAntialiasing())
-			loadFlags |= FT_LOAD_TARGET_MONO | FT_LOAD_NO_AUTOHINT;
+		FT_Int32 loadFlags;
+		switch (fontImportOptions->getRenderMode())
+		{
+		case FontRenderMode::Smooth:
+			loadFlags = FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING;
+			break;
+		case FontRenderMode::Raster:
+			loadFlags = FT_LOAD_TARGET_MONO | FT_LOAD_NO_HINTING;
+			break;
+		case FontRenderMode::HintedSmooth:
+			loadFlags = FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_AUTOHINT;
+			break;
+		case FontRenderMode::HintedRaster:
+			loadFlags = FT_LOAD_TARGET_MONO | FT_LOAD_NO_AUTOHINT;
+			break;
+		default:
+			loadFlags = FT_LOAD_TARGET_NORMAL;
+			break;
+		}
+
+		FT_Render_Mode renderMode = FT_LOAD_TARGET_MODE(loadFlags);
 
 
 		Vector<SPtr<FontBitmap>> dataPerSize;
 		Vector<SPtr<FontBitmap>> dataPerSize;
 		for(size_t i = 0; i < fontSizes.size(); i++)
 		for(size_t i = 0; i < fontSizes.size(); i++)
 		{
 		{
+			// Note: Disabled as its not working and I have bigger issues to handle than to figure this out atm
+			//FT_Matrix m;
+			//if (fontImportOptions->getBold())
+			//	m.xx = (long)(1.25f * (1 << 16));
+			//else
+			//	m.xx = (long)(1 * (1 << 16));
+
+			//if (fontImportOptions->getItalic())
+			//	m.xy = (long)(0.25f * (1 << 16));
+			//else
+			//	m.xy = (long)(0 * (1 << 16));
+
+			//m.yx = (long)(0 * (1 << 16));
+			//m.yy = (long)(1 * (1 << 16));
+
+			//FT_Set_Transform(face, &m, nullptr);
+
 			FT_F26Dot6 ftSize = (FT_F26Dot6)(fontSizes[i] * (1 << 6));
 			FT_F26Dot6 ftSize = (FT_F26Dot6)(fontSizes[i] * (1 << 6));
-			if(FT_Set_Char_Size( face, ftSize, 0, dpi, dpi))
-				BS_EXCEPT(InternalErrorException, "Could not set character size." );
+			if (FT_Set_Char_Size(face, ftSize, 0, dpi, dpi))
+				BS_EXCEPT(InternalErrorException, "Could not set character size.");
 
 
 			SPtr<FontBitmap> fontData = bs_shared_ptr_new<FontBitmap>();
 			SPtr<FontBitmap> fontData = bs_shared_ptr_new<FontBitmap>();
 
 
@@ -99,6 +134,11 @@ namespace BansheeEngine
 					if(error)
 					if(error)
 						BS_EXCEPT(InternalErrorException, "Failed to load a character");
 						BS_EXCEPT(InternalErrorException, "Failed to load a character");
 
 
+					FT_Render_Glyph(face->glyph, renderMode);
+
+					if (error)
+						BS_EXCEPT(InternalErrorException, "Failed to render a character");
+
 					FT_GlyphSlot slot = face->glyph;
 					FT_GlyphSlot slot = face->glyph;
 
 
 					TexAtlasElementDesc atlasElement;
 					TexAtlasElementDesc atlasElement;
@@ -117,6 +157,11 @@ namespace BansheeEngine
 				if(error)
 				if(error)
 					BS_EXCEPT(InternalErrorException, "Failed to load a character");
 					BS_EXCEPT(InternalErrorException, "Failed to load a character");
 
 
+				FT_Render_Glyph(face->glyph, renderMode);
+
+				if (error)
+					BS_EXCEPT(InternalErrorException, "Failed to render a character");
+
 				FT_GlyphSlot slot = face->glyph;
 				FT_GlyphSlot slot = face->glyph;
 
 
 				TexAtlasElementDesc atlasElement;
 				TexAtlasElementDesc atlasElement;
@@ -170,6 +215,11 @@ namespace BansheeEngine
 					if(error)
 					if(error)
 						BS_EXCEPT(InternalErrorException, "Failed to load a character");
 						BS_EXCEPT(InternalErrorException, "Failed to load a character");
 
 
+					FT_Render_Glyph(face->glyph, renderMode);
+
+					if (error)
+						BS_EXCEPT(InternalErrorException, "Failed to render a character");
+
 					FT_GlyphSlot slot = face->glyph;
 					FT_GlyphSlot slot = face->glyph;
 
 
 					if(slot->bitmap.buffer == nullptr && slot->bitmap.rows > 0 && slot->bitmap.width > 0)
 					if(slot->bitmap.buffer == nullptr && slot->bitmap.rows > 0 && slot->bitmap.width > 0)

+ 51 - 6
MBansheeEditor/ImportOptions.cs

@@ -259,12 +259,30 @@ namespace BansheeEditor
         }
         }
 
 
         /// <summary>
         /// <summary>
-        /// Determines should rendered characters be antialiased.
+        /// Determines rendering mode used when rendering the characters into the bitmap.
         /// </summary>
         /// </summary>
-        public bool Antialiasing
+        public FontRenderMode RenderMode
         {
         {
-            get { return Internal_GetAntialiasing(mCachedPtr); }
-            set { Internal_SetAntialiasing(mCachedPtr, value); }
+            get { return Internal_GetRenderMode(mCachedPtr); }
+            set { Internal_SetRenderMode(mCachedPtr, value); }
+        }
+
+        /// <summary>
+        /// Determines should the characters be rendered in bold style.
+        /// </summary>
+        public bool Bold
+        {
+            get { return Internal_GetBold(mCachedPtr); }
+            set { Internal_SetBold(mCachedPtr, value); }
+        }
+
+        /// <summary>
+        /// Determines should the characters be rendered in italic style.
+        /// </summary>
+        public bool Italic
+        {
+            get { return Internal_GetItalic(mCachedPtr); }
+            set { Internal_SetItalic(mCachedPtr, value); }
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -292,10 +310,22 @@ namespace BansheeEditor
         private static extern void Internal_SetDPI(IntPtr thisPtr, int value);
         private static extern void Internal_SetDPI(IntPtr thisPtr, int value);
 
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern bool Internal_GetAntialiasing(IntPtr thisPtr);
+        private static extern FontRenderMode Internal_GetRenderMode(IntPtr thisPtr);
 
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetAntialiasing(IntPtr thisPtr, bool value);
+        private static extern void Internal_SetRenderMode(IntPtr thisPtr, FontRenderMode value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern bool Internal_GetBold(IntPtr thisPtr);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetBold(IntPtr thisPtr, bool value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern bool Internal_GetItalic(IntPtr thisPtr);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetItalic(IntPtr thisPtr, bool value);
 
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern CharRange[] Internal_GetCharRanges(IntPtr thisPtr);
         private static extern CharRange[] Internal_GetCharRanges(IntPtr thisPtr);
@@ -336,4 +366,19 @@ namespace BansheeEditor
         [MethodImpl(MethodImplOptions.InternalCall)]
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern void Internal_SetEditorScript(IntPtr thisPtr, bool value);
         private static extern void Internal_SetEditorScript(IntPtr thisPtr, bool value);
     }
     }
+
+    /// <summary>
+    /// Determines how is a font rendered into the bitmap texture.
+    /// </summary>
+	public enum FontRenderMode // Note: Must match C++ enum FontRenderMode
+	{
+        /// <summary>Render antialiased fonts without hinting (slightly more blurry).</summary>
+		Smooth,
+        /// <summary>Render non-antialiased fonts without hinting (slightly more blurry).</summary>
+		Raster,
+        /// <summary>Render antialiased fonts with hinting.</summary>
+		HintedSmooth,
+        /// <summary>Render non-antialiased fonts with hinting.</summary>
+		HintedRaster
+	};
 }
 }

+ 12 - 4
MBansheeEditor/Inspectors/FontInspector.cs

@@ -12,7 +12,9 @@ namespace BansheeEditor
     {
     {
         private GUIArrayField<int, FontSizeArrayRow> fontSizes;
         private GUIArrayField<int, FontSizeArrayRow> fontSizes;
         private GUIArrayField<CharRange, CharRangeArrayRow> charRanges;
         private GUIArrayField<CharRange, CharRangeArrayRow> charRanges;
-        private GUIToggleField antialiasingField;
+        private GUIEnumField renderModeField;
+        private GUIToggleField boldField;
+        private GUIToggleField italicField;
         private GUIIntField dpiField;
         private GUIIntField dpiField;
         private GUIButton reimportButton;
         private GUIButton reimportButton;
 
 
@@ -63,7 +65,9 @@ namespace BansheeEditor
             fontSizes.Refresh();
             fontSizes.Refresh();
             charRanges.Refresh();
             charRanges.Refresh();
 
 
-            antialiasingField.Value = newImportOptions.Antialiasing;
+            renderModeField.Value = (ulong)newImportOptions.RenderMode;
+            boldField.Value = newImportOptions.Bold;
+            italicField.Value = newImportOptions.Italic;
             dpiField.Value = newImportOptions.DPI;
             dpiField.Value = newImportOptions.DPI;
             importOptions = newImportOptions;
             importOptions = newImportOptions;
 
 
@@ -85,13 +89,17 @@ namespace BansheeEditor
                 new LocEdString("Character ranges"), importOptions.CharRanges, Layout);
                 new LocEdString("Character ranges"), importOptions.CharRanges, Layout);
             charRanges.OnChanged += x => importOptions.CharRanges = x;
             charRanges.OnChanged += x => importOptions.CharRanges = x;
 
 
-            antialiasingField = new GUIToggleField(new LocEdString("Antialiasing"));
+            renderModeField = new GUIEnumField(typeof(FontRenderMode), new LocEdString("Render mode"));
+            boldField = new GUIToggleField(new LocEdString("Bold"));
+            italicField = new GUIToggleField(new LocEdString("Italic"));
             dpiField = new GUIIntField(new LocEdString("DPI"));
             dpiField = new GUIIntField(new LocEdString("DPI"));
 
 
             reimportButton = new GUIButton(new LocEdString("Reimport"));
             reimportButton = new GUIButton(new LocEdString("Reimport"));
             reimportButton.OnClick += TriggerReimport;
             reimportButton.OnClick += TriggerReimport;
 
 
-            Layout.AddElement(antialiasingField);
+            Layout.AddElement(renderModeField);
+            Layout.AddElement(boldField);
+            Layout.AddElement(italicField);
             Layout.AddElement(dpiField);
             Layout.AddElement(dpiField);
             Layout.AddSpace(10);
             Layout.AddSpace(10);
 
 

+ 8 - 2
SBansheeEditor/Include/BsScriptImportOptions.h

@@ -7,6 +7,8 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	enum class FontRenderMode;
+
 	/**
 	/**
 	 * @brief	Base class for all C++/CLR interop objects wrapping various
 	 * @brief	Base class for all C++/CLR interop objects wrapping various
 	 *			implementations of ImportOptions.
 	 *			implementations of ImportOptions.
@@ -172,8 +174,12 @@ namespace BansheeEngine
 		static void internal_SetFontSizes(ScriptFontImportOptions* thisPtr, MonoArray* value);
 		static void internal_SetFontSizes(ScriptFontImportOptions* thisPtr, MonoArray* value);
 		static UINT32 internal_GetDPI(ScriptFontImportOptions* thisPtr);
 		static UINT32 internal_GetDPI(ScriptFontImportOptions* thisPtr);
 		static void internal_SetDPI(ScriptFontImportOptions* thisPtr, UINT32 value);
 		static void internal_SetDPI(ScriptFontImportOptions* thisPtr, UINT32 value);
-		static bool internal_GetAntialiasing(ScriptFontImportOptions* thisPtr);
-		static void internal_SetAntialiasing(ScriptFontImportOptions* thisPtr, bool value);
+		static FontRenderMode internal_GetRenderMode(ScriptFontImportOptions* thisPtr);
+		static void internal_SetRenderMode(ScriptFontImportOptions* thisPtr, FontRenderMode value);
+		static bool internal_GetBold(ScriptFontImportOptions* thisPtr);
+		static void internal_SetBold(ScriptFontImportOptions* thisPtr, bool value);
+		static bool internal_GetItalic(ScriptFontImportOptions* thisPtr);
+		static void internal_SetItalic(ScriptFontImportOptions* thisPtr, bool value);
 		static MonoArray* internal_GetCharRanges(ScriptFontImportOptions* thisPtr);
 		static MonoArray* internal_GetCharRanges(ScriptFontImportOptions* thisPtr);
 		static void internal_SetCharRanges(ScriptFontImportOptions* thisPtr, MonoArray* value);
 		static void internal_SetCharRanges(ScriptFontImportOptions* thisPtr, MonoArray* value);
 	};
 	};

+ 30 - 6
SBansheeEditor/Source/BsScriptImportOptions.cpp

@@ -288,8 +288,12 @@ namespace BansheeEngine
 		metaData.scriptClass->addInternalCall("Internal_SetFontSizes", &ScriptFontImportOptions::internal_SetFontSizes);
 		metaData.scriptClass->addInternalCall("Internal_SetFontSizes", &ScriptFontImportOptions::internal_SetFontSizes);
 		metaData.scriptClass->addInternalCall("Internal_GetDPI", &ScriptFontImportOptions::internal_GetDPI);
 		metaData.scriptClass->addInternalCall("Internal_GetDPI", &ScriptFontImportOptions::internal_GetDPI);
 		metaData.scriptClass->addInternalCall("Internal_SetDPI", &ScriptFontImportOptions::internal_SetDPI);
 		metaData.scriptClass->addInternalCall("Internal_SetDPI", &ScriptFontImportOptions::internal_SetDPI);
-		metaData.scriptClass->addInternalCall("Internal_GetAntialiasing", &ScriptFontImportOptions::internal_GetAntialiasing);
-		metaData.scriptClass->addInternalCall("Internal_SetAntialiasing", &ScriptFontImportOptions::internal_SetAntialiasing);
+		metaData.scriptClass->addInternalCall("Internal_GetRenderMode", &ScriptFontImportOptions::internal_GetRenderMode);
+		metaData.scriptClass->addInternalCall("Internal_SetRenderMode", &ScriptFontImportOptions::internal_SetRenderMode);
+		metaData.scriptClass->addInternalCall("Internal_GetBold", &ScriptFontImportOptions::internal_GetBold);
+		metaData.scriptClass->addInternalCall("Internal_SetBold", &ScriptFontImportOptions::internal_SetBold);
+		metaData.scriptClass->addInternalCall("Internal_GetItalic", &ScriptFontImportOptions::internal_GetItalic);
+		metaData.scriptClass->addInternalCall("Internal_SetItalic", &ScriptFontImportOptions::internal_SetItalic);
 		metaData.scriptClass->addInternalCall("Internal_GetCharRanges", &ScriptFontImportOptions::internal_GetCharRanges);
 		metaData.scriptClass->addInternalCall("Internal_GetCharRanges", &ScriptFontImportOptions::internal_GetCharRanges);
 		metaData.scriptClass->addInternalCall("Internal_SetCharRanges", &ScriptFontImportOptions::internal_SetCharRanges);
 		metaData.scriptClass->addInternalCall("Internal_SetCharRanges", &ScriptFontImportOptions::internal_SetCharRanges);
 	}
 	}
@@ -350,14 +354,34 @@ namespace BansheeEngine
 		thisPtr->getFontImportOptions()->setDPI(value);
 		thisPtr->getFontImportOptions()->setDPI(value);
 	}
 	}
 
 
-	bool ScriptFontImportOptions::internal_GetAntialiasing(ScriptFontImportOptions* thisPtr)
+	FontRenderMode ScriptFontImportOptions::internal_GetRenderMode(ScriptFontImportOptions* thisPtr)
 	{
 	{
-		return thisPtr->getFontImportOptions()->getAntialiasing();
+		return thisPtr->getFontImportOptions()->getRenderMode();
 	}
 	}
 
 
-	void ScriptFontImportOptions::internal_SetAntialiasing(ScriptFontImportOptions* thisPtr, bool value)
+	void ScriptFontImportOptions::internal_SetRenderMode(ScriptFontImportOptions* thisPtr, FontRenderMode value)
 	{
 	{
-		thisPtr->getFontImportOptions()->setAntialiasing(value);
+		thisPtr->getFontImportOptions()->setRenderMode(value);
+	}
+
+	bool ScriptFontImportOptions::internal_GetBold(ScriptFontImportOptions* thisPtr)
+	{
+		return thisPtr->getFontImportOptions()->getBold();
+	}
+
+	void ScriptFontImportOptions::internal_SetBold(ScriptFontImportOptions* thisPtr, bool value)
+	{
+		thisPtr->getFontImportOptions()->setBold(value);
+	}
+
+	bool ScriptFontImportOptions::internal_GetItalic(ScriptFontImportOptions* thisPtr)
+	{
+		return thisPtr->getFontImportOptions()->getItalic();
+	}
+
+	void ScriptFontImportOptions::internal_SetItalic(ScriptFontImportOptions* thisPtr, bool value)
+	{
+		thisPtr->getFontImportOptions()->setItalic(value);
 	}
 	}
 
 
 	MonoArray* ScriptFontImportOptions::internal_GetCharRanges(ScriptFontImportOptions* thisPtr)
 	MonoArray* ScriptFontImportOptions::internal_GetCharRanges(ScriptFontImportOptions* thisPtr)