Add Greek glyph range to ImFontAtlas #5676

Closed
opened 2022-09-12 13:25:08 +00:00 by azonenberg · 7 comments
azonenberg commented 2022-09-12 13:25:08 +00:00 (Migrated from github.com)

I'm working on an scientific computing application that makes fairly heavy use of Greek letters in the UI.

It would be convenient if ImFontAtlas had a GetGlyphRangesGreek() method so I didn't have to add every Greek letter to the atlas manually.

I'm working on an scientific computing application that makes fairly heavy use of Greek letters in the UI. It would be convenient if ImFontAtlas had a GetGlyphRangesGreek() method so I didn't have to add every Greek letter to the atlas manually.
ocornut commented 2022-09-12 13:27:23 +00:00 (Migrated from github.com)

Feel free to make a PR for it, thank you.

Feel free to make a PR for it, thank you.
azonenberg commented 2022-09-12 13:35:58 +00:00 (Migrated from github.com)

I don't have a fork handy that I can push to and have some other things to work on.

But the Greek and Coptic Unicode range is U+370 to U+3FF. Here's what I have in my code now.

for(wchar_t i=0x370; i<=0x3ff; i++)	//Greek and Coptic
	builder.AddChar(i);
I don't have a fork handy that I can push to and have some other things to work on. But the Greek and Coptic Unicode range is U+370 to U+3FF. Here's what I have in my code now. ``` for(wchar_t i=0x370; i<=0x3ff; i++) //Greek and Coptic builder.AddChar(i); ```
ocornut commented 2022-09-28 15:15:34 +00:00 (Migrated from github.com)

How about U+1F00 Greek Extended, what is that useful for ?
https://unicode.org/charts/PDF/U1F00.pdf

How about U+1F00 Greek Extended, what is that useful for ? https://unicode.org/charts/PDF/U1F00.pdf
azonenberg commented 2022-09-28 15:21:31 +00:00 (Migrated from github.com)

I'm not sure as I don't actually speak the Greek language, I just use the letters in math :)

I'm not sure as I don't actually speak the Greek language, I just use the letters in math :)
azonenberg commented 2022-09-28 15:22:29 +00:00 (Migrated from github.com)

What about adding a GreekFull glyph range, similar to what you have with Chinese, that adds that range as well as the base one?

What about adding a GreekFull glyph range, similar to what you have with Chinese, that adds that range as well as the base one?
ocornut commented 2022-09-28 15:31:04 +00:00 (Migrated from github.com)

Thanks for the PR. I think i'll merge as is for now, I prefer getting feedback on incomplete ranges.
(Anyhow hopefully those functions will eventually be gotten rid of..)

Thanks for the PR. I think i'll merge as is for now, I prefer getting feedback on incomplete ranges. (Anyhow hopefully those functions will eventually be gotten rid of..)
ocornut commented 2022-09-28 15:47:10 +00:00 (Migrated from github.com)

Merged as e74a50f, thank you!

Merged as e74a50f, thank you!
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#5676
No description provided.