comparison Framework/Scene2D/CairoCompositor.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 30deba7bc8e2
children
comparison
equal deleted inserted replaced
1470:390b0c30ba19 1471:28c64c246312
136 } 136 }
137 137
138 138
139 #if ORTHANC_ENABLE_LOCALE == 1 139 #if ORTHANC_ENABLE_LOCALE == 1
140 void CairoCompositor::SetFont(size_t index, 140 void CairoCompositor::SetFont(size_t index,
141 Orthanc::EmbeddedResources::FileResourceId resource, 141 const std::string& ttf,
142 unsigned int fontSize, 142 unsigned int fontSize,
143 Orthanc::Encoding codepage) 143 Orthanc::Encoding codepage)
144 { 144 {
145 FontRenderer renderer; 145 FontRenderer renderer;
146 renderer.LoadFont(resource, fontSize); 146 renderer.LoadFont(ttf, fontSize);
147 147
148 std::unique_ptr<GlyphBitmapAlphabet> alphabet(new GlyphBitmapAlphabet); 148 std::unique_ptr<GlyphBitmapAlphabet> alphabet(new GlyphBitmapAlphabet);
149 alphabet->LoadCodepage(renderer, codepage); 149 alphabet->LoadCodepage(renderer, codepage);
150 150
151 SetFont(index, alphabet.release()); 151 SetFont(index, alphabet.release());