HB-to-Qt: stop propagating helpers and types not used outside QtGui
Change-Id: I039efaeabc83bc0367bb3ab949057d2cbc6c2742 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
9fc9fefdc9
commit
5e213a41ce
|
|
@ -619,11 +619,6 @@ struct _hb_qt_font_funcs_t {
|
|||
|
||||
Q_GLOBAL_STATIC(_hb_qt_font_funcs_t, qt_ffuncs)
|
||||
|
||||
hb_font_funcs_t *hb_qt_get_font_funcs()
|
||||
{
|
||||
return qt_ffuncs()->funcs;
|
||||
}
|
||||
|
||||
|
||||
static hb_blob_t *
|
||||
_hb_qt_reference_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
|
||||
|
|
@ -704,7 +699,7 @@ _hb_qt_font_create(QFontEngine *fe)
|
|||
const qreal y_ppem = fe->fontDef.pixelSize;
|
||||
const qreal x_ppem = (fe->fontDef.pixelSize * fe->fontDef.stretch) / 100.0;
|
||||
|
||||
hb_font_set_funcs(font, hb_qt_get_font_funcs(), (void *)fe, NULL);
|
||||
hb_font_set_funcs(font, qt_ffuncs()->funcs, fe, nullptr);
|
||||
hb_font_set_scale(font, QFixed::fromReal(x_ppem).value(), -QFixed::fromReal(y_ppem).value());
|
||||
hb_font_set_ppem(font, int(x_ppem), int(y_ppem));
|
||||
|
||||
|
|
|
|||
|
|
@ -58,24 +58,33 @@ QT_REQUIRE_CONFIG(harfbuzz);
|
|||
|
||||
#include <QtCore/qchar.h>
|
||||
|
||||
#include <harfbuzz/hb.h>
|
||||
#if defined(QT_BUILD_GUI_LIB)
|
||||
# include <harfbuzz/hb.h>
|
||||
#else
|
||||
// a minimal set of HB types required for Qt libs other than Gui
|
||||
|
||||
typedef struct hb_face_t hb_face_t;
|
||||
typedef struct hb_font_t hb_font_t;
|
||||
|
||||
#endif // QT_BUILD_GUI_LIB
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFontEngine;
|
||||
|
||||
#if defined(QT_BUILD_GUI_LIB)
|
||||
|
||||
// Unicode
|
||||
|
||||
Q_GUI_EXPORT hb_script_t hb_qt_script_to_script(QChar::Script script);
|
||||
Q_GUI_EXPORT QChar::Script hb_qt_script_from_script(hb_script_t script);
|
||||
hb_script_t hb_qt_script_to_script(QChar::Script script);
|
||||
QChar::Script hb_qt_script_from_script(hb_script_t script);
|
||||
|
||||
Q_GUI_EXPORT hb_unicode_funcs_t *hb_qt_get_unicode_funcs();
|
||||
hb_unicode_funcs_t *hb_qt_get_unicode_funcs();
|
||||
|
||||
#endif // QT_BUILD_GUI_LIB
|
||||
|
||||
// Font
|
||||
|
||||
Q_GUI_EXPORT hb_font_funcs_t *hb_qt_get_font_funcs();
|
||||
|
||||
Q_GUI_EXPORT hb_face_t *hb_qt_face_get_for_engine(QFontEngine *fe);
|
||||
Q_GUI_EXPORT hb_font_t *hb_qt_font_get_for_engine(QFontEngine *fe);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue