Mercurial > hg > orthanc-stone
diff Samples/Sdl/RtViewer/RtViewerSdl.cpp @ 1471:28c64c246312
working on a shared library
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Jun 2020 12:57:54 +0200 |
parents | 15173a383a00 |
children | 169adf9090a6 |
line wrap: on
line diff
--- a/Samples/Sdl/RtViewer/RtViewerSdl.cpp Fri Jun 12 17:38:07 2020 +0200 +++ b/Samples/Sdl/RtViewer/RtViewerSdl.cpp Mon Jun 15 12:57:54 2020 +0200 @@ -22,6 +22,8 @@ #include "../../Common/RtViewerView.h" #include "../SdlHelpers.h" +#include <EmbeddedResources.h> + // Stone of Orthanc includes #include "../../../Framework/Loaders/GenericLoadersContext.h" #include "../../../Framework/OpenGL/OpenGLIncludes.h" @@ -205,8 +207,11 @@ ViewportController& controller = lock->GetController(); Scene2D& scene = controller.GetScene(); + std::string ttf; + Orthanc::EmbeddedResources::GetFileResource(ttf, Orthanc::EmbeddedResources::UBUNTU_FONT); + CairoCompositor compositor(canvasWidth, canvasHeight); - compositor.SetFont(0, Orthanc::EmbeddedResources::UBUNTU_FONT, FONT_SIZE_0, Orthanc::Encoding_Latin1); + compositor.SetFont(0, ttf, FONT_SIZE_0, Orthanc::Encoding_Latin1); compositor.Refresh(scene); Orthanc::ImageAccessor canvas;