diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2013-03-09 19:28:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-12 18:13:37 +0100 |
commit | f69c9059d6c0bfb911bf0bdcec1e7470c38fa7e2 (patch) | |
tree | d2ec791666f98347c8ef83eb1aeb47b37321c94a /src/gui/text/qfontengine_ft.cpp | |
parent | b047f48612e2ba38ff63979bd60e0f203d77ceb3 (diff) |
Replace HB types used in API with Qt analogs
hb_uint32 <-> quint32
HB_Glyph <-> glyph_t
HB_Fixed <-> QFixed, HB_FixedPoint <-> QFixedPoint
HB_GlyphAttributes <-> QGlyphAttributes
Change-Id: I4338ec4ce9a9c20ea591606ab10e6ef4f19931b8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qfontengine_ft.cpp')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index bedd5753c7..6cac4b9205 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -183,9 +183,9 @@ int QFreetypeFace::fsType() const return fsType; } -HB_Error QFreetypeFace::getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints) +int QFreetypeFace::getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) { - if (HB_Error error = (HB_Error)FT_Load_Glyph(face, glyph, flags)) + if (int error = FT_Load_Glyph(face, glyph, flags)) return error; if (face->glyph->format != FT_GLYPH_FORMAT_OUTLINE) @@ -198,8 +198,8 @@ HB_Error QFreetypeFace::getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 p if (point > *nPoints) return HB_Err_Invalid_SubTable; - *xpos = face->glyph->outline.points[point].x; - *ypos = face->glyph->outline.points[point].y; + *xpos = QFixed::fromFixed(face->glyph->outline.points[point].x); + *ypos = QFixed::fromFixed(face->glyph->outline.points[point].y); return HB_Err_Ok; } @@ -2029,13 +2029,13 @@ void QFontEngineFT::QGlyphSet::setGlyph(glyph_t index, QFixed subPixelPosition, } } -HB_Error QFontEngineFT::getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints) +int QFontEngineFT::getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) { lockFace(); bool hsubpixel = true; int vfactor = 1; int load_flags = loadFlags(0, Format_A8, flags, hsubpixel, vfactor); - HB_Error result = freetype->getPointInOutline(glyph, load_flags, point, xpos, ypos, nPoints); + int result = freetype->getPointInOutline(glyph, load_flags, point, xpos, ypos, nPoints); unlockFace(); return result; } |