Change FontMetrics format to match GlyphMetrics 45/34945/2
authorPaul Wisbey <p.wisbey@samsung.com>
Wed, 4 Feb 2015 15:58:38 +0000 (15:58 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Thu, 5 Feb 2015 17:08:09 +0000 (17:08 +0000)
Change-Id: Ie098d4a45779b9952c670a78855c8cd54e44ad53

base/dali-toolkit/public-api/text/text-controller.cpp

index 2c8ff38..441ac62 100644 (file)
@@ -157,20 +157,16 @@ void Controller::UpdateVisualPositions()
       visualModel.GetGlyphs( 0, &firstGlyph, 1 );
       mImpl->mFontClient.GetFontMetrics( firstGlyph.fontId, fontMetrics );
 
-      int penX( 0 );
-      int penY( fontMetrics.ascender ); // Move to baseline
+      float penX( 0 );
+      float penY( fontMetrics.ascender ); // Move to baseline
 
       for( unsigned int i=0; i<glyphCount; ++i )
       {
         GlyphInfo glyph;
         visualModel.GetGlyphs( i, &glyph, 1 );
 
-        if( glyph.width > 0 &&
-            glyph.height > 0 ) // Skip whitespace
-        {
-          glyphPositions.push_back( Vector2( penX + glyph.xBearing,
-                                             penY - glyph.yBearing ) );
-        }
+        glyphPositions.push_back( Vector2( penX + glyph.xBearing,
+                                           penY - glyph.yBearing ) );
 
         penX += glyph.advance;
       }