mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
replace QFreetypeFace::getSfntTable() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
2da0286b27
commit
56ed1cddd5
2 changed files with 9 additions and 15 deletions
|
@ -306,19 +306,6 @@ QFontEngine::Properties QFreetypeFace::properties() const
|
|||
return p;
|
||||
}
|
||||
|
||||
bool QFreetypeFace::getSfntTable(uint tag, uchar *buffer, uint *length) const
|
||||
{
|
||||
bool result = false;
|
||||
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) > 20103
|
||||
if (FT_IS_SFNT(face)) {
|
||||
FT_ULong len = *length;
|
||||
result = FT_Load_Sfnt_Table(face, tag, 0, buffer, &len) == FT_Err_Ok;
|
||||
*length = len;
|
||||
}
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Some fonts (such as MingLiu rely on hinting to scale different
|
||||
components to their correct sizes. While this is really broken (it
|
||||
should be done in the component glyph itself, not the hinter) we
|
||||
|
@ -956,7 +943,15 @@ QFixed QFontEngineFT::emSquareSize() const
|
|||
|
||||
bool QFontEngineFT::getSfntTableData(uint tag, uchar *buffer, uint *length) const
|
||||
{
|
||||
return freetype->getSfntTable(tag, buffer, length);
|
||||
bool result = false;
|
||||
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) > 20103
|
||||
if (FT_IS_SFNT(freetype->face)) {
|
||||
FT_ULong len = *length;
|
||||
result = FT_Load_Sfnt_Table(freetype->face, tag, 0, buffer, &len) == FT_Err_Ok;
|
||||
*length = len;
|
||||
}
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
int QFontEngineFT::synthesized() const
|
||||
|
|
|
@ -60,7 +60,6 @@ class QFreetypeFace
|
|||
public:
|
||||
void computeSize(const QFontDef &fontDef, int *xsize, int *ysize, bool *outline_drawing);
|
||||
QFontEngine::Properties properties() const;
|
||||
bool getSfntTable(uint tag, uchar *buffer, uint *length) const;
|
||||
|
||||
static QFreetypeFace *getFace(const QFontEngine::FaceId &face_id);
|
||||
void release(const QFontEngine::FaceId &face_id);
|
||||
|
|
Loading…
Add table
Reference in a new issue