Submission for Gideon May, fixes for spacing in various osgText files.

This commit is contained in:
Robert Osfield 2002-08-09 19:51:12 +00:00
parent 392150521a
commit 5d61488476
5 changed files with 14 additions and 8 deletions

View File

@ -126,6 +126,9 @@ Pavel Moloshtan <pasha@moloshtan.com>
Alberto Barbati <abarbati@iaanus.com>
- lazy evaluation of the inverse in the MatrixTransform.
Gideon May <gideon@computer.org>
- fixed spacing in osgText.
Indirect Contributors
---------------------

View File

@ -12,6 +12,8 @@ FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph)
if( err || ft_glyph_format_bitmap != glyph->format)
{return;}
advance = glyph->advance.x >> 16;
FT_BitmapGlyph bitmap = (FT_BitmapGlyph)glyph;
FT_Bitmap* source = &bitmap->bitmap;
@ -24,9 +26,8 @@ FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph)
if (srcPitch*srcHeight==0) return;
advance = glyph->advance.x >> 16;
pos.x = bitmap->left;
pos.x = bitmap->left;
pos.y = srcHeight - bitmap->top;
// FIXME What about dest alignment?

View File

@ -18,6 +18,8 @@ FTOutlineGlyph::FTOutlineGlyph( FT_Glyph glyph)
return;
}
advance = glyph->advance.x >> 16;
vectoriser = osgNew FTVectoriser( glyph);
vectoriser->Process();
@ -44,7 +46,6 @@ FTOutlineGlyph::FTOutlineGlyph( FT_Glyph glyph)
vectoriser->MakeOutline( data);
advance = glyph->advance.x >> 16;
vectoriser=0;

View File

@ -1,7 +1,6 @@
#include "FTPixmapGlyph.h"
#include "FTGL.h"
FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
: FTGlyph(),
destWidth(0),
@ -16,6 +15,8 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
return;
}
advance = glyph->advance.x >> 16;
FT_BitmapGlyph bitmap = (FT_BitmapGlyph)glyph;
FT_Bitmap* source = &bitmap->bitmap;
@ -25,11 +26,10 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
int srcWidth = source->width;
int srcHeight = source->rows;
int srcPitch = source->pitch;
if (srcWidth*srcHeight==0) return;
numGreys = source->num_grays;
advance = glyph->advance.x >> 16;
pos.x = bitmap->left;
pos.y = srcHeight - bitmap->top;

View File

@ -66,6 +66,8 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
if( ft_glyph_format_outline != glyph->format)
{ return;}
advance = glyph->advance.x >> 16;
vectoriser = osgNew FTVectoriser( glyph);
vectoriser->Process();
@ -90,7 +92,6 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
vectoriser->MakeOutline( data);
contourFlag = vectoriser->ContourFlag();
advance = glyph->advance.x >> 16;
vectoriser=0; // delete it, using ref_ptr.