Qt 4.8
Public Types | Public Functions | Public Variables | List of all members
QtFontFamily Struct Reference

Public Types

enum  WritingSystemStatus {
  Unknown = 0, Supported = 1, UnsupportedFT = 2, UnsupportedXLFD = 4,
  Unsupported = UnsupportedFT | UnsupportedXLFD
}
 

Public Functions

QtFontFoundryfoundry (const QString &f, bool=false)
 
 QtFontFamily (const QString &n)
 
 ~QtFontFamily ()
 

Public Variables

bool bogusWritingSystems
 
int count
 
QString english_name
 
QStringList fallbackFamilies
 
bool fixedPitch: 1
 
bool fixedPitchComputed: 1
 
int fontFileIndex
 
QByteArray fontFilename
 
QtFontFoundry ** foundries
 
bool ftWritingSystemCheck: 1
 
bool loaded: 1
 
QString name
 
bool symbol_checked: 1
 
bool synthetic: 1
 
bool writingSystemCheck: 1
 
unsigned char writingSystems [QFontDatabase::WritingSystemsCount]
 
bool xlfdLoaded: 1
 

Detailed Description

Definition at line 391 of file qfontdatabase.cpp.

Enumerations

◆ WritingSystemStatus

Enumerator
Unknown 
Supported 
UnsupportedFT 
UnsupportedXLFD 
Unsupported 

Definition at line 393 of file qfontdatabase.cpp.

Constructors and Destructors

◆ QtFontFamily()

QtFontFamily::QtFontFamily ( const QString n)
inline

Definition at line 401 of file qfontdatabase.cpp.

402  :
403 #ifdef Q_WS_X11
404  fixedPitch(true), ftWritingSystemCheck(false),
405  xlfdLoaded(false), synthetic(false), symbol_checked(false),
406 #else
407  fixedPitch(false),
408 #endif
409 #ifdef Q_WS_WIN
410  writingSystemCheck(false),
411  loaded(false),
412 #endif
413 #if !defined(QWS) && defined(Q_OS_MAC)
414  fixedPitchComputed(false),
415 #endif
416  name(n), count(0), foundries(0)
417 #if defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_OS_SYMBIAN) && !defined(QT_NO_FREETYPE)
418  , bogusWritingSystems(false)
419 #endif
420 #if defined(Q_WS_QPA)
421  , askedForFallback(false)
422 #endif
423  {
424  memset(writingSystems, 0, sizeof(writingSystems));
425  }
bool bogusWritingSystems
QtFontFoundry ** foundries
unsigned char writingSystems[QFontDatabase::WritingSystemsCount]
bool ftWritingSystemCheck

◆ ~QtFontFamily()

QtFontFamily::~QtFontFamily ( )
inline

Definition at line 426 of file qfontdatabase.cpp.

426  {
427  while (count--)
428  delete foundries[count];
429  free(foundries);
430  }
QtFontFoundry ** foundries

Functions

◆ foundry()

QtFontFoundry * QtFontFamily::foundry ( const QString f,
bool  create = false 
)

Definition at line 484 of file qfontdatabase.cpp.

Referenced by QFontDatabasePrivate::addFont(), addFontToDatabase(), initializeDb(), loadFontConfig(), loadXlfds(), and qt_registerFont().

485 {
486  if (f.isNull() && count == 1)
487  return foundries[0];
488 
489  for (int i = 0; i < count; i++) {
490  if (foundries[i]->name.compare(f, Qt::CaseInsensitive) == 0)
491  return foundries[i];
492  }
493  if (!create)
494  return 0;
495 
496  if (!(count % 8)) {
497  QtFontFoundry **newFoundries = (QtFontFoundry **)
498  realloc(foundries,
499  (((count+8) >> 3) << 3) * sizeof(QtFontFoundry *));
500  Q_CHECK_PTR(newFoundries);
501  foundries = newFoundries;
502  }
503 
504  foundries[count] = new QtFontFoundry(f);
505  return foundries[count++];
506 }
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
QtFontFoundry ** foundries
bool isNull() const
Returns true if this string is null; otherwise returns false.
Definition: qstring.h:505
#define Q_CHECK_PTR(p)
Definition: qglobal.h:1853
int compare(const QString &s) const
Definition: qstring.cpp:5037

Properties

◆ bogusWritingSystems

bool QtFontFamily::bogusWritingSystems

Definition at line 461 of file qfontdatabase.cpp.

Referenced by QFontDatabasePrivate::addFont(), and initializeDb().

◆ count

int QtFontFamily::count

◆ english_name

QString QtFontFamily::english_name

Definition at line 455 of file qfontdatabase.cpp.

Referenced by addFontToDatabase(), and findEncoding().

◆ fallbackFamilies

QStringList QtFontFamily::fallbackFamilies

Definition at line 462 of file qfontdatabase.cpp.

Referenced by loadEngine(), and qt_applyFontDatabaseSettings().

◆ fixedPitch

bool QtFontFamily::fixedPitch

◆ fixedPitchComputed

bool QtFontFamily::fixedPitchComputed

Definition at line 443 of file qfontdatabase.cpp.

Referenced by qt_mac_get_fixed_pitch().

◆ fontFileIndex

int QtFontFamily::fontFileIndex

◆ fontFilename

QByteArray QtFontFamily::fontFilename

◆ foundries

QtFontFoundry** QtFontFamily::foundries

◆ ftWritingSystemCheck

bool QtFontFamily::ftWritingSystemCheck

Definition at line 434 of file qfontdatabase.cpp.

Referenced by loadFontConfig().

◆ loaded

bool QtFontFamily::loaded

Definition at line 440 of file qfontdatabase.cpp.

Referenced by populate_database().

◆ name

QString QtFontFamily::name

◆ symbol_checked

bool QtFontFamily::symbol_checked

Definition at line 446 of file qfontdatabase.cpp.

Referenced by checkSymbolFont(), and loadXlfds().

◆ synthetic

bool QtFontFamily::synthetic

Definition at line 436 of file qfontdatabase.cpp.

Referenced by loadFontConfig().

◆ writingSystemCheck

bool QtFontFamily::writingSystemCheck

Definition at line 439 of file qfontdatabase.cpp.

Referenced by addFontToDatabase(), and populate_database().

◆ writingSystems

unsigned char QtFontFamily::writingSystems[QFontDatabase::WritingSystemsCount]

◆ xlfdLoaded

bool QtFontFamily::xlfdLoaded

Definition at line 435 of file qfontdatabase.cpp.

Referenced by load(), and loadXlfds().


The documentation for this struct was generated from the following file: