mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
font-update
This commit is contained in:
@@ -72,5 +72,6 @@ project "Freetype"
|
||||
symbols "on"
|
||||
|
||||
filter "configurations:Release"
|
||||
files { "freetype/src/base/ftdebug.c" }
|
||||
runtime "Release"
|
||||
optimize "on"
|
||||
@@ -40,9 +40,7 @@ namespace Nuake {
|
||||
for (auto e : camView)
|
||||
{
|
||||
auto [transform, camera] = camView.get<TransformComponent, CameraComponent>(e);
|
||||
//
|
||||
Matrix4 cameraTransform = camera.CameraInstance->GetTransformRotation();
|
||||
|
||||
}
|
||||
|
||||
auto transformView = m_Scene->m_Registry.view<ParentComponent, TransformComponent>();
|
||||
@@ -63,6 +61,8 @@ namespace Nuake {
|
||||
globalPosition += transformComponent.Translation;
|
||||
globalRotation += transformComponent.Rotation;
|
||||
globalScale *= transformComponent.Scale;
|
||||
|
||||
parentComponent = parentComponent.Parent.GetComponent<ParentComponent>();
|
||||
}
|
||||
|
||||
transform.GlobalTranslation = globalPosition + transform.Translation;
|
||||
|
||||
@@ -67,12 +67,13 @@ namespace Nuake
|
||||
|
||||
~Font()
|
||||
{
|
||||
if (ft)
|
||||
{
|
||||
if (font)
|
||||
msdfgen::destroyFont(font);
|
||||
msdfgen::deinitializeFreetype(ft);
|
||||
}
|
||||
if (!ft)
|
||||
return;
|
||||
|
||||
if (font)
|
||||
msdfgen::destroyFont(font);
|
||||
|
||||
msdfgen::deinitializeFreetype(ft);
|
||||
}
|
||||
|
||||
bool load(const char* fontFilename)
|
||||
|
||||
@@ -123,6 +123,7 @@ FontHandle * loadFont(FreetypeHandle *library, const char *filename) {
|
||||
return NULL;
|
||||
FontHandle *handle = new FontHandle;
|
||||
FT_Error error = FT_New_Face(library->library, filename, 0, &handle->face);
|
||||
|
||||
if (error) {
|
||||
delete handle;
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user