Support decimal values in Font sizes
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#include "IncludeFreeType.h"
|
||||
|
||||
Font::Font(FontAsset* parentAsset, int32 size)
|
||||
Font::Font(FontAsset* parentAsset, float size)
|
||||
: ManagedScriptingObject(SpawnParams(Guid::New(), Font::TypeInitializer))
|
||||
, _asset(parentAsset)
|
||||
, _size(size)
|
||||
@@ -436,7 +436,7 @@ void Font::FlushFaceSize() const
|
||||
{
|
||||
// Set the character size
|
||||
const FT_Face face = _asset->GetFTFace();
|
||||
const FT_Error error = FT_Set_Char_Size(face, 0, ConvertPixelTo26Dot6<FT_F26Dot6>((float)_size * FontManager::FontScale), DefaultDPI, DefaultDPI);
|
||||
const FT_Error error = FT_Set_Char_Size(face, 0, ConvertPixelTo26Dot6<FT_F26Dot6>(_size * FontManager::FontScale), DefaultDPI, DefaultDPI);
|
||||
if (error)
|
||||
{
|
||||
LOG_FT_ERROR(error);
|
||||
|
||||
Reference in New Issue
Block a user