Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 20000 → Rev 20001

/trunk/Scribus/scribus/fonts/ftface.cpp
9,6 → 9,7
 
#include FT_OUTLINE_H
#include FT_GLYPH_H
#include FT_TRUETYPE_IDS_H
 
#include <QObject>
#include <QFile>
325,6 → 326,12
return result;
}
 
bool FtFace::hasMicrosoftUnicodeCmap(FT_Face face)
{
return (face->charmap && face->charmap->encoding == FT_ENCODING_UNICODE && face->charmap->platform_id == TT_PLATFORM_MICROSOFT);
}
 
 
bool FtFace::glyphNames(QMap<uint, std::pair<QChar, QString> >& GList) const
{
char buf[50];
/trunk/Scribus/scribus/fonts/ftface.h
86,6 → 86,7
 
void RawData (QByteArray & bb) const;
 
static bool hasMicrosoftUnicodeCmap(FT_Face face);
static QString adobeGlyphName(FT_ULong charcode);
virtual bool glyphNames(QMap<uint, std::pair<QChar, QString> >& GList) const;
 
/trunk/Scribus/scribus/fonts/scface_ttf.cpp
546,8 → 546,7
 
// The glyph name table embedded in Truetype fonts is not reliable.
// For those fonts we consequently use Adobe Glyph names whenever possible.
const bool avoidFntNames = (formatCode != ScFace::TYPE42 && typeCode == ScFace::TTF) &&
(face->charmap && face->charmap->encoding == FT_ENCODING_UNICODE);
const bool avoidFntNames = (formatCode != ScFace::TYPE42 && typeCode == ScFace::TTF) && hasMicrosoftUnicodeCmap(face);
if (avoidFntNames)
return true; // We use Adobe 'uniXXXX' names in such case
 
565,8 → 564,7
// The glyph name table embedded in Truetype fonts is not reliable.
// For those fonts we consequently use Adobe Glyph names whenever possible.
const bool avoidFntNames = (formatCode != ScFace::TYPE42 && typeCode == ScFace::TTF) &&
(face->charmap && face->charmap->encoding == FT_ENCODING_UNICODE);
const bool avoidFntNames = (formatCode != ScFace::TYPE42 && typeCode == ScFace::TTF) && hasMicrosoftUnicodeCmap(face);
if (!avoidFntNames)
return FtFace::glyphNames(GList);
/trunk/Scribus/scribus/fonts/scfontmetrics.cpp
314,6 → 314,7
return pmr;
}
 
#if 0
bool GlyphNames(const FtFace& fnt, QMap<uint, std::pair<QChar, QString> >& GList)
{
char buf[50];
383,8 → 384,8
 
return true;
}
#endif
 
 
static int traceMoveto( FT_Vector *to, FPointArray *composite )
{
qreal tox = ( to->x / FTSCALE );
/trunk/Scribus/scribus/fonts/scfontmetrics.h
32,6 → 32,6
FPointArray SCRIBUS_API traceChar(FT_Face face, uint chr, int chs, qreal *x, qreal *y, bool *err);
FPointArray SCRIBUS_API traceGlyph(FT_Face face, uint chr, int chs, qreal *x, qreal *y, bool *err);
QPixmap SCRIBUS_API FontSample(const ScFace& fnt, int s, QString ts, QColor back, bool force = false);
bool SCRIBUS_API GlyphNames(const FtFace& fnt, QMap<uint, std::pair<QChar, QString> >& GList);
//bool SCRIBUS_API GlyphNames(const FtFace& fnt, QMap<uint, std::pair<QChar, QString> >& GList);
 
#endif