From 881c8317ecc9d8a407fe7d7e76cdfe50e899699e Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 15 Dec 2023 10:25:06 -0800 Subject: [PATCH] update README --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 353b7a2..1536340 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,21 @@ -This is Wellspring, an immediate mode font rendering system in C. +This is Wellspring, an immediate mode multiple-channel signed distance field font rendering system in C. About Wellspring ---------------- Wellspring is inspired by the design of Dear ImGui. -It outputs pixel data that you can upload to a texture and vertex buffers that you can render anytime in your 3D application. +It outputs buffer data that you can upload and render anytime in your 3D application. This means that you can integrate it easily using the graphics library of your choice. -Wellspring uses stb_truetype to rasterize and pack fonts quickly. + +Wellspring uses JSON output from [msdf-atlas-gen](https://github.com/Chlumsky/msdf-atlas-gen) to generate buffers. It also uses [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) for additional kerning support. At render time, bind the image data from msdf-atlas-gen with buffers generated by Wellspring for beautiful MSDF font rendering. + +Using msdf-atlas-gen +-------------- +A full explanation of msdf-atlas-gen is beyond the scope of this project, but note that Wellspring only accepts MSDF atlas types with JSON output. + +Your atlas generation might look like this: +```sh +msdf-atlas-gen -yorigin top -font ~/mygame/myfont.otf -imageout ~/mygame/content/forgotten_dream.png -json ~/mygame/content/forgotten_dream.json +``` Dependencies ------------ @@ -20,7 +30,7 @@ For *nix platforms, use CMake: $ cmake ../ $ make -For Windows, see the 'visualc/' directory. +For Windows, you can use cmake-gui to generate a Visual Studio solution or use VSCode with the CMake and C/C++ Tools extensions. License -------