Loading fonts under Photon

Hello everybody!

I have big troubles loading any fonts from files:
loading the file via PfDynamicLoad() works correct, but generating the
stem-name for the font via PfGenerateFontName() always returns NULL?

here’s my code:

if((lID = PfDynamicLoad((char const *)filename, fontDesc)) == -1) {
perror("PfDynamicLoad: ");
PtExit(EXIT_FAILURE);
}
if(PfGenerateFontName(fontDesc, 0 , 14, stem_name) == NULL)
{
printf(“PfGenerateFontName() failed!\n”);
PtExit(EXIT_FAILURE);
}

On the other side: if I use PtFontSelection() after loading the file, I
get a valid stem-name returned and I can use the font as usual. What’s
wrong with the above code?

thanks for help

mirtch <mirtschink@xsys.de> wrote:

Hello everybody!

I have big troubles loading any fonts from files:
loading the file via PfDynamicLoad() works correct, but generating the
stem-name for the font via PfGenerateFontName() always returns NULL?

here’s my code:

if((lID = PfDynamicLoad((char const *)filename, fontDesc)) == -1) {
perror("PfDynamicLoad: ");
PtExit(EXIT_FAILURE);
}
if(PfGenerateFontName(fontDesc, 0 , 14, stem_name) == NULL)
{
printf(“PfGenerateFontName() failed!\n”);
PtExit(EXIT_FAILURE);
}

On the other side: if I use PtFontSelection() after loading the file, I
get a valid stem-name returned and I can use the font as usual. What’s
wrong with the above code?

thanks for help

What name is returned in fontDesc?