Fonts: Amends for support for OpenType SVG fonts using lunasvg (#6591, #6607)

This commit is contained in:
ocornut
2023-08-01 09:33:56 +02:00
parent 2ad8c60abc
commit ab490dc7b8
4 changed files with 55 additions and 73 deletions

View File

@ -76,18 +76,16 @@
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
//#define IMGUI_ENABLE_FREETYPE
//---- Use FreeType+lunasvg library to render OpenType SVG fonts (SVGinOT)
// Requires lunasvg headers to be available in the include path + program to be linked with the lunasvg library (not provided).
// Only works in combination with IMGUI_ENABLE_FREETYPE.
// (implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement)
//#define IMGUI_ENABLE_FREETYPE_LUNASVG
//---- Use stb_truetype to build and rasterize the font atlas (default)
// The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend.
//#define IMGUI_ENABLE_STB_TRUETYPE
//---- Use lunasvg library to render OpenType SVG fonts (SVGinOT)
// Requires lunasvg headers to be available in the include path. Requires program to be compiled with the lunasvg library (not provided).
// See https://github.com/ocornut/imgui/tree/master/misc/freetype
// Only works in combination with IMGUI_ENABLE_FREETYPE.
// The implementation is based on the demo https://gitlab.freedesktop.org/freetype/freetype-demos/-/blob/master/src/rsvg-port.c
// which is licensed under CeCILL-C Free Software License Agreement
//#define IMGUI_ENABLE_FREETYPE_LUNASVG
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
/*