44 #include <private/qfontengine_coretext_p.h> 45 #include <private/qfontengine_mac_p.h> 60 const bool symbolFont =
false;
67 for (
int i = 1; i < length; ++i) {
68 if (logClusters[i] == pos)
72 while (pos < logClusters[i]) {
76 if ((!symbolFont && uc[i].unicode() == 0x00ad) ||
qIsControlChar(uc[i].unicode()))
85 glyphs->
attributes[pos-1].justification = HB_Space;
87 glyphs->
attributes[pos-1].justification = HB_Character;
89 glyphs->
attributes[pos-1].justification = HB_NoJustification;
93 pos = logClusters[length-1];
95 glyphs->
attributes[pos].justification = HB_Space;
97 glyphs->
attributes[pos].justification = HB_Character;
310 if (uc >= 0x0600 && uc < 0x750)
312 else if (uc == 0x200d)
457 for (
int i = 1; i < len; ++i) {
474 if (properties[lastPos].shape ==
XInitial || properties[lastPos].shape ==
XMedial)
478 if (properties[lastPos].shape ==
XFinal)
482 if (properties[lastPos].shape ==
XFinal)
486 if (properties[lastPos].shape ==
XFinal)
490 if (properties[lastPos].shape ==
XFinal)
565 shapeTextWithHarfbuzz(item);
569 #ifndef QT_MAC_USE_COCOA 574 QTextEngine::ShaperFlags flags;
577 if (option.useDesignMetrics())
578 flags |= DesignMetrics;
582 const int len = length(item);
583 int num_glyphs = length(item);
591 for (
int i = 0; i < len; ++i) {
597 str =
reinterpret_cast<const QChar *
>(uc);
600 ensureSpace(num_glyphs);
601 num_glyphs = layoutData->glyphLayout.numGlyphs - layoutData->used;
605 unsigned short *log_clusters = logClusters(&si);
607 bool stringToCMapFailed =
false;
612 memset(log_clusters, 0, len *
sizeof(
unsigned short));
616 if (!fe->
stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters, attributes(), &si)) {
617 ensureSpace(num_glyphs);
618 g = availableGlyphs(&si);
619 stringToCMapFailed = !fe->
stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters,
623 if (!stringToCMapFailed) {
642 if (f + l < layoutData->
string.length()) {
647 unsigned short *log_clusters = logClusters(&si);
649 for (
int i = 0; i < len; ++i) {
650 int gpos = log_clusters[i];
657 const ushort *uc =
reinterpret_cast<const ushort *
>(str);
void shapeTextMac(int item) const
static void heuristicSetGlyphAttributes(const QChar *uc, int length, QGlyphLayout *glyphs, unsigned short *logClusters, int num_glyphs)
static const unsigned char arabic_group[0x150]
#define QT_END_NAMESPACE
This macro expands to.
bool qIsControlChar(ushort uc)
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
unsigned char justification
static ArabicGroup arabicGroup(unsigned short uc)
virtual Type type() const =0
The QChar class provides a 16-bit Unicode character.
Category category() const
Returns the character's category.
static const JoiningPair joining_table[5][4]
#define QT_BEGIN_NAMESPACE
This macro expands to.
unsigned short num_glyphs
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const
QChar toUpper() const
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the ch...
Q_DECLARE_TYPEINFO(QArabicProperties, Q_PRIMITIVE_TYPE)
void qt_getArabicProperties(const unsigned short *chars, int len, QArabicProperties *properties)
static const QCssKnownValue properties[NumProperties - 1]
HB_GlyphAttributes * attributes
static const Joining joining_for_group[ArabicGroupsEnd]
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QChar toLower() const
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the ch...
Q_CORE_EXPORT const Properties *QT_FASTCALL properties(uint ucs4)