CGVIS Utils
Loading...
Searching...
No Matches
FontRenderer.h File Reference

Bitmap font utilities: CPU-side text rasterization and an OpenGL font engine. More...

#include <string>
#include <vector>
#include <map>
#include <utility>
#include <memory>
#include "bmp.h"
#include "Vec2.h"
#include "GLTexture2D.h"
#include "GLArray.h"
#include "GLBuffer.h"
#include "Grid2D.h"
Include dependency graph for FontRenderer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CharPosition
 Character box in a bitmap atlas. More...
struct  CharTex
 Texture + transform bundle for a single glyph used by FontEngine. More...
class  FontEngine
 OpenGL-based text drawer using per-character textures (or SDFs). More...
class  FontRenderer
 CPU-side text compositor using a bitmap atlas and character boxes. More...

Enumerations

enum class  Alignment { Left , Right , Center }
 Text alignment modes used by the OpenGL renderer. More...

Detailed Description

Bitmap font utilities: CPU-side text rasterization and an OpenGL font engine.

Declares two related components:

  • FontRenderer: CPU-only blitter that composes strings into an Image using a bitmap atlas and character box positions read from a text file.
  • FontEngine: runtime OpenGL renderer that draws strings as quads using per-character textures; optionally renders from a signed-distance field.

Enumeration Type Documentation

◆ Alignment

enum class Alignment
strong

Text alignment modes used by the OpenGL renderer.

Enumerator
Left 

Anchor on the left side.

Right 

Anchor on the right side.

Center 

Anchor centered around the position.