Mercurial > hg > orthanc-stone
diff Framework/Fonts/FontRenderer.cpp @ 693:9a474e90e832
Fixed a bunch of truncation warnings in various parts of the library
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 17 May 2019 08:49:55 +0200 |
parents | 529c9617654b |
children | 2d8ab34c8c91 |
line wrap: on
line diff
--- a/Framework/Fonts/FontRenderer.cpp Thu May 16 20:39:30 2019 +0200 +++ b/Framework/Fonts/FontRenderer.cpp Fri May 17 08:49:55 2019 +0200 @@ -101,7 +101,9 @@ const FT_Byte* data = reinterpret_cast<const FT_Byte*>(fontContent_.c_str()); - CheckError(FT_New_Memory_Face(library_, data, fontContent_.size(), 0, &face_)); + CheckError(FT_New_Memory_Face( + library_, data, static_cast<FT_Long>(fontContent_.size()), 0, &face_)); + CheckError(FT_Set_Char_Size(face_, // handle to face object 0, // char_width in 1/64th of points fontSize * 64, // char_height in 1/64th of points