Submission for Gideon May, fixes for spacing in various osgText files.
This commit is contained in:
parent
392150521a
commit
5d61488476
3
AUTHORS
3
AUTHORS
@ -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
|
||||
---------------------
|
||||
|
||||
|
@ -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?
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user