 Source/System/Text/OSGTextVectorFace.cpp | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/Source/System/Text/OSGTextVectorFace.cpp b/Source/System/Text/OSGTextVectorFace.cpp
index bfe087a..ad0d537 100644
--- a/Source/System/Text/OSGTextVectorFace.cpp
+++ b/Source/System/Text/OSGTextVectorFace.cpp
@@ -113,11 +113,11 @@ const TextVectorGlyph &TextVectorFace::getVectorGlyph(TextGlyph::Index glyphInde
     return *(glyph.release());
 }
 
-
 //----------------------------------------------------------------------
 // Fills a geometry with a new text
 // Author: afischle, pdaehne
 //----------------------------------------------------------------------
+
 void TextVectorFace::fillGeo(Geometry *geoPtr, const TextLayoutResult &layoutResult,
                              Real32 scale, Real32 depth, UInt32 level,
                              Real32 creaseAngle)
@@ -254,7 +254,7 @@ void TextVectorFace::fillGeo(Geometry *geoPtr, const TextLayoutResult &layoutRes
         UInt32 texCoordOffset = texPtr->size32();
         Real32 coordZ = 0.5f * depth;
         vector<Vec2f>::const_iterator cIt;
-        for (cIt = outline.coords.begin(); cIt != outline.coords.end(); ++cIt)
+        for (cIt = outline.coords.cbegin(); cIt != outline.coords.cend(); ++cIt)
         {
             Vec2f coord = *cIt + pos;
             Vec2f texCoord = coord;
@@ -267,14 +267,14 @@ void TextVectorFace::fillGeo(Geometry *geoPtr, const TextLayoutResult &layoutRes
         // Store types, lengths and indices
         vector<TextVectorGlyph::PolygonOutline::TypeIndex>::const_iterator tIt;
         UInt32 indexBegin = 0, indexEnd;
-        for (tIt = outline.types.begin(); tIt != outline.types.end(); ++tIt)
+        for (tIt = outline.types.cbegin(); tIt != outline.types.cend(); ++tIt)
         {
             typesPtr->push_back(tIt->first);
             indexEnd = tIt->second;
             OSG_ASSERT(indexEnd >= indexBegin);
             lensPtr->push_back(indexEnd - indexBegin);
-            UInt32 j;
-            for (j = indexBegin; j < indexEnd; ++j)
+           
+            for (UInt32 j = indexBegin; j < indexEnd; ++j)
             {
                 // the interleaved multi-index blocks have the layout
                 // Position | Normal | TexCoord
@@ -299,7 +299,7 @@ void TextVectorFace::fillGeo(Geometry *geoPtr, const TextLayoutResult &layoutRes
             // texture coordinates from the front side
             UInt32 backCoordOffset = posPtr->size32();
             coordZ = -0.5f * depth;
-            for (cIt = outline.coords.begin(); cIt != outline.coords.end(); ++cIt)
+            for (cIt = outline.coords.cbegin(); cIt != outline.coords.cend(); ++cIt)
             {
                 Vec2f coord = *cIt + pos;
                 coord *= scale;
@@ -315,8 +315,9 @@ void TextVectorFace::fillGeo(Geometry *geoPtr, const TextLayoutResult &layoutRes
             // vertices is uneven, we simply flip the vertices. When the number of
             // vertices is even, we have to add an additional vertex before we flip the
             // vertices.
-//            UInt32 indexBegin = 0, indexEnd;
-            for (tIt = outline.types.begin(); tIt != outline.types.end(); ++tIt)
+
+			indexBegin = 0;
+            for (tIt = outline.types.cbegin(); tIt != outline.types.cend(); ++tIt)
             {
                 typesPtr->push_back(tIt->first);
                 indexEnd = tIt->second;
@@ -374,7 +375,7 @@ void TextVectorFace::fillGeo(Geometry *geoPtr, const TextLayoutResult &layoutRes
             UInt32 start = 0, end, index = 0;
             vector<UInt32>::const_iterator iIt;
             vector<TextVectorGlyph::Orientation>::const_iterator oriIt = glyph.getContourOrientations().begin();
-            for (iIt = outline.contours.begin(); iIt != outline.contours.end(); ++iIt, ++oriIt)
+            for (iIt = outline.contours.cbegin(); iIt != outline.contours.cend(); ++iIt, ++oriIt)
             {
                 OSG_ASSERT(oriIt != glyph.getContourOrientations().end());
                 UInt32 contourCoordOffset, contourBackCoordOffset;
@@ -522,7 +523,6 @@ void TextVectorFace::fillGeo(Geometry *geoPtr, const TextLayoutResult &layoutRes
     }
 }
 
-
 //----------------------------------------------------------------------
 // Creates a new text geometry
 // Author: pdaehne
