Core OpenGL doesn’t provide font rendering capability. Look for OpenGL extensions and libraries which offer this functionality (e.g. websearch for “opengl font rendering libraries”, tutorials, etc.)
A few links:
- Text Rendering (LearnOpenGL)
- OGLFT: OpenGL Freetype Library
- More Freetype-related links
- GPU Accelerated Path Rendering (NVidia)
- Windows WGL Font Support (OpenGL Wiki)
- A tutorial using WGL Font Support: Outline Fonts (NeHe)