Immediate-Mode-UI / Immediate-Mode-UI/Nuklear

Unicode char 0x2022 shows as 0x20ac

Open
#239 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
11.4k
Forks
686
Avg merge
4d 1h
Merged PRs (30d)
3

Description

I noticed this when using the 'bullet' character in my code and seeing instead the Euro symbol. So I reproduced with the generic 'extended.c' demo.

Modified it so that font config 'range' includes the 0x2000 to 0x2fff, and changed the font to Ubuntu-R.ttf which includes the characters, and then inserted the bullet character in one of the display texts.

Here's a screenshot. The Euro should be a bullet, and the square box should be a Euro sign:
![screenshot](https://user-images.githubusercontent.com/17123974/103614927-52244580-4f32-11eb-83e0-25996998c5be.png)

I've verified that inside the nk_draw_list_add_text() function, the nk_rune 0x2022 is parsed off the string. Therefore it must be the font->query() that's at fault.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the generic extended.c demo, Ubuntu-R.ttf, and a font range covering 0x2000–0x2fff. Start by tracing font->query() after confirming nk_draw_list_add_text() receives 0x2022. Done means the bullet renders as a bullet and the Euro sign renders as a Euro sign.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.