{"id":17975841,"url":"https://github.com/aiekick/imguifontstudio","last_synced_at":"2025-04-06T18:14:56.155Z","repository":{"id":37722630,"uuid":"246392771","full_name":"aiekick/ImGuiFontStudio","owner":"aiekick","description":"Embedded Font Helper Gui Tool for programming","archived":false,"fork":false,"pushed_at":"2022-11-26T14:42:44.000Z","size":29340,"stargazers_count":400,"open_issues_count":3,"forks_count":38,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-30T15:12:33.884Z","etag":null,"topics":["batch-job","codepoint","cross-platform","dear-imgui","embedded","font","font-awesome","font-icons","font-merge","free-software","imgui","linux","macos","osx","software","subset-font","theme","tool","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aiekick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-10T19:45:04.000Z","updated_at":"2025-03-23T23:43:41.000Z","dependencies_parsed_at":"2022-08-27T02:39:47.746Z","dependency_job_id":null,"html_url":"https://github.com/aiekick/ImGuiFontStudio","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFontStudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFontStudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFontStudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFontStudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiekick","download_url":"https://codeload.github.com/aiekick/ImGuiFontStudio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526764,"owners_count":20953143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch-job","codepoint","cross-platform","dear-imgui","embedded","font","font-awesome","font-icons","font-merge","free-software","imgui","linux","macos","osx","software","subset-font","theme","tool","windows"],"created_at":"2024-10-29T17:21:22.714Z","updated_at":"2025-04-06T18:14:56.123Z","avatar_url":"https://github.com/aiekick.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"| Backend | Win | Linux | Osx |\n| ------- | --- | ----- | --- |\n| Opengl 3 | [\u003cimg src=\"https://github.com/aiekick/ImGuiFontStudio/workflows/Win/badge.svg\" width=\"150\"/\u003e](https://github.com/aiekick/ImGuiFontStudio/actions?query=workflow%3AWin) | [\u003cimg src=\"https://github.com/aiekick/ImGuiFontStudio/workflows/Linux/badge.svg\" width=\"165\"/\u003e](https://github.com/aiekick/ImGuiFontStudio/actions?query=workflow%3ALinux) | [\u003cimg src=\"https://github.com/aiekick/ImGuiFontStudio/workflows/Osx/badge.svg\" width=\"150\"/\u003e](https://github.com/aiekick/ImGuiFontStudio/actions?query=workflow%3AOsx) |\n| Vulkan | [\u003cimg src=\"https://github.com/aiekick/ImGuiFontStudio/workflows/Win_Vulkan/badge.svg\" width=\"150\"/\u003e](https://github.com/aiekick/ImGuiFontStudio/actions?query=workflow%3AWin_Vulkan) | [\u003cimg src=\"https://github.com/aiekick/ImGuiFontStudio/workflows/Linux_Vulkan/badge.svg\" width=\"165\"/\u003e](https://github.com/aiekick/ImGuiFontStudio/actions?query=workflow%3ALinux_Vulkan) | [\u003cimg src=\"https://github.com/aiekick/ImGuiFontStudio/workflows/Osx_Vulkan/badge.svg\" width=\"150\"/\u003e](https://github.com/aiekick/ImGuiFontStudio/actions?query=workflow%3AOsx_Vulkan) |\n\nVulkan versions :\n * on windows its working fine, here, just not found a way for install Vulkan SDk with github action\n * on OSX, we must use Molten-Vk, and its not tested for now. if someone want to help :)\n\n\u003cimg src=\"https://github.com/aiekick/ImGuiFontStudio/blob/master/doc/src.png\" width=\"500\"\u003e\n\n# [ImGuiFontStudio](https://github.com/aiekick/ImGuiFontStudio)\n\nImGuiFontStudio is a tool for Subset font and extract glyph names for use embbeded or not in a software, especially for use with ImGui for embedded way.\n\nGreatly inspired / based on the project [IconFontCppHeaders](https://github.com/juliettef/IconFontCppHeaders)\n\nThis is my first big opensource software.\n\nAs a self learning man i always developped my softs in solo.\n\nSo maybe you will found some weird things, bad design pattern, \nbad optimization, or others bullshits :)\n\nPlease send me your feedback.\nI enjoy all constructive comments and help is welcome.\n\nSuccesfully tested on my side :\n\n* On Win 7 x64 (in version x86/x64 OpenGl3/Vulkan)\n* On Linux Debian/Ubuntu (in version x64 OpenGl3/Vulkan)\n* On Linux Debian/RaspberryOs (in version x86/x64 OpenGl3/Vulkan)\n* MacOs Mojave (in exe version x86 OpenGl3)\n\n## The features :\n\n* can open ttf or otf font file\n* can subset font file (one file same time or by batch)\n* can translate or rescale glyphs\n* can generate header with corresponding glyph names and codepoint\n* can generate a card picture file who show the content (icon + name of the header)\n* can generate src (C/C++/C#) file with compressed data for embedded (incorparated in binary) use\n* can merge many font file in one (the glyphs will be resized)\n* can edit codepoint and glyph names\n* have a project file\n* many tool available for select glyphs (by zone, by line, by codepoint range)\n* Cross Platform, tested on Win/Osx/Linux \n* Change / define ImGui app Theme\n\nFor more information how to use the generated files, see this project : https://github.com/juliettef/IconFontCppHeaders\n\nMy soft do the same job and more but easier for user :)\n\n## How to Build :\n\nYou need to use cMake.\nFor the 3 Os (Win, Linux, MacOs), the cMake usage is exactly the same, \n\n1) Choose a build directory. (called here my_build_directory for instance) and\n2) Choose a Build Mode : \"Release\" / \"MinSizeRel\" / \"RelWithDebInfo\" / \"Debug\" (called here BuildMode for instance)\n3) Run cMake in console : (the first for generate cmake build files, the second for build the binary)\n```cpp\ncmake -B my_build_directory -DCMAKE_BUILD_TYPE=BuildMode\ncmake --build my_build_directory --config BuildMode\n```\n\nSome cMake version need Build mode define via the directive CMAKE_BUILD_TYPE or via --Config when we launch the build. \nThis is why i put the boths possibilities\n\nBy the way you need before, to make sure, you have needed dependencies.\n\n### On Windows :\n\nYou need to have the opengl library installed\n\n### On Linux :\n\nYou need many lib : (X11, xrandr, xinerama, xcursor, mesa)\n\nIf you are on debian you can run :  \n\n```cpp\nsudo apt-get update \nsudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev\n```\n\n### On MacOs :\n\nyou need many lib : opengl and cocoa framework\n\n## How to use generated font \n\nImGuiFontStudio will generate, 4 file types, depending of your needs.\n\n | File Type | Description |\n | --------- | ----------- |\n | Font file TTF | Vector Font File needed for external mode |\n | Source Code | .c/.cpp/.cs for c/c++/c# with conpressed font data for embedded mode |\n | Header code | .h/.cs for c/c++/c# with infos like (glyph labels/codepoint min/max ranges)]\n | Card | .png this card is a picture file who show each glyph and the corresponding labels|\n \n 1) If you want to have no external dependencie, \nthe embedded mode is for you, but your binary file can have a bigger size if you have a big font.\n 2) If you want to have a external font file and more compact binary file, the external mode is for you.\n \nFor loading that in ImGui, you need to merge the font icon into the current main font used in your ImGui App.\nBut we just need to load some codepoints, not all the unicode table.\nThis is why you have in the header file the min/max range infos.\n\n## External Font File Use :\n\nfor instance here in this example for load embedded font, we have (with font Prefix IGFS) :\n* ICON_MIN_IGFS =\u003e min range\n* ICON_MAX_IGFS =\u003e max range\n* FONT_ICON_FILE_NAME_IGFS =\u003e the font file name to load (ex: fontawesome.ttf)\n\n### For C (CImGui)\n\n```c\nImGuiIO* ioptr = igGetIO();\nImFontAtlas_AddFontDefault(ioptr-\u003eFonts, NULL);\nconst ImWchar icons_ranges[3] = { ICON_MIN_IGFS, ICON_MAX_IGFS, 0 };\nImFontConfig* icons_config = ImFontConfig_ImFontConfig();\nicons_config-\u003eMergeMode = true; \nicons_config-\u003ePixelSnapH = true;\nImFontAtlas_AddFontFromFileTTF(ioptr-\u003eFonts, FONT_ICON_FILE_NAME_IGFS, 15.0f, icons_config, icons_ranges);\nImFontConfig_destroy(icons_config);\n```\n\n### For C++\n\n```cpp\nImGui::GetIO().Fonts-\u003eAddFontDefault();\nstatic const ImWchar icons_ranges[] = { ICON_MIN_IGFS, ICON_MAX_IGFS, 0 };\nImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true;\nImGui::GetIO().Fonts-\u003eAddFontFromFileTTF(FONT_ICON_FILE_NAME_IGFS, 15.0f, \u0026icons_config, icons_ranges);\n```\n\n### For C# (ImGui.NET)\n\n```cpp\nImGui.GetIO().Fonts.AddFontDefault();\nunsafe\n{\n\tImFontConfigPtr config = ImGuiNative.ImFontConfig_ImFontConfig(); config.MergeMode = true; config.PixelSnapH = true;\n\tGCHandle rangeHandle = GCHandle.Alloc(new ushort[]{IconFonts.IGFS_Labels.ICON_MIN, IconFonts.IGFS_Labels.ICON_MAX,0}, GCHandleType.Pinned);\n\tImGui.GetIO().Fonts.AddFontFromFileTTF(IconFonts.IGFS_Labels.FONT_ICON_FILE_NAME, 15, config, rangeHandle.AddrOfPinnedObject());\n}\n```\n\n## Embedded Font File Use :\n\nfor instance here in this example for load embedded font, we have (with font Prefxi IGFS) :\n* ICON_MIN_IGFS =\u003e min range\n* ICON_MAX_IGFS =\u003e max range\n* FONT_ICON_BUFFER_NAME_IGFS =\u003e the compressed buffer name you have in your_embedded_font.cpp to load \n(ex: IGFS_compressed_data_base85)\n\n### For C (CImGui)\n\n```c\nImGuiIO* ioptr = igGetIO();\nImFontAtlas_AddFontDefault(ioptr-\u003eFonts, NULL);\nconst ImWchar icons_ranges[3] = { ICON_MIN_IGFS, ICON_MAX_IGFS, 0 };\nImFontConfig* icons_config = ImFontConfig_ImFontConfig();\nicons_config-\u003eMergeMode = true; \nicons_config-\u003ePixelSnapH = true;\nImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ioptr-\u003eFonts, FONT_ICON_FILE_NAME_IGFS, 15.0f, icons_config, icons_ranges);\nImFontConfig_destroy(icons_config);\n```\n\n### For C++\n\n```cpp\nImGui::GetIO().Fonts-\u003eAddFontDefault();\nstatic const ImWchar icons_ranges[] = { ICON_MIN_IGFS, ICON_MAX_IGFS, 0 };\nImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true;\nImGui::GetIO().Fonts-\u003eAddFontFromMemoryCompressedBase85TTF(FONT_ICON_BUFFER_NAME_IGFS, 15.0f, \u0026icons_config, icons_ranges);\n```\n\n### For C# (ImGui.NET)\n\n```cpp\nImGui.GetIO().Fonts.AddFontDefault();\nunsafe\n{\n\tImFontConfigPtr config = ImGuiNative.ImFontConfig_ImFontConfig(); config.MergeMode = true; config.PixelSnapH = true;\n\tGCHandle rangeHandle = GCHandle.Alloc(new ushort[]{IconFonts.IGFS_Labels.ICON_MIN, IconFonts.IGFS_Labels.ICON_MAX,0}, GCHandleType.Pinned);\n\tImGui.GetIO().Fonts.AddFontFromMemoryCompressedBase85TTF(IconFonts.IGFS_Bytes.compressed_data_base85, 15, config, rangeHandle.AddrOfPinnedObject());\n}\n```\n\n## Boths cases :\n\nIn both cases, the use in code is the same :\n\nAfter that step, when you have a ImGui widget to test, you just need to put in the label field,\nthe glyph you want, defined in the header file for labels :\n\n### For C/C++\n\n```cpp\nImGui::Button(ICON_IGFS_FOLDER_OPEN \" Open Font\");\n```\n\n### For C# (ImGui.NET)\n\n```cpp\nImGui::Button(IconFonts.IGFS_Labels.FOLDER_OPEN + \" Open Font\");\n```\n\nand you will have this result : \n![Button_With_Icons](doc/Button_With_Icons.png)\n\n## Contributions / Issues / Features request\n\nYou can use the issue tab for report issues or for features request.\nOr you can also contribute with discuss via issues tabs, or/and Pull Requests :)\n\n## License :\n\nImGuiFontStudio is an open source software under [license apache 2.0](LICENSE)\n\n## Library used :\n\n* [Glfw - ZLIB](http://www.glfw.org/)\n* [Dear ImGui - Docking branch - MIT](https://github.com/ocornut/imgui)\n* [Glad - MIT](https://github.com/Dav1dde/glad)\n* [Stb - MIT](https://github.com/nothings/stb)\n* [tinyxml2 - ZLIB]( https://github.com/leethomason/tinyxml2)\n* [dirent - MIT]( https://github.com/tronkko/dirent)\n* [sfntly - Apache 2.0](https://github.com/rillig/sfntly)\n* [cTools - MIT](https://github.com/aiekick/cTools)\n* [ImGuiFileDialog - MIT](https://github.com/aiekick/ImGuiFileDialog)\n\n## Screenshots (with the default theme)\n\nMain View : Source pane\n![Source pane](doc/src.png)\n\nMain View : Final pane with two fonts\n![Final pane with two fonts](doc/dst_two_font_merge.png)\n\nMain View : Final pane for edition\n![Final pane for edition](doc/dst_edit.png)\n\nSample of a Card :\n![Card](doc/sample_for_cpp/external/Generated_Font.png)\n\n## Projects who are using this font tool :\n\nLet me know your project wiht a pciture and i can add it here :\n\nFor the moment (as i know), there is :\n\n* [ImGuiFontStudio](https://github.com/aiekick/ImGuiFontStudio)\n* [ImGuiFileDialog](https://github.com/aiekick/ImGuiFileDialog)\n* [NoodlesPlate](https://github.com/aiekick/NoodlesPlate)\n* [SdfFontDesigner](https://github.com/aiekick/SdfFontDesigner)\n* SdfMesher (UnReleased for the moment)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiekick%2Fimguifontstudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiekick%2Fimguifontstudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiekick%2Fimguifontstudio/lists"}