Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 6219 → Rev 6220

/branches/Version13x/Scribus/scribus/fonts/scfontmetrics.cpp
197,6 → 197,12
{
bool error = false;
FT_UInt glyphIndex;
static FPointArray pts;
FPointArray pts2;
pts.resize(0);
pts2.resize(0);
firstP = FPoint(0,0);
FirstM = true;
error = FT_Set_Char_Size( face, 0, chs*64, 72, 72 );
if (error)
{
204,7 → 210,32
return FPointArray();
}
glyphIndex = FT_Get_Char_Index(face, chr);
return traceGlyph(face, glyphIndex, chs, x, y, err);
if (glyphIndex == 0)
{
*err = true;
return FPointArray();
}
double uniEM = static_cast<double>(face->units_per_EM);
error = FT_Load_Glyph( face, glyphIndex, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP );
if (error)
{
*err = error;
return pts2;
}
error = FT_Outline_Decompose(&face->glyph->outline, &OutlineMethods, reinterpret_cast<void*>(&pts));
if (error)
{
*err = error;
return pts2;
}
*x = face->glyph->metrics.horiBearingX / 64.0;
*y = face->glyph->metrics.horiBearingY / 64.0;
QWMatrix ma;
ma.scale(1, -1);
pts.map(ma);
pts.translate(0, chs);
pts2.putPoints(0, pts.size()-2, pts, 0);
return pts2;
}
 
 
/branches/Version13x/Scribus/scribus/fonts/ftface.cpp
169,6 → 169,9
double ww = face->glyph->metrics.horiAdvance / m_uniEM;
double x, y;
bool error = false;
error = FT_Set_Char_Size( face, 0, 10, 72, 72 );
if (error)
m_glyphWidth[gl] = 1;
FPointArray outlines = traceGlyph(face, gl, 10, &x, &y, &error);
if (!error)
{