Ver Fonte

Rename FontSubsystem to FontEngine

Victor Luchits há 6 anos atrás
pai
commit
2df8e4abee

+ 2 - 2
CMake/FileList.cmake

@@ -263,8 +263,8 @@ set(Core_SRC_FILES
     ${PROJECT_SOURCE_DIR}/Source/Core/FontFaceHandleDefault.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/FontFaceLayer.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/FontFamily.cpp
-    ${PROJECT_SOURCE_DIR}/Source/Core/FontSubsystemInterface.cpp
-    ${PROJECT_SOURCE_DIR}/Source/Core/FontSubsystemInterfaceDefault.cpp
+    ${PROJECT_SOURCE_DIR}/Source/Core/FontEngineInterface.cpp
+    ${PROJECT_SOURCE_DIR}/Source/Core/FontEngineInterfaceDefault.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/FontProvider.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/FreeType/FontFace.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/FreeType/FontFaceHandle.cpp

+ 3 - 3
Include/RmlUi/Core/Core.h

@@ -53,7 +53,7 @@
 #include "FileInterface.h"
 #include "FontEffect.h"
 #include "FontGlyph.h"
-#include "FontSubsystemInterface.h"
+#include "FontEngineInterface.h"
 #include "Geometry.h"
 #include "GeometryUtilities.h"
 #include "ID.h"
@@ -124,9 +124,9 @@ RMLUICORE_API void SetFileInterface(FileInterface* file_interface);
 RMLUICORE_API FileInterface* GetFileInterface();
 
 // Sets the interface through which all font requests are made.
-RMLUICORE_API void SetFontSubsystemInterface(FontSubsystemInterface* _font_interface);
+RMLUICORE_API void SetFontEngineInterface(FontEngineInterface* _font_interface);
 // Returns RmlUi's file interface.
-RMLUICORE_API FontSubsystemInterface* GetFontSubsystemInterface();
+RMLUICORE_API FontEngineInterface* GetFontEngineInterface();
 	
 /// Creates a new element context.
 /// @param[in] name The new name of the context. This must be unique.

+ 5 - 5
Include/RmlUi/Core/FontSubsystemInterface.h → Include/RmlUi/Core/FontEngineInterface.h

@@ -25,8 +25,8 @@
  *
  */
 
-#ifndef RMLUICOREFONTSUBSYSTEMINTERFACE_H
-#define RMLUICOREFONTSUBSYSTEMINTERFACE_H
+#ifndef RMLUICOREFONTENGINEINTERFACE_H
+#define RMLUICOREFONTENGINEINTERFACE_H
 
 #include "Traits.h"
 #include "Header.h"
@@ -36,11 +36,11 @@
 namespace Rml {
 namespace Core {
 
-class RMLUICORE_API FontSubsystemInterface
+class RMLUICORE_API FontEngineInterface
 {
 public:
-	FontSubsystemInterface();
-	virtual ~FontSubsystemInterface();
+	FontEngineInterface();
+	virtual ~FontEngineInterface();
 
 	/// Adds a new font face to the database. The face's family, style and weight will be determined from the face itself.
 	/// @param[in] file_name The file to load the face from.

+ 1 - 1
Samples/basic/bitmapfont/src/main.cpp

@@ -103,7 +103,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 	shell_renderer->SetContext(context);
 
     // Load bitmap font
-    Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Arial.fnt");
+    Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Arial.fnt");
 	
     // Load and show the demo document.
 	if(Rml::Core::ElementDocument* document = context->LoadDocument("assets/bitmapfont.rml"))

+ 4 - 4
Samples/basic/sdl2/src/main.cpp

@@ -89,10 +89,10 @@ int main(int argc, char **argv)
 	if(!Rml::Core::Initialise())
 		return 1;
 
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-Bold.otf");
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-BoldItalic.otf");
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-Italic.otf");
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-Roman.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-Bold.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-BoldItalic.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-Italic.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-Roman.otf");
 
 	Rml::Core::Context *Context = Rml::Core::CreateContext("default",
 		Rml::Core::Vector2i(window_width, window_height));

+ 4 - 4
Samples/basic/sfml2/src/main.cpp

@@ -89,10 +89,10 @@ int main(int argc, char **argv)
 	if(!Rml::Core::Initialise())
 		return 1;
 
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-Bold.otf");
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-BoldItalic.otf");
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-Italic.otf");
-	Rml::Core::GetFontSubsystemInterface()->LoadFontFace("assets/Delicious-Roman.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-Bold.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-BoldItalic.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-Italic.otf");
+	Rml::Core::GetFontEngineInterface()->LoadFontFace("assets/Delicious-Roman.otf");
 
 	Rml::Core::Context *Context = Rml::Core::CreateContext("default",
 		Rml::Core::Vector2i(MyWindow.getSize().x, MyWindow.getSize().y));

+ 1 - 1
Samples/shell/src/Shell.cpp

@@ -40,7 +40,7 @@ void Shell::LoadFonts(const char* directory)
 
 	for (int i = 0; i < sizeof(font_names) / sizeof(Rml::Core::String); i++)
 	{
-		Rml::Core::GetFontSubsystemInterface()->LoadFontFace(Rml::Core::String(directory) + font_names[i]);
+		Rml::Core::GetFontEngineInterface()->LoadFontFace(Rml::Core::String(directory) + font_names[i]);
 	}
 }
 

+ 7 - 7
Source/Core/Core.cpp

@@ -30,7 +30,7 @@
 #include "../../Include/RmlUi/Core.h"
 #include "EventSpecification.h"
 #include "FileInterfaceDefault.h"
-#include "FontSubsystemInterfaceDefault.h"
+#include "FontEngineInterfaceDefault.h"
 #include "PluginRegistry.h"
 #include "StyleSheetFactory.h"
 #include "TemplateCache.h"
@@ -46,13 +46,13 @@ static RenderInterface* render_interface = nullptr;
 static SystemInterface* system_interface = nullptr;
 // RmlUi's file I/O interface.
 static FileInterface* file_interface = nullptr;
-// RmlUi's font subsystem interface.
-static FontSubsystemInterface* font_interface = nullptr;
+// RmlUi's font engine interface.
+static FontEngineInterface* font_interface = nullptr;
 
 // Default interfaces should be created and destroyed on Initialise and Shutdown, respectively.
 static UniquePtr<FileInterface> default_file_interface;
 
-static UniquePtr<FontSubsystemInterface> default_font_interface;
+static UniquePtr<FontEngineInterface> default_font_interface;
 
 static bool initialised = false;
 
@@ -93,7 +93,7 @@ bool Initialise()
 	if (!font_interface)
 	{
 #ifndef RMLUI_NO_FONT_INTERFACE_DEFAULT
-		default_font_interface = std::make_unique<FontSubsystemInterfaceDefault>();
+		default_font_interface = std::make_unique<FontEngineInterfaceDefault>();
 		font_interface = default_font_interface.get();
 #else
 		Log::Message(Log::LT_ERROR, "No font interface set!");
@@ -186,13 +186,13 @@ FileInterface* GetFileInterface()
 }
 
 // Sets the interface through which all font requests are made.
-void SetFontSubsystemInterface(FontSubsystemInterface* _font_interface)
+void SetFontEngineInterface(FontEngineInterface* _font_interface)
 {
 	font_interface = _font_interface;
 }
 	
 // Returns RmlUi's file interface.
-FontSubsystemInterface* GetFontSubsystemInterface()
+FontEngineInterface* GetFontEngineInterface()
 {
 	return font_interface;
 }

+ 6 - 6
Source/Core/ElementTextDefault.cpp

@@ -107,7 +107,7 @@ void ElementTextDefault::OnRender()
 		float clip_left = (float)clip_origin.x;
 		float clip_right = (float)(clip_origin.x + clip_dimensions.x);
 		float clip_bottom = (float)(clip_origin.y + clip_dimensions.y);
-		float line_height = (float)GetFontSubsystemInterface()->GetLineHeight(GetFontFaceHandle());
+		float line_height = (float)GetFontEngineInterface()->GetLineHeight(GetFontFaceHandle());
 		
 		render = false;
 		for (size_t i = 0; i < lines.size(); ++i)
@@ -168,7 +168,7 @@ bool ElementTextDefault::GenerateToken(float& token_width, int line_begin)
 	WString token;
 
 	BuildToken(token, token_begin, text.c_str() + text.size(), true, collapse_white_space, break_at_endline, computed.text_transform);
-	token_width = (float) GetFontSubsystemInterface()->GetStringWidth(font_face_handle, token, 0);
+	token_width = (float) GetFontEngineInterface()->GetStringWidth(font_face_handle, token, 0);
 
 	return LastToken(token_begin, text.c_str() + text.size(), collapse_white_space, break_at_endline);
 }
@@ -220,7 +220,7 @@ bool ElementTextDefault::GenerateLine(WString& line, int& line_length, float& li
 
 		// Generate the next token and determine its pixel-length.
 		bool break_line = BuildToken(token, next_token_begin, string_end, line.empty() && trim_whitespace_prefix, collapse_white_space, break_at_endline, text_transform_property);
-		int token_width = GetFontSubsystemInterface()->GetStringWidth(font_face_handle, token, line.empty() ? 0 : line[line.size() - 1]);
+		int token_width = GetFontEngineInterface()->GetStringWidth(font_face_handle, token, line.empty() ? 0 : line[line.size() - 1]);
 
 		// If we're breaking to fit a line box, check if the token can fit on the line before we add it.
 		if (break_at_line)
@@ -272,7 +272,7 @@ void ElementTextDefault::AddLine(const Vector2f& line_position, const WString& l
 	if (font_dirty)
 		UpdateFontConfiguration();
 
-	Vector2f baseline_position = line_position + Vector2f(0.0f, (float)GetFontSubsystemInterface()->GetLineHeight(font_face_handle) - GetFontSubsystemInterface()->GetBaseline(font_face_handle));
+	Vector2f baseline_position = line_position + Vector2f(0.0f, (float)GetFontEngineInterface()->GetLineHeight(font_face_handle) - GetFontEngineInterface()->GetBaseline(font_face_handle));
 	lines.push_back(Line(line, baseline_position));
 
 	geometry_dirty = true;
@@ -384,7 +384,7 @@ bool ElementTextDefault::UpdateFontConfiguration()
 
 	// Request a font layer configuration to match this set of effects. If this is different from
 	// our old configuration, then return true to indicate we'll need to regenerate geometry.
-	int new_configuration = GetFontSubsystemInterface()->GenerateLayerConfiguration(GetFontFaceHandle(), *font_effects);
+	int new_configuration = GetFontEngineInterface()->GenerateLayerConfiguration(GetFontFaceHandle(), *font_effects);
 	if (new_configuration != font_configuration)
 	{
 		font_configuration = new_configuration;
@@ -412,7 +412,7 @@ void ElementTextDefault::GenerateGeometry(const FontFaceHandle font_face_handle)
 
 void ElementTextDefault::GenerateGeometry(const FontFaceHandle font_face_handle, Line& line)
 {
-	line.width = GetFontSubsystemInterface()->GenerateString(font_face_handle, geometry, line.text, line.position, colour, font_configuration);
+	line.width = GetFontEngineInterface()->GenerateString(font_face_handle, geometry, line.text, line.position, colour, font_configuration);
 	for (size_t i = 0; i < geometry.size(); ++i)
 		geometry[i].SetHostElement(this);
 

+ 2 - 2
Source/Core/ElementUtilities.cpp

@@ -148,7 +148,7 @@ FontFaceHandle ElementUtilities::GetFontFaceHandle(const Style::ComputedValues&
 	const String& charset = (computed_values.font_charset.empty() ? default_charset : computed_values.font_charset);
 	int font_size = (int)computed_values.font_size;
 
-	return GetFontSubsystemInterface()->GetFontFaceHandle(computed_values.font_family, charset, computed_values.font_style, computed_values.font_weight, font_size);
+	return GetFontEngineInterface()->GetFontFaceHandle(computed_values.font_family, charset, computed_values.font_style, computed_values.font_weight, font_size);
 }
 
 float ElementUtilities::GetDensityIndependentPixelRatio(Element * element)
@@ -167,7 +167,7 @@ int ElementUtilities::GetStringWidth(Element* element, const WString& string)
 	if (font_face_handle == 0)
 		return 0;
 
-	return GetFontSubsystemInterface()->GetStringWidth(font_face_handle, string);
+	return GetFontEngineInterface()->GetStringWidth(font_face_handle, string);
 }
 
 void ElementUtilities::BindEventAttributes(Element* element)

+ 14 - 14
Source/Core/FontSubsystemInterface.cpp → Source/Core/FontEngineInterface.cpp

@@ -31,25 +31,25 @@
 namespace Rml {
 namespace Core {
 
-FontSubsystemInterface::FontSubsystemInterface()
+FontEngineInterface::FontEngineInterface()
 {
 }
 
-FontSubsystemInterface::~FontSubsystemInterface()
+FontEngineInterface::~FontEngineInterface()
 {
 }
 
-bool FontSubsystemInterface::LoadFontFace(const String& file_name)
+bool FontEngineInterface::LoadFontFace(const String& file_name)
 {
 	return false;
 }
 
-bool FontSubsystemInterface::LoadFontFace(const String& file_name, const String& family, Style::FontStyle style, Style::FontWeight weight)
+bool FontEngineInterface::LoadFontFace(const String& file_name, const String& family, Style::FontStyle style, Style::FontWeight weight)
 {
 	return false;
 }
 
-FontFaceHandle FontSubsystemInterface::GetFontFaceHandle(const String& RMLUI_UNUSED_PARAMETER(family),
+FontFaceHandle FontEngineInterface::GetFontFaceHandle(const String& RMLUI_UNUSED_PARAMETER(family),
 	const String& RMLUI_UNUSED_PARAMETER(charset), Style::FontStyle RMLUI_UNUSED_PARAMETER(style),
 	Style::FontWeight RMLUI_UNUSED_PARAMETER(weight), int RMLUI_UNUSED_PARAMETER(size))
 {
@@ -61,49 +61,49 @@ FontFaceHandle FontSubsystemInterface::GetFontFaceHandle(const String& RMLUI_UNU
 	return 0;
 }
 	
-int FontSubsystemInterface::GenerateLayerConfiguration(FontFaceHandle, const FontEffectList& font_effects) const
+int FontEngineInterface::GenerateLayerConfiguration(FontFaceHandle, const FontEffectList& font_effects) const
 {
 	return 0;
 }
 
-int FontSubsystemInterface::GetCharacterWidth(FontFaceHandle) const
+int FontEngineInterface::GetCharacterWidth(FontFaceHandle) const
 {
 	return 0;
 }
 
-int FontSubsystemInterface::GetSize(FontFaceHandle) const
+int FontEngineInterface::GetSize(FontFaceHandle) const
 {
 	return 0;
 }
 
-int FontSubsystemInterface::GetXHeight(FontFaceHandle) const
+int FontEngineInterface::GetXHeight(FontFaceHandle) const
 {
 	return 0;
 }
 
-int FontSubsystemInterface::GetLineHeight(FontFaceHandle) const
+int FontEngineInterface::GetLineHeight(FontFaceHandle) const
 {
 	return 0;
 }
 
-int FontSubsystemInterface::GetBaseline(FontFaceHandle) const
+int FontEngineInterface::GetBaseline(FontFaceHandle) const
 {
 	return 0;
 }
 
-float FontSubsystemInterface::GetUnderline(FontFaceHandle, float *) const
+float FontEngineInterface::GetUnderline(FontFaceHandle, float *) const
 {
 	return 0;
 }
 
-int FontSubsystemInterface::GetStringWidth(FontFaceHandle, const WString& RMLUI_UNUSED_PARAMETER(string), word RMLUI_UNUSED_PARAMETER(prior_character))
+int FontEngineInterface::GetStringWidth(FontFaceHandle, const WString& RMLUI_UNUSED_PARAMETER(string), word RMLUI_UNUSED_PARAMETER(prior_character))
 {
 	RMLUI_UNUSED(string);
 	RMLUI_UNUSED(prior_character);
 	return 0;
 }
 
-int FontSubsystemInterface::GenerateString(FontFaceHandle, GeometryList& RMLUI_UNUSED_PARAMETER(geometry), const WString& RMLUI_UNUSED_PARAMETER(string), 
+int FontEngineInterface::GenerateString(FontFaceHandle, GeometryList& RMLUI_UNUSED_PARAMETER(geometry), const WString& RMLUI_UNUSED_PARAMETER(string), 
 	const Vector2f& RMLUI_UNUSED_PARAMETER(position), const Colourb& RMLUI_UNUSED_PARAMETER(colour), int RMLUI_UNUSED_PARAMETER(layer_configuration)) const
 {
 	RMLUI_UNUSED(geometry);

+ 15 - 15
Source/Core/FontSubsystemInterfaceDefault.cpp → Source/Core/FontEngineInterfaceDefault.cpp

@@ -29,89 +29,89 @@
 #include "precompiled.h"
 #include "FontDatabaseDefault.h"
 #include "FontFaceHandleDefault.h"
-#include "FontSubsystemInterfaceDefault.h"
+#include "FontEngineInterfaceDefault.h"
 
 namespace Rml {
 namespace Core {
 
 #ifndef RMLUI_NO_FONT_INTERFACE_DEFAULT
 
-FontSubsystemInterfaceDefault::FontSubsystemInterfaceDefault()
+FontEngineInterfaceDefault::FontEngineInterfaceDefault()
 {
 	FontDatabaseDefault::Initialise();
 }
 
-FontSubsystemInterfaceDefault::~FontSubsystemInterfaceDefault()
+FontEngineInterfaceDefault::~FontEngineInterfaceDefault()
 {
 	FontDatabaseDefault::Shutdown();
 }
 
-bool FontSubsystemInterfaceDefault::LoadFontFace(const String& file_name)
+bool FontEngineInterfaceDefault::LoadFontFace(const String& file_name)
 {
 	return FontDatabaseDefault::LoadFontFace(file_name);
 }
 
-bool FontSubsystemInterfaceDefault::LoadFontFace(const String& file_name, const String& family, Style::FontStyle style, Style::FontWeight weight)
+bool FontEngineInterfaceDefault::LoadFontFace(const String& file_name, const String& family, Style::FontStyle style, Style::FontWeight weight)
 {
 	return FontDatabaseDefault::LoadFontFace(file_name, family, style, weight);
 }
 
-FontFaceHandle FontSubsystemInterfaceDefault::GetFontFaceHandle(const String& family,
+FontFaceHandle FontEngineInterfaceDefault::GetFontFaceHandle(const String& family,
 	const String& charset, Style::FontStyle style, Style::FontWeight weight, int size)
 {
 	auto handle = FontDatabaseDefault::GetFontFaceHandle(family, charset, style, weight, size);
 	return reinterpret_cast<FontFaceHandle>(handle.get());
 }
 	
-int FontSubsystemInterfaceDefault::GenerateLayerConfiguration(FontFaceHandle handle, const FontEffectList& font_effects) const
+int FontEngineInterfaceDefault::GenerateLayerConfiguration(FontFaceHandle handle, const FontEffectList& font_effects) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GenerateLayerConfiguration(font_effects);
 }
 
-int FontSubsystemInterfaceDefault::GetCharacterWidth(FontFaceHandle handle) const
+int FontEngineInterfaceDefault::GetCharacterWidth(FontFaceHandle handle) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GetCharacterWidth();
 }
 
-int FontSubsystemInterfaceDefault::GetSize(FontFaceHandle handle) const
+int FontEngineInterfaceDefault::GetSize(FontFaceHandle handle) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GetSize();
 }
 
-int FontSubsystemInterfaceDefault::GetXHeight(FontFaceHandle handle) const
+int FontEngineInterfaceDefault::GetXHeight(FontFaceHandle handle) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GetXHeight();
 }
 
-int FontSubsystemInterfaceDefault::GetLineHeight(FontFaceHandle handle) const
+int FontEngineInterfaceDefault::GetLineHeight(FontFaceHandle handle) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GetLineHeight();
 }
 
-int FontSubsystemInterfaceDefault::GetBaseline(FontFaceHandle handle) const
+int FontEngineInterfaceDefault::GetBaseline(FontFaceHandle handle) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GetBaseline();
 }
 
-float FontSubsystemInterfaceDefault::GetUnderline(FontFaceHandle handle, float *thickness) const
+float FontEngineInterfaceDefault::GetUnderline(FontFaceHandle handle, float *thickness) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GetUnderline(thickness);
 }
 
-int FontSubsystemInterfaceDefault::GetStringWidth(FontFaceHandle handle, const WString& string, word prior_character)
+int FontEngineInterfaceDefault::GetStringWidth(FontFaceHandle handle, const WString& string, word prior_character)
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);
 	return handle_default->GetStringWidth(string, prior_character);
 }
 
-int FontSubsystemInterfaceDefault::GenerateString(FontFaceHandle handle, GeometryList& geometry, const WString& string,
+int FontEngineInterfaceDefault::GenerateString(FontFaceHandle handle, GeometryList& geometry, const WString& string,
 	const Vector2f& position, const Colourb& colour, int layer_configuration) const
 {
 	auto handle_default = reinterpret_cast<FontFaceHandleDefault *>(handle);

+ 6 - 6
Source/Core/FontSubsystemInterfaceDefault.h → Source/Core/FontEngineInterfaceDefault.h

@@ -25,19 +25,19 @@
  *
  */
 
-#ifndef RMLUICOREFONTSUBSYSTEMINTERFACEDEFAULT_H
-#define RMLUICOREFONTSUBSYSTEMINTERFACEDEFAULT_H
+#ifndef RMLUICOREFONTENGINEINTERFACEDEFAULT_H
+#define RMLUICOREFONTENGINEINTERFACEDEFAULT_H
 
-#include "../../Include/RmlUi/Core/FontSubsystemInterface.h"
+#include "../../Include/RmlUi/Core/FontEngineInterface.h"
 
 namespace Rml {
 namespace Core {
 
-class RMLUICORE_API FontSubsystemInterfaceDefault: public FontSubsystemInterface
+class RMLUICORE_API FontEngineInterfaceDefault: public FontEngineInterface
 {
 public:
-	FontSubsystemInterfaceDefault();
-	virtual ~FontSubsystemInterfaceDefault();
+	FontEngineInterfaceDefault();
+	virtual ~FontEngineInterfaceDefault();
 
 	/// Adds a new font face to the database. The face's family, style and weight will be determined from the face itself.
 	/// @param[in] file_name The file to load the face from.

+ 3 - 3
Source/Core/GeometryUtilities.cpp

@@ -80,9 +80,9 @@ void GeometryUtilities::GenerateLine(FontFaceHandle font_face_handle, Geometry*
 	std::vector< Vertex >& line_vertices = geometry->GetVertices();
 	std::vector< int >& line_indices = geometry->GetIndices();
 	float underline_thickness = 0;
-	float underline_position = GetFontSubsystemInterface()->GetUnderline(font_face_handle, &underline_thickness);
-	int size = GetFontSubsystemInterface()->GetSize(font_face_handle);
-	int x_height = GetFontSubsystemInterface()->GetXHeight(font_face_handle);
+	float underline_position = GetFontEngineInterface()->GetUnderline(font_face_handle, &underline_thickness);
+	int size = GetFontEngineInterface()->GetSize(font_face_handle);
+	int x_height = GetFontEngineInterface()->GetXHeight(font_face_handle);
 
 	float offset;
 	switch (height)

+ 6 - 6
Source/Core/LayoutInlineBox.cpp

@@ -61,7 +61,7 @@ LayoutInlineBox::LayoutInlineBox(Element* _element, const Box& _box) : position(
 		if (font_face != 0)
 		{
 			height = element->GetLineHeight();
-			baseline = (height - GetFontSubsystemInterface()->GetLineHeight(font_face)) * 0.5f + GetFontSubsystemInterface()->GetBaseline(font_face);
+			baseline = (height - GetFontEngineInterface()->GetLineHeight(font_face)) * 0.5f + GetFontEngineInterface()->GetBaseline(font_face);
 		}
 		else
 		{
@@ -182,7 +182,7 @@ void LayoutInlineBox::CalculateBaseline(float& ascender, float& descender)
 			FontFaceHandle parent_font = GetParentFont();
 			int x_height = 0;
 			if (parent_font != 0)
-				x_height = GetFontSubsystemInterface()->GetXHeight(parent_font) / -2;
+				x_height = GetFontEngineInterface()->GetXHeight(parent_font) / -2;
 
 			SetVerticalPosition(x_height + (height / 2 - baseline));
 		}
@@ -195,7 +195,7 @@ void LayoutInlineBox::CalculateBaseline(float& ascender, float& descender)
 			if (parent_font == 0)
 				SetVerticalPosition(0);
 			else
-				SetVerticalPosition(float(GetFontSubsystemInterface()->GetLineHeight(parent_font)) * 0.2f);
+				SetVerticalPosition(float(GetFontEngineInterface()->GetLineHeight(parent_font)) * 0.2f);
 		}
 		break;
 
@@ -206,7 +206,7 @@ void LayoutInlineBox::CalculateBaseline(float& ascender, float& descender)
 			if (parent_font == 0)
 				SetVerticalPosition(0);
 			else
-				SetVerticalPosition(float(-1 * GetFontSubsystemInterface()->GetLineHeight(parent_font)) * 0.4f);
+				SetVerticalPosition(float(-1 * GetFontEngineInterface()->GetLineHeight(parent_font)) * 0.4f);
 		}
 		break;
 
@@ -217,7 +217,7 @@ void LayoutInlineBox::CalculateBaseline(float& ascender, float& descender)
 			if (parent_font == 0)
 				SetVerticalPosition(0);
 			else
-				SetVerticalPosition((height - baseline) - (GetFontSubsystemInterface()->GetLineHeight(parent_font) - GetFontSubsystemInterface()->GetBaseline(parent_font)));
+				SetVerticalPosition((height - baseline) - (GetFontEngineInterface()->GetLineHeight(parent_font) - GetFontEngineInterface()->GetBaseline(parent_font)));
 		}
 		break;
 
@@ -228,7 +228,7 @@ void LayoutInlineBox::CalculateBaseline(float& ascender, float& descender)
 			if (parent_font == 0)
 				SetVerticalPosition(0);
 			else
-				SetVerticalPosition(GetFontSubsystemInterface()->GetBaseline(parent_font) - baseline);
+				SetVerticalPosition(GetFontEngineInterface()->GetBaseline(parent_font) - baseline);
 		}
 		break;
 

+ 1 - 1
Source/Core/LayoutInlineBoxText.cpp

@@ -99,7 +99,7 @@ void LayoutInlineBoxText::OffsetBaseline(float ascender)
 
 	FontFaceHandle font_face_handle = element->GetFontFaceHandle();
 	if (font_face_handle != 0)
-		leading = height - GetFontSubsystemInterface()->GetLineHeight(font_face_handle);
+		leading = height - GetFontEngineInterface()->GetLineHeight(font_face_handle);
 
 	// Offset by the half-leading.
 	position.y += leading * 0.5f;

+ 1 - 1
Source/Core/Lua/RmlUi.cpp

@@ -75,7 +75,7 @@ int LuaRmlUiCreateContext(lua_State* L, LuaRmlUi* obj)
 int LuaRmlUiLoadFontFace(lua_State* L, LuaRmlUi* obj)
 {
     const char* file = luaL_checkstring(L,1);
-    lua_pushboolean(L,GetFontSubsystemInterface()->LoadFontFace(file));
+    lua_pushboolean(L,GetFontEngineInterface()->LoadFontFace(file));
     return 1;
 }