43 #include <QtGui/private/qfontengine_p.h> 44 #include <QtGui/private/qfontengine_qpa_p.h> 45 #include <QtCore/QLibraryInfo> 46 #include <QtCore/QDir> 63 if (dataArray.
size() == 0)
82 for (
int i = 0; i < writingSystemBits.
count(); ++i) {
83 uchar currentByte = writingSystemBits.
at(i);
84 for (
int j = 0; j < 8; ++j) {
91 registerFont(fontName,
QString(),fontWeight,fontStyle,stretch,
true,
false,pixelSize,writingSystems,handle);
94 qDebug() <<
"header verification of QPF2 font failed. maybe it is corrupt?";
130 qt_registerFont(familyname,foundryname,weight,style,stretch,antialiased,scalable,pixelSize,writingSystems,usrPtr);
144 , vector(other->vector)
207 d->vector[writingSystem] = support;
218 return d->vector.at(writingSystem);
247 qFatal(
"QFontDatabase: Cannot find font directory %s - is Qt installed correctly?",
254 for (
int i = 0; i < int(dir.
count()); ++i) {
285 qWarning(
"This plugin does not support font engines created directly from font data");
316 qWarning(
"This plugin does not support application fonts");
342 #ifndef QT_NO_SETTINGS The QVariant class acts like a union for the most common Qt data types.
The QDir class provides access to directory structures and their contents.
void setSupported(QFontDatabase::WritingSystem, bool supported=true)
Sets the supported state of the writing system given by writingSystem to the value specified by suppo...
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
HintingPreference
This enum describes the different levels of hinting that can be applied to glyphs to improve legibili...
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
QSupportedWritingSystems & operator=(const QSupportedWritingSystems &other)
Assigns the other supported writing systems object to this object.
#define QT_END_NAMESPACE
This macro expands to.
QString absoluteFilePath(const QString &fileName) const
Returns the absolute path name of a file in the directory.
The QAtomicInt class provides platform-independent atomic operations on integers. ...
QWritingSystemsPrivate(const QWritingSystemsPrivate *other)
The QByteArray class provides an array of bytes.
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
Weight
Qt uses a weighting scale from 0 to 99 similar to, but not the same as, the scales used in Windows or...
bool ref()
Atomically increments the value of this QAtomicInt.
The QString class provides a Unicode character string.
uint count() const
Returns the total number of directories and files in the directory.
Stretch
Predefined stretch values that follow the CSS naming convention.
static QVariant extractHeaderField(const uchar *data, HeaderTag tag)
bool supported(QFontDatabase::WritingSystem) const
Returns true if the writing system given by writingSystem is supported; otherwise returns false...
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
void setNameFilters(const QStringList &nameFilters)
Sets the name filters used by entryList() and entryInfoList() to the list of filters specified by nam...
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
bool exists() const
Returns true if the file specified by fileName() exists; otherwise returns false. ...
void refresh() const
Refreshes the directory information.
Q_CORE_EXPORT void qDebug(const char *,...)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QFontDatabase class provides information about the fonts available in the underlying window syste...
static float pixelSize(const QFontDef &request, int dpi)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
The QStringList class provides a list of strings.
The QSupportedWritingSystems class is used when registering fonts with the internal Qt fontdatabase...
const char * styleHint(const QFontDef &request)
Q_CORE_EXPORT void qWarning(const char *,...)
static const char * data(const QByteArray &arr)
Style
This enum describes the different styles of glyphs that are used to display text. ...
Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)
const char * constData() const
Returns a pointer to the data stored in the byte array.
Q_CORE_EXPORT void qFatal(const char *,...)
StyleHint
Style hints are used by the font matching algorithm to find an appropriate default family if a select...
The QFile class provides an interface for reading from and writing to files.
int count(char c) const
Returns the number of occurrences of character ch in the byte array.
static bool verifyHeader(const uchar *data, int size)
Type type() const
Returns the storage type of the value stored in the variant.
static QString location(LibraryLocation)
Returns the location specified by loc.
QWritingSystemsPrivate * d
QSupportedWritingSystems()
int size() const
Returns the number of bytes in this byte array.
static QByteArray encodeName(const QString &fileName)
By default, this function converts fileName to the local 8-bit encoding determined by the user's loca...
char at(int i) const
Returns the character at index position i in the byte array.
#define qPrintable(string)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
static QString fileName(const QString &fileUrl)
~QSupportedWritingSystems()
Destroys the object.