<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 23 mai 2011 à 14:35, Johannes Schickel a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Mon, May 23, 2011 at 2:15 AM, Thierry Crozat <<a href="mailto:criezy@scummvm.org">criezy@scummvm.org</a>> wrote:<br><blockquote type="cite">I implemented all the other points in my email, but I actually have an issue<br></blockquote><blockquote type="cite">with the localized font for OSD. It seems the ThemeEngine either loads the<br></blockquote><blockquote type="cite">kGUIFont or the kBigGUIFont depending on the resolution. So if using the<br></blockquote><blockquote type="cite">kGUIFont for OSD, it will only find the localized font when the ScummVM<br></blockquote><blockquote type="cite">window is in normal gfx mode (320x200 or 320x240), but not if using a 2X or<br></blockquote><blockquote type="cite">3X gfx mode. I see several ways out of this (and their might be others):<br></blockquote><blockquote type="cite"><font class="Apple-style-span" color="#144FAE"><font class="Apple-style-span" color="#006312">[...]</font></font></blockquote><br><blockquote type="cite">3) Tell OSD to use the localized kBigGUIFont if it cannot get the localized<br></blockquote><blockquote type="cite">kGUIFont.<br></blockquote><br>Would this mean we need to duplicate this behavior in all backends<br>having an OSD?<font class="Apple-style-span" color="#006312"><font class="Apple-style-span" color="#144FAE"><br></font></font><br>Personally I would like one of those two solutions best:<br><br>1) Have a way to query a font name/id for use with localized strings<br>in the translation manager. The backends could query this to obtain a<br>font which can be used for localized strings from the font manager.<br><br><br>2) Have a fixed font ID in font manager which is for localized<br>strings, which could then be easily queried from the backend code if<br>needed.<br></div></blockquote></div><br><div>I like your 2) and I implemented that (it is basically like the idea I had for my third point except this is handled by the FontManager). Now everything is working well.</div><div><br></div><div>I pushed all this code to my scummvm fork on github so that it can be reviewed before I push anything to the main repo. I can create a pull request if that helps. The code is in the OSD-translation branch: <a href="https://github.com/criezy/scummvm/compare/OSD-translation">https://github.com/criezy/scummvm/compare/OSD-translation</a></div><div><br></div><div>The easiest way to test that it works is to modify line 2248 of backens/graphics/sdl/sdl-graphics.cpp to translate "Fullscreen mode". That string is already translated for the GUI option dialog, so you just have to recompile, start ScummVM, and press alt-Enter to see how the OSD text behaves (I personally tried with the French and Russian translations).</div><div><br></div><div>Thierry</div><div><br></div></body></html>