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

Public Functions

QtFontEncodingencodingID (int id, uint xpoint=0, uint xres=0, uint yres=0, uint avgwidth=0, bool add=false)
 

Public Variables

unsigned short count: 16
 
QtFontEncodingencodings
 
int fileIndex
 
QByteArray fileName
 
unsigned short pixelSize: 16
 

Detailed Description

Definition at line 167 of file qfontdatabase.cpp.

Functions

◆ encodingID()

QtFontEncoding * QtFontSize::encodingID ( int  id,
uint  xpoint = 0,
uint  xres = 0,
uint  yres = 0,
uint  avgwidth = 0,
bool  add = false 
)

Definition at line 189 of file qfontdatabase.cpp.

Referenced by findEncoding(), initializeDb(), loadFontConfig(), and loadXlfds().

191 {
192  // we don't match using the xpoint, xres and yres parameters, only the id
193  for (int i = 0; i < count; ++i) {
194  if (encodings[i].encoding == id)
195  return encodings + i;
196  }
197 
198  if (!add) return 0;
199 
200  if (!(count % 4)) {
201  QtFontEncoding *newEncodings = (QtFontEncoding *)
202  realloc(encodings,
203  (((count+4) >> 2) << 2) * sizeof(QtFontEncoding));
204  Q_CHECK_PTR(newEncodings);
205  encodings = newEncodings;
206  }
207  encodings[count].encoding = id;
208  encodings[count].xpoint = xpoint;
209  encodings[count].xres = xres;
210  encodings[count].yres = yres;
211  encodings[count].avgwidth = avgwidth;
212  encodings[count].pitch = '*';
213  return encodings + count++;
214 }
#define add(aName)
signed int encoding
#define Q_CHECK_PTR(p)
Definition: qglobal.h:1853
unsigned short count
QtFontEncoding * encodings

Properties

◆ count

unsigned short QtFontSize::count

◆ encodings

QtFontEncoding* QtFontSize::encodings

◆ fileIndex

int QtFontSize::fileIndex

◆ fileName

QByteArray QtFontSize::fileName

◆ pixelSize

unsigned short QtFontSize::pixelSize

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