group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
SdfFont.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <cstdint>
7#include <glm/glm.hpp>
8#include <unordered_map>
9
12{
13 glm::vec2 uvMin{};
14 glm::vec2 uvMax{};
15 glm::vec2 bearing{};
16 float advance{};
17 float width{};
18 float height{};
19};
20
22using GlyphMap = std::unordered_map<uint32_t, GlyphInfo>;
std::unordered_map< uint32_t, GlyphInfo > GlyphMap
Immutable glyph metrics table keyed by Unicode codepoint.
Definition SdfFont.hpp:22
Per-glyph metrics stored after SDF atlas bake.
Definition SdfFont.hpp:12
glm::vec2 uvMax
Normalised atlas UV bottom-right.
Definition SdfFont.hpp:14
glm::vec2 uvMin
Normalised atlas UV top-left.
Definition SdfFont.hpp:13
float advance
Horizontal cursor advance (pixels at bake size).
Definition SdfFont.hpp:16
float height
Glyph pixel height at bake size.
Definition SdfFont.hpp:18
glm::vec2 bearing
Offset from cursor baseline to glyph top-left (pixels at bake size).
Definition SdfFont.hpp:15
float width
Glyph pixel width at bake size.
Definition SdfFont.hpp:17