Подробности
[В начало]
Проблема в реализации № S0604
Краткое описание
FcFreeTypeQuery возвращает нулевой указатель
Подробное описание
В описании функции FcFreeTypeQuery сказано: "Constructs a pattern representing the 'id'th font in 'file'". Но для данного файла шрифта она возвращает нулевой указатель вместо того, чтобы создать шаблон и вернуть указатель на него.
Раздел стандарта
Fontconfig Developers Reference, Version 2.4.2
Пример
#define FILE_PATH "UTBI__10-ISO8859-10.pcf.gz" //the font file name
FcConfig *fc;
FcFontSet *set;
FcStrSet *dirs;
FcBlanks *blanks;
FcPattern *fcp;
int count;
FcInit ();
if (!(fc = FcConfigGetCurrent ()))
{
printf ("Could not get current config
");
}
if (!(set = FcFontSetCreate ()))
{
printf ("Could not create font sets
");
}
if (!(dirs = FcStrSetCreate ()))
{
printf ("Could not create str set
");
}
if (!(blanks = FcConfigGetBlanks (fc)))
{
printf ("Could not create blanks
");
}
/*
* Constructs a pattern representing the 'id'th font in 'file'
*
* The number of fonts in 'file' is returned in 'count'.
*/
fcp = FcFreeTypeQuery ((FcChar8 *)FILE_PATH, 0, blanks, &count);
printf ("The number of fonts in the file - %d
"
"The address of the first font - %p
", count, fcp);
Компонент
fontconfig 2.2.3 or later
Принято
freedesktop.org Bugzilla 12993
[В начало]
»