You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This utility builds bitmap fonts used by the Path of Building Community fork. It wraps Windows GDI font rendering into a standalone Win32 application that packs glyphs into `.tga` atlases and emits metadata consumed by the main tool.
4
+
5
+
## Prerequisites
6
+
- Visual Studio 2022 (v143 toolset) with the Desktop development with C++ workload
7
+
- Windows 10 SDK (10.0 or newer)
8
+
9
+
## Building
10
+
1. Open `GLFontGen.sln` in Visual Studio.
11
+
2. Select the desired configuration (`Release` is recommended for distributing fonts).
12
+
3. Build the solution (`Build > Build Solution`).
13
+
14
+
The resulting executable (`GLFontGen.exe`) stays local to your build environment; it is intentionally not checked into source control.
15
+
16
+
## Usage
17
+
1. Run `GLFontGen.exe`.
18
+
2. Pick a font face, weight, and whether to force fixed pitch.
19
+
3. Select the font sizes you want to export.
20
+
4. Click **Generate**.
21
+
22
+
Outputs are written to `Generated Fonts/` beside the executable:
23
+
24
+
- One `.tga` atlas per selected point size (e.g. `Consolas.16.tga`).
25
+
- A single `.tgf` metadata file with layout information for every generated height.
26
+
27
+
## Output Format
28
+
-**TGA**: 32-bit BGRA image containing packed glyphs with premultiplied alpha. Dimensions are powers of two chosen to fit the selected glyph set.
29
+
-**TGF metadata**:
30
+
- Each font size starts with `HEIGHT <px>;`.
31
+
- Every glyph line follows `GLYPH <x> <y> <width> <left> <right>` with optional ASCII comment.
32
+
-`x`/`y` are the glyph origin inside the atlas, `width` is the advance width in pixels, and `left`/`right` provide side bearings.
33
+
34
+
Refer to `fontgen.cpp` if you need deeper details or want to extend the format.
0 commit comments