Implemented font listing under linux in a quite hacky way. The directory list returned by XGetFontPath is not really usable, there are some path with appended :unscaled for non-ttf fonts, so i needed to add some null-pointer check to for_each_file after the opendir to avoid a crash. I think most of my ttf fonts gets listed, but at a quick glance i find some duplicates and the list is not alphabetically sorted. That would be a great improvement (sort and remove duplicates).
Also renamed Mask to Mask_table because XLib.h already defines some var called Mask. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@337 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
8
init.c
8
init.c
@@ -1734,7 +1734,7 @@ int Charger_CFG(int Tout_charger)
|
||||
case CHUNK_MASQUE: // Masque
|
||||
if (Tout_charger)
|
||||
{
|
||||
if (!read_bytes(Handle, Mask, 256))
|
||||
if (!read_bytes(Handle, Mask_table, 256))
|
||||
goto Erreur_lecture_config;
|
||||
}
|
||||
else
|
||||
@@ -1957,11 +1957,11 @@ int Sauver_CFG(void)
|
||||
|
||||
// Sauvegarde des informations du Masque
|
||||
Chunk.Numero=CHUNK_MASQUE;
|
||||
Chunk.Taille=sizeof(Mask);
|
||||
Chunk.Taille=sizeof(Mask_table);
|
||||
if (!write_byte(Handle, Chunk.Numero) ||
|
||||
!write_word_le(Handle, Chunk.Taille) )
|
||||
goto Erreur_sauvegarde_config;
|
||||
if (!write_bytes(Handle, Mask,256))
|
||||
if (!write_bytes(Handle, Mask_table,256))
|
||||
goto Erreur_sauvegarde_config;
|
||||
|
||||
// Sauvegarde des informations du Stencil
|
||||
@@ -2108,7 +2108,7 @@ void Config_par_defaut(void)
|
||||
|
||||
// Masque
|
||||
for (Indice=0; Indice<256; Indice++)
|
||||
Mask[Indice]=0;
|
||||
Mask_table[Indice]=0;
|
||||
|
||||
// Stencil
|
||||
for (Indice=0; Indice<256; Indice++)
|
||||
|
||||
Reference in New Issue
Block a user