summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio
diff options
context:
space:
mode:
authorJari Karppinen <jari.karppinen@qt.io>2019-05-09 15:18:23 +0300
committerJari Karppinen <jari.karppinen@qt.io>2019-05-14 12:07:01 +0000
commitb9866ce98ab6844380a3c54d179c01591bd2e4aa (patch)
tree984df0c1280280b4804ae395cb0a08da27005bf9 /src/Authoring/Studio
parentc46b03d90eedc1f13c178dd69e019fd2b6de9994 (diff)
Assume project fonts are in a subdirectory relative to project or presentation
Task-number: QT3DS-3353 Change-Id: Iee9719c00b0da9d6e28b0baade9fd26b35f88d79 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio')
-rw-r--r--src/Authoring/Studio/Render/StudioRenderer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Render/StudioRenderer.cpp b/src/Authoring/Studio/Render/StudioRenderer.cpp
index dde2d64c..f6361a69 100644
--- a/src/Authoring/Studio/Render/StudioRenderer.cpp
+++ b/src/Authoring/Studio/Render/StudioRenderer.cpp
@@ -725,16 +725,18 @@ struct SRendererImpl : public IStudioRenderer,
Q3DStudio::CString thePath(
Q3DStudio::CString::fromQString(
StudioUtils::resourcePath() + QStringLiteral("/Font")));
+ // For QT3DS-3353 assume project fonts are in a subdirectory relative to project.
+ QString projectFontPath = projectPath + QStringLiteral("/fonts");
m_Context->GetTextRenderer()->AddSystemFontDirectory(
m_Context->GetStringTable().RegisterStr(thePath.c_str()));
m_Context->GetTextRenderer()->AddProjectFontDirectory(
- m_Context->GetStringTable().RegisterStr(projectPath.toLatin1().data()));
+ m_Context->GetStringTable().RegisterStr(projectFontPath.toLatin1().data()));
if (m_Context->getDistanceFieldRenderer()) {
m_Context->getDistanceFieldRenderer()->AddSystemFontDirectory(
m_Context->GetStringTable().RegisterStr(thePath.c_str()));
m_Context->getDistanceFieldRenderer()->AddProjectFontDirectory(
m_Context->GetStringTable().RegisterStr(
- projectPath.toLatin1().data()));
+ projectFontPath.toLatin1().data()));
}
}
}