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 2c8ff38b272c0f0ce64d9bee03fb365f4e345882..441ac62ab7da19e0ba8351f0663b632fa37b548f 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;
       }