<small id='IiWPX'></small><noframes id='IiWPX'>

      <bdo id='IiWPX'></bdo><ul id='IiWPX'></ul>
    <i id='IiWPX'><tr id='IiWPX'><dt id='IiWPX'><q id='IiWPX'><span id='IiWPX'><b id='IiWPX'><form id='IiWPX'><ins id='IiWPX'></ins><ul id='IiWPX'></ul><sub id='IiWPX'></sub></form><legend id='IiWPX'></legend><bdo id='IiWPX'><pre id='IiWPX'><center id='IiWPX'></center></pre></bdo></b><th id='IiWPX'></th></span></q></dt></tr></i><div id='IiWPX'><tfoot id='IiWPX'></tfoot><dl id='IiWPX'><fieldset id='IiWPX'></fieldset></dl></div>

    <tfoot id='IiWPX'></tfoot><legend id='IiWPX'><style id='IiWPX'><dir id='IiWPX'><q id='IiWPX'></q></dir></style></legend>

        显示西里尔字母的 libgdx

        时间:2023-05-19
      1. <tfoot id='b4Hie'></tfoot>

        <legend id='b4Hie'><style id='b4Hie'><dir id='b4Hie'><q id='b4Hie'></q></dir></style></legend>

        <small id='b4Hie'></small><noframes id='b4Hie'>

      2. <i id='b4Hie'><tr id='b4Hie'><dt id='b4Hie'><q id='b4Hie'><span id='b4Hie'><b id='b4Hie'><form id='b4Hie'><ins id='b4Hie'></ins><ul id='b4Hie'></ul><sub id='b4Hie'></sub></form><legend id='b4Hie'></legend><bdo id='b4Hie'><pre id='b4Hie'><center id='b4Hie'></center></pre></bdo></b><th id='b4Hie'></th></span></q></dt></tr></i><div id='b4Hie'><tfoot id='b4Hie'></tfoot><dl id='b4Hie'><fieldset id='b4Hie'></fieldset></dl></div>
            <bdo id='b4Hie'></bdo><ul id='b4Hie'></ul>

                    <tbody id='b4Hie'></tbody>
                  本文介绍了显示西里尔字母的 libgdx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  libgdx 显示西里尔字母时出现以下问题.我举个例子:

                  I have the following problem with libgdx displaying Cyrillic. I give an example:

                  这行得通:

                  System.out.println("абцдеф");
                  

                  但它什么也没显示:

                  field = new TextField("абцдеф", style);
                  

                  然后尝试了,没有成功.

                  And tried without success.

                  try {
                      mmm = new String(t.getBytes(), "UTF-8");
                  } catch (UnsupportedEncodingException e) {
                      // Will it ever be thrown?
                  }
                  field = new TextField(mmm, style);
                  

                  如果有人有解决方案,我会很高兴,很多人将不胜感激.

                  I'll be glad if someone has a solution, many, many will be grateful.

                  推荐答案

                  我认为可能缺少一些额外的信息.只要 libgdx 使用 Bitmap-fonts 来显示所有类型的文本.(我认为TextField是scene2dui的一部分)默认的 Bitmap-Generation/Default-libgdx-font 可能只包含 ASCII 码字符和一些额外的字符,但没有西里尔字符.

                  I think there might be some additional information that is missing. Aslong libgdx is using Bitmap-fonts for displaying all kind of text. (TextField is a part of scene2dui I think) The default Bitmap-Generation / Default-libgdx-font might only contain ASCII-code characters and some additional, but no cyrillic.

                  这就是为什么您必须在 BitmapFont 中手动提供西里尔字符才能显示它们.用于从 .ttf-Asset 生成 BitmapFonts 的相对较新的 libgdx 扩展也可以生成西里尔字符,如果您定义它们:libGDX 中的 TrueType 字体

                  That's why you would have to provide cyrillic chars manually in your BitmapFont aswell to be able to display them. The relatively new libgdx-extension for generating BitmapFonts out of an .ttf-Asset can also generate the cyrillic characters if you define them: TrueType Fonts in libGDX

                  然后,您还可以在您的游戏/应用程序中使用它们,只要您还为您的 TextField/scene2dui 样式定义新生成的字体:Libgdx Scene2d - 设置演员 (TextField) 填充?

                  Then you'll be also able to use them in your game/app aslong you also define the newly generated font for your TextField / scene2dui style: Libgdx Scene2d - Set actor ( TextField ) padding?

                  这里还有一些 libgdx-repo 中的测试.如果有误解,请查看:https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/extensions/InternationalFontsTest.java我希望这有帮助!干杯

                  Here are also some tests in the libgdx-repo. Have a look there if there's a matter of missunderstanding: https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/extensions/InternationalFontsTest.java I hope this helps! cheers

                  这篇关于显示西里尔字母的 libgdx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:需要带有 FBO 扩展的 OpenGL 2.0 或更高版本 - LibGD 下一篇:LibGDX FreeType 字体模糊

                  相关文章

                  最新文章

                  1. <legend id='ej6Ia'><style id='ej6Ia'><dir id='ej6Ia'><q id='ej6Ia'></q></dir></style></legend>

                    <small id='ej6Ia'></small><noframes id='ej6Ia'>

                  2. <i id='ej6Ia'><tr id='ej6Ia'><dt id='ej6Ia'><q id='ej6Ia'><span id='ej6Ia'><b id='ej6Ia'><form id='ej6Ia'><ins id='ej6Ia'></ins><ul id='ej6Ia'></ul><sub id='ej6Ia'></sub></form><legend id='ej6Ia'></legend><bdo id='ej6Ia'><pre id='ej6Ia'><center id='ej6Ia'></center></pre></bdo></b><th id='ej6Ia'></th></span></q></dt></tr></i><div id='ej6Ia'><tfoot id='ej6Ia'></tfoot><dl id='ej6Ia'><fieldset id='ej6Ia'></fieldset></dl></div>
                    • <bdo id='ej6Ia'></bdo><ul id='ej6Ia'></ul>
                  3. <tfoot id='ej6Ia'></tfoot>