From 6e264cfa514f170a7a5d99de799f78f2c3e91e71 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Wed, 29 Jul 2020 13:33:04 +0900 Subject: [PATCH] There is an issue with scale, so change to LINEAR. and fixed pixel alignment issue also. Change-Id: I8fb79eafd58714b1f2fcb42d650b7f6a1ca4eeea --- .../internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp | 2 +- dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp index a972810..a3f7efd 100755 --- a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp @@ -42,7 +42,7 @@ AtlasGlyphManager::AtlasGlyphManager() { mAtlasManager = Dali::Toolkit::AtlasManager::New(); mSampler = Sampler::New(); - mSampler.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST ); + mSampler.SetFilterMode( FilterMode::LINEAR, FilterMode::LINEAR ); } void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph, diff --git a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp index cd043e2..d1aca24 100755 --- a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp @@ -549,7 +549,8 @@ struct AtlasRenderer::Impl } // Move the origin (0,0) of the mesh to the center of the actor - const Vector2 position = *( positionsBuffer + i ) - halfTextSize - lineOffsetPosition; + const Vector2& temp = *( positionsBuffer + i ); + const Vector2 position = Vector2( roundf( temp.x ), temp.y ) - halfTextSize - lineOffsetPosition; // roundf() avoids pixel alignment issues. if ( 0u != slot.mImageId ) // invalid slot id, glyph has failed to be added to atlas { -- 2.7.4