comparison Framework/Scene2D/OpenGLCompositor.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 4f8db2d202c8
children 5c96bf3f1d32
comparison
equal deleted inserted replaced
1470:390b0c30ba19 1471:28c64c246312
226 } 226 }
227 } 227 }
228 228
229 #if ORTHANC_ENABLE_LOCALE == 1 229 #if ORTHANC_ENABLE_LOCALE == 1
230 void OpenGLCompositor::SetFont(size_t index, 230 void OpenGLCompositor::SetFont(size_t index,
231 Orthanc::EmbeddedResources::FileResourceId resource, 231 const std::string& ttf,
232 unsigned int fontSize, 232 unsigned int fontSize,
233 Orthanc::Encoding codepage) 233 Orthanc::Encoding codepage)
234 { 234 {
235 if (!context_.IsContextLost()) 235 if (!context_.IsContextLost())
236 { 236 {
237 FontRenderer renderer; 237 FontRenderer renderer;
238 renderer.LoadFont(resource, fontSize); 238 renderer.LoadFont(ttf, fontSize);
239 239
240 GlyphBitmapAlphabet dict; 240 GlyphBitmapAlphabet dict;
241 dict.LoadCodepage(renderer, codepage); 241 dict.LoadCodepage(renderer, codepage);
242 242
243 SetFont(index, dict); 243 SetFont(index, dict);