[Tuxpaint-devel] Font scoring method
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Shin-ichi T. <dol...@wm...> - 2022-12-17 02:03:26
|
Hi! I've looked into the font scoring method in 'dirwalk.c' and 'fonts.c'. The function 'charset_works()' scores up the given font if ALL characters passed to it are correctely rendered. However, it seems to have nothing to do with checking if the font renders given characters distinctly. I was not able to understand what qsort() in charset_works() do. I confirmed that adding Japanese characters to the translations for the strings used for scoring works to place the font supporting Japanese characters on top. The result is good but I am not so confident it is a correct way as originaly intended in font scoring method. I suppose it is more reasonable to have additional string for scoreing to score up the fonts supporting locale specific characters. For example; user_font_styles[num_font_styles]->score += 10 * charset_works( font, /* put locale specific characters to the translation for this string to score up the fonts supporting those characters. */ gettext("ABCXYZ") ); -- Shin-ichi TOYAMA <dol...@wm...> |