Re: [Tuxpaint-devel] Font scoring method
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Albert C. <aca...@gm...> - 2022-12-18 10:00:22
|
>>Would this chunk of currently unused code help you? >> >> // translation spares -- design not finalized >>#if 0 >> user_font_styles[num_font_styles]->score += >> charset_works(font, gettext("<1>spare-1a")); >> user_font_styles[num_font_styles]->score += >> charset_works(font, gettext("<1>spare-1b")); >> user_font_styles[num_font_styles]->score += >> charset_works(font, gettext("<9>spare-9a")) * 9; >> user_font_styles[num_font_styles]->score += >> charset_works(font, gettext("<9>spare-9b")) * 9; >>#endif >> >>It should not impact English, but that could use documentation! >>The text has repeated digits, either "1" or "9", causing the font >>to be considered bad, and thus the score does not increase. >> >>So you could translate like this: >> >>"<9>spare-9a" becomes a pair of hiragana. >>"<9>spare-9b" becomes a pair of katakana. >>"<1>spare-1a" becomes a pair of kanji. >>"<1>spare-1b" becomes the Yen and Yuan currency symbols. > > Oh, I think it will be the one I wanted to have! > > Of course I've noticed this unused part, but did not recognize the > difference to the one I proposed. > > Yes, the key is that original string has two same characters, is'nt > it! How clever! > > Do you mind if I enable this block now ? If it meets your needs, you should enable it. It was intended to help you, but I wasn't sure if it would be the right thing. I left it disabled because I was unsure if it would be suitable. Maybe you should add some comments to document it. If any paragraph from my email has been helpful, feel free to put it in a comment. Notice that two of them are multiplied by 9. That gives them a stronger influence over font order. I think you'll want to use those for hiragana and katakana, and to use the others for kanji and the yen symbol. If you need more spares, add them. |