Re: [Tuxpaint-devel] Font scoring method
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Bill K. <nb...@so...> - 2022-12-18 10:19:46
|
Peeking in before bedtime. Hi Albert, been a while! :-D Thanks for the guidance here. I'm glad to see some motion here, and wonder if a small bit of documentation somewhere on the Tux Paint site (under /help/po/<something>), or maybe even in the program's own documentation (adding to the EXTENDING doc's "Translations" section) might be in order?! I recently tried to tweak the comments in dirwalk.c to help get the comment-based docs we _did_ have to appear in the POT & PO files (they were missing(!)), which is a step in the right direction. :) -bill! On Sun, Dec 18, 2022 at 05:00:10AM -0500, Albert Cahalan wrote: > >>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. > > > _______________________________________________ > Tuxpaint-devel mailing list > Tux...@li... > https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel -- -bill! Sent from my computer |