International fonts improvements: better sizing properties, better IME support on Windows (to input e.g. Chinese in TCastleEdit), better example

Posted on

Local chars demo
  1. Our demo examples/fonts/test_local_characters was improved a lot.

    It’s now both simpler and more powerful, shows the advised approaches: just set up TCastleFont to load fonts from TTF/OTF and assign it to TCastleUserInterfaceFont.CustomFont (like TCastleLabel.CustomFont) or TCastleText.CustomFont.

    See manual about text and fonts.

  2. With big thanks to Freedomax, our TCastleEdit now works with Windows IME much better. The IME popup appears at a proper place, and is thus visibly associated with the input box. This is great for languages relying on IME for input, like Chinese. See PR 457 for movie how it looks.

  3. The way we calculate font sizes is now easily customizable using published properties (available also in editor):

  4. Font sizes have also better names, following standard conventions:

    See terminology: Metric typographic units – Wikipedia, Glossary – Google Fonts.

Start the discussion at Castle Game Engine Forum