tomato/misc/freetype
Green Sky 1dccce8097 Squashed 'external/imgui/imgui/' changes from 6f7b5d0ee2f..070c046cd1f
070c046cd1f Internals: rename recently added TreeNodeIsOpen() -> TreeNodeGetOpen(). (#7553, #1131, #2958, #2079, #722)
7c6d4ff28de TreeNode: Internals: facilitate dissociating item ID from storage ID (useful for 1861)
8bab3eab6a8 Clipper: added SeekCursorForItem() function, for use when using ImGuiListClipper::Begin(INT_MAX). (#1311)
74a1854db9a Nav, Demo: comments.
669021be4cd Style: close button and collapse/window-menu button hover highlight made rectangular instead of round.
67e9aa4d3df Demo: Property Editor: add basic filter.
4247f190c23 Demo: Property Editor: rearrange code + replace use of bool to proper ImGuiChildFlags.
9c1f922b02b Fixed pvs-studio warning.
0e4dcfa5529 Obsoleted PushTabStop()/PopTabStop() in favor of using new PushItemFlag()/PopItemFlag() with ImGuiItemFlags_NoTabStop.
3de75138d1c (Breaking) Renamed ImGuiSelectableFlags_DontClosePopups to ImGuiSelectableFlags_NoAutoClosePopups. (#1379, #1468, #2200, #4936, #5216, #7302, #7573)
0de88a928d7 Added ImGuiItemFlags_AutoClosePopups as a replacement for internal's ImGuiItemFlags_SelectableDontClosePopup. (#1379, #1468, #2200, #4936, #5216, #7302, #7573)
b4ca869c407 (Breaking) Obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag()/PopItemFlag() with ImGuiItemFlags_ButtonRepeat.
7e0800e7186 Added PushItemFlag(), PopItemFlag(), ImGuiItemFlags.
46691d172ec Demo: Reworked "Property Editor" demo in a manner that more ressemble the tree data and struct description data that a real application would want to use.
bc9e5b62b6b Added ImGuiDataType_Bool for convenience.
ac7d6fb5ca0 Internals: Added TreeNodeIsOpen() to facilitate discoverability. (#7553, #1131, #2958, #2079, #722)
9c2f6003e4f Backends: SDL3: fixed typo leading to PlatformHandleRaw not being set leading to SHOWNA path not working for multi-viewports.
df3a74389e8 Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794)
126569ad5b3 Fix definition check (#7793)
c3c90b49e03 Examples: SDL3+OpenGL: Update for API changes: SDL_GL_DeleteContext() renamed to SDL_GL_DestroyContext().
a8e96ae21a4 Backends: GLFW+Emscripten: Fixed build (#7647)
2937339c175 Backends: GLFW+Emscripten: Added support for GLFW3 contrib port. (#7647)
6816789a6b0 Backends: GLFW+Emscripten: (Breaking) Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to ImGui_ImplGlfw_InstallEmscriptenCallbacks(), added GLFWwindow* parameter. (#7647, #7600)
9504068f66c Backends: Win32: fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN (#7768, #4858, #2622)
6b6026b1332 DemosFix typo in help text in demo Tables/Borders (#7780)
1ec1f7a3de2 Fixed Unix version of PlatformOpenInShellFn_DefaultImpl. (#7772, #7660)
2d0baaabe62 TreeNode: rename/rework ImGuiNavTreeNodeData system to be usable by more features. (#2920, #1131, #7553)
0a73c6ec3f6 Misc tweaks, comments.
0ebf49b4c1f IO: amend PlatformOpenInShellFn specs to return a bool. (#7660)
380b3559c6d Backends: GLFW,SDL2: Added ioPlatformOpenInShellFn handler for web/Emscripten versions. (#7660)
05a4f280596 Internals: added FontScale storage (amend 0f63d3e).
5496050f5f2 Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660)
0f63d3e9164 Internals: added FontScale storage.
dadf9cd039b IO: disable default io.PlatformOpenInShellFn() implementation on iPhone, as compiler errors that system() is not available on iOS.
43925b9fa4c Build fix for non Windows platforms.
ddd4c9d6b95 Commented out obsolete ImGuiModFlags and ImGuiModFlags_XXX values (renamed to ImGuiKeyChord and ImGuiMod_XXX in 1.89). (#4921, #456)
fb799bba7fd (Breaking) IO, IME: renamed platform IME hook io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() and added explicit context.
8f367980357 IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell, added IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS. (#7660)
0250dc903ef Demo: changed style editor inline block to its own window.
ae708e3bcd7 Backends: SDL3: add default case to fix warnings. (#7763)
7e0b3b9caf8 Debug Log: Added "Configure Outputs.." button. (#5855)
a62794359aa Debug Tools: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API. (#5855)
a489585f843 Backends: SDL3: Updated comments (IME seems fixed in SDL3). Added SDL3 examples to Visual Studio solution.
12f92518bc5 Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762)
84cc72f3720 Version 1.91.0 WIP
cb16be3a3fc Version 1.90.9
c554c402d30 IO: do not claim io.WantCaptureMouse=true on the mouse release frame of a button which was pressed over void.  (#1392)
50a0f18e6ae imgui_freetype: fixed divide by zero while handling FT_PIXEL_MODE_BGRA glyphs. (#7267, #3369)
dd5c30d2d75 Disabled: Reworked 1.90.8 behavior of Begin() not inheriting current BeginDisabled() state. Only tooltip are clearing that state. (#211, #7640)
67216910fb0 Examples: SDL3: Remove use of SDL_HINT_IME_NATIVE_UI.
ccf3ee674a0 Backends: SDL3: update for SDL_SetTextInputRect() -> SDL_SetTextInputArea() api change. (#7760, #7754)
751bbf38ba5 Backends: SDLRenderer3: Update for SDL_RenderGeometryRaw() API changes.
f2c07ed7175 Backends: Allegro5: Correctly handle unstable bit in version checks (#7755)
c47928ffc0f Checkbox: minor tidying up to simplify work on multi-select branch.
372eebbeb29 Fix typo, rename ImGuisliderFlags_WrapAround flag to ImGuiSliderFlags_WrapAround. (#7752, #7749)
0403096a9d3 Drags: added ImGuisliderFlags_WrapAround flag for DragInt(), DragFloat() etc. (#7749)
c7df9c71214 Backends: Win32: Fixed warning with old MinGW/GCC versions.
404af570049 Backends: OpenGL2, OpenGL3: ImGui_ImplOpenGL3_NewFrame() recreates font texture if it has been destroyed by ImGui_ImplOpenGL3_DestroyFontsTexture(). (#7748)
0582f7678a4 Nav: store NavJustMovedToIsTabbing + shuffle a few nav related fields.
77d582fa37b Windows: BeginChild(): fixed a glitch when during a resize of a child window which is tightly close to the boundaries of its parent. (#7706)
953d40c929f Tables: moved TableGetHoveredColumn() to public API. (#7715, #3740)
fbb903e1580 Inputs: fixed using Shortcut() or SetNextItemShortcut() within a disabled block bypassing the disabled state. (#7726)
dbffb702f83 ImGuiStorage: tweak impl for BuildSortByKey().
0c2650e8339 Backends: OSX: build fix. Amend 32f9dfc
22b36bef9e6 Examples: undo adding SDL3 example to Visual Studio sln.
7c2476986b5 Backends: SDL3: Update for SDL_StartTextInput()/SDL_StopTextInput() API changes. (#7735)
32f9dfc1261 Viewports: Backported 'void* ImGuiViewport::PlatformHandle' from docking branch for use by backends.
eb1cc4b8b4e Metrics/Debugger: Browsing a Storage perform hover lookup on identifier.
a18fb406ace Backends: Vulkan: Remove Volk/ from volk.h #include directives (#7722, #6582, #4854)
aab27130a61 Demo: Style Editor: clarify how _CalcCircleAutoSegmentCount() doesn't always get exact final segment count. (#7731)
48e7e7bfe85 Backends: SDL3: Follow SDL3 removal of keysym field in SDL_KeyboardEvent (#7729)
755bf2b8c2e (Breaking) Move ImGuiWindowFlags_NavFlattened to ImGuiChildFlags_NavFlattened. (#7687)
2c8cc58fd16 Internals: storing HoveredWindowBeforeClear for use by multi-context compositor drag and drop propagation.
7f20a4b0415 Nav: CTRL+Tab overlay display context name if any.
e3971079cf5 IO: added ImGuiConfigFlags_NoKeyboard for consistency and convenience. (#4921)
8067d05f744 IO: added ClearInputMouse(). made ClearInputKeys() not clear mouse data. (#4921)
21581cf70ce Fixed build warning.
7e7c97ac5f9 Ignore .ini file with other suffixes.
77d9f80754e Drag and Drop: Added ImGuiDragDropFlags_PayloadNoCrossContext and ImGuiDragDropFlags_PayloadNoCrossProcess flags.
8c318dc7702 Drag and Drop: (Breaking) renamed ImGuiDragDropFlags_SourceAutoExpirePayload to ImGuiDragDropFlags_PayloadAutoExpire. (#1725, #143)
50709454b3f Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern assume a mouse button being pressed. (#143)
413c056359b Drag and Drop: comments, debug log entries.
37c243bb35a Internals: added ImGuiContext::ContextName optionally used by debug log and to facilitate debugging.
8c517fee357 Drag and Drop: Fixes an issue when elapsing payload would be based on last payload frame instead of last drag source frame.
32a037c030f Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceExtern. (#143)
21bda2ed994 TabBar, Style: added ImGuiTabBarFlags_DrawSelectedOverline and ImGuiCol_TabSelectedOverline, ImGuiCol_TabDimmedSelectedOverline.
1b9593e8894 Style: (Breaking) renamed ImGuiCol_TabActive -> ImGuiCol_TabSelected, ImGuiCol_TabUnfocused -> ImGuiCol_TabDimmed, ImGuiCol_TabUnfocusedActive -> ImGuiCol_TabDimmedSelected.
b902fa4c449 IO: do not disable io.ConfigWindowsResizeFromEdges when ImGuiBackendFlags_HasMouseCursors is not set by backend.
8caf7afbad6 Internals: made ImLowerBound() accessible in internals + take a span. + rearrange child/popup/tooltips section.
22d65c7949d Removed old nested structure: renaming ImGuiStorage::ImGuiStoragePair type to ImGuiStoragePair (simpler for many languages).
7538ca6f405 Examples: SDL+Vulkan: handle swap chain resize even without Vulkan returning VK_SUBOPTIMAL_KHR (#7671)
a47bfb1b5b1 Examples: GLFW+Vulkan: handle swap chain resize even without Vulkan returning VK_SUBOPTIMAL_KHR (#7671)
d46a0aa0693 Internals: renamed HoveredIdDisabled to HoveredIdIsDisabled for consistency.
7260bb51cfc Version 1.90.9 WIP

git-subtree-dir: external/imgui/imgui
git-subtree-split: 070c046cd1fcbe694e3f19e2f5eaff9df0cb6357
2024-07-18 10:52:26 +02:00
..
imgui_freetype.cpp Squashed 'external/imgui/imgui/' changes from 6f7b5d0ee2f..070c046cd1f 2024-07-18 10:52:26 +02:00
imgui_freetype.h Squashed 'external/imgui/imgui/' changes from d4ddc46e77..d6cb3c923d 2024-01-17 20:29:18 +01:00
README.md Squashed 'external/imgui/imgui/' changes from d4ddc46e77..d6cb3c923d 2024-01-17 20:29:18 +01:00

imgui_freetype

Build font atlases using FreeType instead of stb_truetype (which is the default font rasterizer).
by @vuhdo, @mikesart, @ocornut.

Usage

  1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with vcpkg install freetype --triplet=x64-windows, vcpkg integrate install).
  2. Add imgui_freetype.h/cpp alongside your project files.
  3. Add #define IMGUI_ENABLE_FREETYPE in your imconfig.h file

About Gamma Correct Blending

FreeType assumes blending in linear space rather than gamma space. See FreeType note for FT_Render_Glyph. For correct results you need to be using sRGB and convert to linear space in the pixel shader output. The default Dear ImGui styles will be impacted by this change (alpha values will need tweaking).

Testbed for toying with settings (for developers)

See https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad

Known issues

  • Oversampling settings are ignored but also not so much necessary with the higher quality rendering.

Comparison

Small, thin anti-aliased fonts typically benefit a lot from FreeType's hinting: comparing_font_rasterizers

Colorful glyphs/emojis

You can use the ImGuiFreeTypeBuilderFlags_LoadColor flag to load certain colorful glyphs. See the "Using Colorful Glyphs/Emojis" section of FONTS.md.

colored glyphs

Using OpenType SVG fonts (SVGinOT)

  • SVG in Open Type is a standard by Adobe and Mozilla for color OpenType and Open Font Format fonts. It allows font creators to embed complete SVG files within a font enabling full color and even animations.
  • Popular fonts such as twemoji and fonts made with scfbuild is SVGinOT
  • Requires: lunasvg v2.3.2 and above
    1. Add #define IMGUI_ENABLE_FREETYPE_LUNASVG in your imconfig.h.
    2. Get latest lunasvg binaries or build yourself. Under Windows you may use vcpkg with: vcpkg install lunasvg --triplet=x64-windows.