mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
replace QFreetypeFace::computeSize() with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8dd00a954b
commit
b08bf6d2a1
2 changed files with 2 additions and 8 deletions
|
@ -157,12 +157,6 @@ HB_Error QFreetypeFace::getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 p
|
||||||
return HB_Err_Ok;
|
return HB_Err_Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QFreetypeFace::computeSize(const QFontDef &fontDef, int *xsize, int *ysize)
|
|
||||||
{
|
|
||||||
*ysize = qRound(fontDef.pixelSize * 64);
|
|
||||||
*xsize = *ysize * fontDef.stretch / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
QFontEngine::Properties QFreetypeFace::properties() const
|
QFontEngine::Properties QFreetypeFace::properties() const
|
||||||
{
|
{
|
||||||
QFontEngine::Properties p;
|
QFontEngine::Properties p;
|
||||||
|
@ -324,7 +318,8 @@ bool QFontEngineFT::init(FaceId faceId)
|
||||||
face_id = faceId;
|
face_id = faceId;
|
||||||
|
|
||||||
lbearing = rbearing = SHRT_MIN;
|
lbearing = rbearing = SHRT_MIN;
|
||||||
freetype->computeSize(fontDef, &xsize, &ysize);
|
ysize = qRound(fontDef.pixelSize * 64);
|
||||||
|
xsize = (ysize * fontDef.stretch / 100);
|
||||||
|
|
||||||
FT_Face face = getFace();
|
FT_Face face = getFace();
|
||||||
// fake italic/oblique
|
// fake italic/oblique
|
||||||
|
|
|
@ -61,7 +61,6 @@ public:
|
||||||
QFreetypeFace(const QFontEngine::FaceId &face_id);
|
QFreetypeFace(const QFontEngine::FaceId &face_id);
|
||||||
~QFreetypeFace();
|
~QFreetypeFace();
|
||||||
|
|
||||||
void computeSize(const QFontDef &fontDef, int *xsize, int *ysize);
|
|
||||||
QFontEngine::Properties properties() const;
|
QFontEngine::Properties properties() const;
|
||||||
|
|
||||||
FT_Face face;
|
FT_Face face;
|
||||||
|
|
Loading…
Add table
Reference in a new issue