1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2013 Konstantin Ritt
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QHARFBUZZNG_P_H
6#define QHARFBUZZNG_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of other Qt classes. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtGui/private/qtguiglobal_p.h>
20
21QT_REQUIRE_CONFIG(harfbuzz);
22
23#include <QtCore/qchar.h>
24
25#if defined(QT_BUILD_GUI_LIB)
26# include <hb.h>
27#else
28// a minimal set of HB types required for Qt libs other than Gui
29
30typedef struct hb_face_t hb_face_t;
31typedef struct hb_font_t hb_font_t;
32
33#endif // QT_BUILD_GUI_LIB
34
35QT_BEGIN_NAMESPACE
36
37class QFontEngine;
38
39#if defined(QT_BUILD_GUI_LIB)
40
41// Unicode
42
43hb_script_t hb_qt_script_to_script(QChar::Script script);
44QChar::Script hb_qt_script_from_script(hb_script_t script);
45
46hb_unicode_funcs_t *hb_qt_get_unicode_funcs();
47
48#endif // QT_BUILD_GUI_LIB
49
50// Font
51
52Q_GUI_EXPORT hb_face_t *hb_qt_face_get_for_engine(QFontEngine *fe);
53Q_GUI_EXPORT hb_font_t *hb_qt_font_get_for_engine(QFontEngine *fe);
54
55Q_GUI_EXPORT void hb_qt_font_set_use_design_metrics(hb_font_t *font, uint value);
56Q_GUI_EXPORT uint hb_qt_font_get_use_design_metrics(hb_font_t *font);
57
58QT_END_NAMESPACE
59
60#endif // QHARFBUZZNG_P_H
61

source code of qtbase/src/gui/text/qharfbuzzng_p.h