Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Can't load codepoints needed for Unicode text rendering

オープン
#427 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
cpp

調査の方向性

Start by reviewing the raylib-cpp Font usage shown in the issue and the raylib GetCodepoints() API it references. Determine how Unicode text and codepoints should be exposed through the wrapper, then verify that the recommended approach works for the reported rendering case.

索引モデルが issue の本文から書いたものです。

説明

As far as I've looked, if you want to use text with foreign characters you need to specify codepoints --the conversion codes from UTF-x to real Unicode-- in the Font object. The examples I've looked include iterating for a specific range of characters to match the language you want (for C Raylib).

// Source - https://stackoverflow.com/q/73248125
// Posted by Dmitriy, modified by community. See post 'Timeline' for change history
// Retrieved 2026-09-18, License - CC BY-SA 4.0

int codepoints[512] = { 0 };
for (int i = 0; i < 95; i++) codepoints[i] = 32 + i;
for (int i = 0; i < 255; i++) codepoints[96 + i] = 0x400 + i;
Font font = LoadFontEx("arial.ttf", 32, codepoints, 512);

I've tried something similar in a project:

 // codepoints
  std::vector<int> codepoints;
  // Load codepoints from a Unicode subset (Basic Latin)
  for (int cp = 0x20; cp <= 0x7E; ++cp)
    codepoints.push_back(cp);

  raylib::Font font{"src/Milonga-Regular.ttf", 30, codepoints.data(),
                    static_cast<int>(codepoints.size())};

  raylib::Text text{text_str, 30, WHITE, font};

  (...)
  while (!w.ShouldClose()) // Detect window close button or ESC key
  {
    // Update
    // TODO: Update your variables here
	(...)

    // Draw
    BeginDrawing();
    ClearBackground(GetColor(gunmetalGray));

	(...)
    text.Draw(Vector2{20, 20});

    EndDrawing();
  }

...but it doesn't work.

Image

Another solution in Raylib is using GetCodepoints() for a string, but there's no bindings for that.
There's a recommended approach for raylib-cpp or...?

主要言語
C++
スター
965
フォーク
120
平均マージ
1日 17時間
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RobLoach/raylib-cpp のほかの issue

RobLoach/raylib-cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。