Can't load codepoints needed for Unicode text rendering
まだ誰も着手していません。
評価
- 難易度
- 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.
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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RobLoach/raylib-cpp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
RobLoach/raylib-cpp#425 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
RobLoach/raylib-cpp#434 ·
-
Code genオープン
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
RobLoach/raylib-cpp#415 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
RobLoach/raylib-cpp#370 · コメント 1 件 ·
-
SDF Font Supportオープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
RobLoach/raylib-cpp#366 · コメント 3 件 ·
RobLoach/raylib-cpp の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
ai_p2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ClickHouse/ClickHouse#123351 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
stillwater-sc/universal#1617 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
keepassxreboot/keepassxc#13737 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Vector35/binaryninja-api#8621 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信