'How do you interpret ttf file to draw text?

I am implementing a 2D game engine and am implementing text rendering next. I read that .ttf files need bezier curves to be able to be rendered properly, so I implemented a quadratic and a cubic bezier curve class. Now, I need to interpret the data from a .ttf file, but the resources online are scarce.

This is what I use to develop my engine:

  • Visual Studio 2022
  • C++
  • OpenGL
  • GLEW
  • GLFW
  • GLM
  • stbimage

I am looking to create my own rasterizer that takes the .ttf file data and render text using that data. However, I have no idea on how to interpret it. How do I interpret it and apply it to rasterize?

Note: I am not looking to create a bit map and render from a texture.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source