Going back to squelching notices re: unusable fonts

Only doing so if DEBUG set.
This commit is contained in:
Bill Kendrick 2021-11-08 13:21:01 -08:00
parent 70795bffcd
commit f65fe54a2c
2 changed files with 10 additions and 2 deletions

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last modified: 2021.10.28
Last modified: 2021.11.08
*/
#include <stdio.h>
@ -249,13 +249,17 @@ fflush(stdout);
}
else
{
#ifdef DEBUG
fprintf(stderr, "Font is too defective: %s, %s, %s\n", files[i].str, family, style);
#endif
}
TuxPaint_Font_CloseFont(font);
}
else
{
#ifdef DEBUG
fprintf(stderr, "could not open %s\n", files[i].str);
#endif
}
}
free(files[i].str);

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last modified: 2021.10.28
Last modified: 2021.11.08
*/
#include <stdio.h>
@ -315,7 +315,9 @@ TuxPaint_Font *TuxPaint_Font_OpenFont(const char *pangodesc, const char *ttffile
{
if (!strcmp(ttffilename, problemFonts[i++]))
{
#ifdef DEBUG
fprintf(stderr, "Notice: Skipping problematic font: \"%s\"\n", ttffilename);
#endif
return NULL; /* bail on known problematic fonts that cause TTF_OpenFont to crash */
}
}
@ -325,7 +327,9 @@ TuxPaint_Font *TuxPaint_Font_OpenFont(const char *pangodesc, const char *ttffile
{
if (strstr(ttffilename, problemFontExtensions[i++]))
{
#ifdef DEBUG
fprintf(stderr, "Notice: Skipping font with problematic extension: \"%s\"\n", ttffilename);
#endif
return NULL; /* bail on known problematic font types that cause TTF_OpenFont to crash */
}
}