There is an issue with scale, so change to LINEAR. 90/239690/6
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 29 Jul 2020 04:33:04 +0000 (13:33 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Thu, 30 Jul 2020 00:30:43 +0000 (09:30 +0900)
and fixed pixel alignment issue also.

Change-Id: I8fb79eafd58714b1f2fcb42d650b7f6a1ca4eeea

dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp

index a972810..a3f7efd 100755 (executable)
@@ -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,
index cd043e2..d1aca24 100755 (executable)
@@ -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
         {