FreeType with Unicode/Emoji

Started by
4 comments, last by 8Observer8 4 years, 6 months ago

I wrote C++ class package for rendering text on OpenGL display but have a few questions for you. I searched for charmap table but can't find any information about Unicode table that points to glyph index. Does anyone know any structure contains Unicode table that points to glyph data? Or have I poll glyph data each Unicode value (32-bit) through FT_Load_Glyph function call?

Also I am looking for emoji fonts. I googled them but can't find any good sources so far. Does anyone have good emoji font TrueType or OpenType files? How do I load color bitmap as glyph?

Does anyone have good tutorial or books show how to render text with using OpenGL? I found some but they only teach rendering ASCII codes. I want to learn how to render unicode and emoji text messages.

Tim

Advertisement

Sword7 said:
Does anyone have good tutorial or books show how to render text with using OpenGL?

I recommend these tutorials:

These tutorials uses the free Hiero (scroll down): https://libgdx.badlogicgames.com/tools.html

8Observer8 said:
These tutorials uses the free Hiero

How do you use Hiero with C++?

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

fleabay said:

8Observer8 said:
These tutorials uses the free Hiero

How do you use Hiero with C++?

No, I checked links but they do not use FreeType library. Hiero generate a bitmap of font groups. That do nothing with FreeType. FreeType provides access to TTF files directly through library calls. Check https://www.freetype.org/

Can use FreeType library calls to generate texture from a text message and put it on OpenGL display. I now found tutorial on Learn OpenGL website to teach how to use FreeType to generate texture and put it on display.

https://learnopengl.com/In-Practice/Text-Rendering

However they only teach about ASCII text message. I want Emoji/Unicode text message.

Update: I found some comments at end of this link about Unicode. I have to set FT_Select_Charmap as Unicode first.

fleabay said:
How do you use Hiero with C++?

Hiero is a software to create a BMFont from TTF or OTF

This topic is closed to new replies.

Advertisement