1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-12-23 04:54:58 +01:00
Commit Graph

84 Commits

Author SHA1 Message Date
ocornut
566558b17c Replacing NULL with nullptr in examples/backends when they creeped back. (, , ) 2024-12-05 12:25:02 +01:00
ocornut
ee2119d7cb imgui_freetype: Fix build broken by 19a1f2a () 2024-11-29 19:10:39 +01:00
ocornut
19a1f2a5d2 Fonts: fixed AddCustomRect() not being packed with TexGlyphPadding + not accounted in surface area. () 2024-11-29 18:58:01 +01:00
ocornut
20360e00ce Merge miscellaneous small changes to reduce drift with texture update branch.
- ImGuiDebugLogFlags_EventFont is yet unused.
2024-11-20 21:46:47 +01:00
ocornut
3b683927ee imgui_freetype: Fixed a crash in build font atlas when using merged fonts and the first font in a merged set has no loaded glyph. () 2024-11-07 14:39:54 +01:00
Pascal Thomet
04d9a04557 imgui_freetype: Added support for plutosvg to render OpenType SVG fonts. (, + , )
See  for details.
2024-10-17 11:01:59 +02:00
ocornut
8cc6eee295 Fonts: amend assert when glyph range data seems incorrect. () 2024-08-03 15:25:47 +02:00
ocornut
50a0f18e6a imgui_freetype: fixed divide by zero while handling FT_PIXEL_MODE_BGRA glyphs. (, ) 2024-07-01 14:58:35 +02:00
Hubert Maier
07dbcf1f70 Fixed typos. () 2024-05-16 16:13:01 +02:00
Pascal Thomet
4758f74676
imgui_freetype: fix nullptr to ImTextureID cast () 2024-01-03 22:54:36 +01:00
ocornut
aaf157cfdd Commented out ImGuiFreeType::BuildFontAtlas() obsoleted in 1.81. Commented out legacy ImGuiColumnsFlags_XXX symbols redirecting to ImGuiOldColumnsFlags_XXX, obsoleted in 1.80.
Amend 9499afdf and 72de6f336
2023-12-05 17:04:19 +01:00
ocornut
46843b683b Fonts: minor/shallow amends () 2023-11-13 19:00:29 +01:00
thedmd
ade4d0e08a Fonts: added support for RasterizerDensity to FreeType based atlas generator. () 2023-11-13 19:00:28 +01:00
DKing
701a047ac0
Fonts: Fix clang compiling warning & error with freetype + lunasvg (, , )
Amend d6360c1
2023-09-28 19:33:27 +02:00
ocornut
d6360c1ba9 Fonts, imgui_freetype: Fixed a warning and leak in IMGUI_ENABLE_FREETYPE_LUNASVG support. (, ) 2023-09-20 11:31:28 +02:00
ocornut
ab490dc7b8 Fonts: Amends for support for OpenType SVG fonts using lunasvg (, ) 2023-08-01 10:18:30 +02:00
sakiodre
2ad8c60abc Fonts: Added support for OpenType SVG fonts using lunasvg (, ) 2023-08-01 09:32:17 +02:00
ocornut
33e13c85e1 Backends: Made all backends sources files support global IMGUI_DISABLE. () 2023-07-13 11:27:52 +02:00
sakiodre
dcdb145713
Docs: Fix outdated link in freetype docs () 2023-07-04 12:23:13 +02:00
Michael Martz
506f7e0074 Using nullptr in locations where warning disable is not convenient. (, ) 2023-04-11 11:33:50 +02:00
ocornut
4f630b0449 imgui_freetype: fixed non-ASCII characters in sources. () 2023-02-15 16:43:08 +01:00
ocornut
092b6825ac Fonts: Assert that in each GlyphRanges[] pairs first is <= second. 2023-02-14 15:00:12 +01:00
ocornut
8f907bc9a2 imgui_freetype: fix warnings (), fix typos. () 2023-01-24 15:59:14 +01:00
ocornut
9150c23c04 imgui_freetype: fixed a packing issue which in some occurrences would prevent large amount of glyphs from being packed correctly. (, )
This seemingly innocuous change sursingly had very large side-effects of completly breaking packing for the test font mentioned in above issue. Not even sure why tbh. New code matches what stb_truetype's stbtt_PackBegin() does.
2023-01-04 15:22:56 +01:00
cfillion
5884219867 imgui_freetype: Assert if bitmap size exceed chunk size to avoid buffer overflow. () 2022-09-30 16:12:51 +02:00
BttrDrgn
4db55f88e8
Changed FONT.md edit to blob ()
Stop from opening the editor for freetype/README.md
2022-05-06 09:47:18 +02:00
ocornut
fd06ed833b Misc: tweaks + fix warnings on backends withtout -wno-memaccess (, ) 2022-03-13 17:57:32 +07:00
Clownacy
422902dbda Correct typos (, ), use IM_STATIC_ASSERT now that old pre-C++11 macro has been obsoleted. 2022-01-31 11:58:33 +01:00
ocornut
ebac375791 Docs: added info about Freetype, editing sponsors. 2021-11-08 16:22:00 +01:00
ocornut
68f428b449 imgui_freetype: Fixed crash when FT_Render_Glyph() returns NULL (which apparently happens with Freetype 2.11). (, ?) 2021-08-23 16:42:58 +02:00
ocornut
e534c56485 Fonts: Functions with a 'float size_pixels' parameter can accept zero if it is set in ImFontSize::SizePixels. 2021-06-24 17:15:14 +02:00
ocornut
20d415e939 FIx static analysers warnings and disable false positives. 2021-06-24 17:15:14 +02:00
ocornut
d0c6dd9baf ImVector: added clear_delete(), clear_destruct() helpers. 2021-06-09 16:57:47 +02:00
ocornut
020d1ced1d Examples: SDL2: Accomodate for vcpkg install having headers in SDL2/SDL.h vs SDL.h + vcpkg related comments. 2021-06-08 17:10:24 +02:00
ocornut
c708299ca9 Docs: Improvements to description of using colored glyphes/emojis. (, ) + Add Fonts to Metrics. Removed IMGUI_HAS_TABLE markers. 2021-05-24 13:07:26 +02:00
ANF-Studios
ebe6ac5fb5 Improvements to minor mistakes in documentation comments () 2021-03-16 12:44:16 +01:00
TAiGA
f5bc5e8630 Freetype: Enable FreeType bitmap glyphs. () 2021-03-05 14:25:27 +01:00
ocornut
23ab4978e4 ImFontAtlas: Added 'bool TexPixelsUseColors' output to help backend decide of underlying texture format. (, ) 2021-03-02 15:04:34 +01:00
ocornut
4df57136e9 Version 1.81 2021-02-10 21:16:58 +01:00
ocornut
24be26e00e imgui_freetype: Add support for colored glyphs. Font: add support for untinted glyphs ()
Amend 9499afd with missing static inline.
2021-02-01 16:32:26 +01:00
Petr Shurgalin
24aa6654df imgui_freetype: add support for colored glyphs with ImGuiFreeTypeBuilderFlags_LoadColor ()
(squashed 4 commits)
2021-02-01 16:32:23 +01:00
ocornut
9499afdf5e imgui_freetype: clarify breaking changes, and add BuildFontAtlas() to be consistent with planned obsolescence. Rename mislabelled internal helper. Demo: clarify labels in nested table demo. () 2021-01-28 20:53:53 +01:00
ocornut
3867c6c5f0 Fonts: (Breaking) Rename ImGuiFreeType:: flags to ImGuiFreeTypeBuilderFlags_XXX. Remove ImGuiFreeType::BuildFontAtlas() flags. Rename ImFontConfig::RasterizerFlags to FontBuilderFlags. Add ImFontBuilderIO (opaque). Amend 53d59f3 with a dozen of small fixes. 2021-01-26 17:25:09 +01:00
Bartosz Taudul
6469b94304
Silence memset warning. ()
Compiling the code as-is results in the following warning:

-->8--
imgui_freetype.cpp:341:72: warning: ‘void* memset(void*, int, size_t)’
        clearing an object of type ‘struct ImFontBuildSrcDataFT’ with no
        trivial copy-assignment; use assignment or value-initialization
        instead [-Wclass-memaccess]
  341 |     memset(src_tmp_array.Data, 0, (size_t)src_tmp_array.size_in_bytes());
      |                                                                        ^
imgui_freetype.cpp:302:8: note: ‘struct ImFontBuildSrcDataFT’ declared here
  302 | struct ImFontBuildSrcDataFT
      |        ^~~~~~~~~~~~~~~~~~~~
--8<--

This is caused by presence of ImVector<> directly in ImFontBuildSrcDataFT data
structure, as well as in the child ImBitVector. Since ImVector<> has a
constructor, the compiler infers that initialization by memset is not valid.
Such initialization is not a bug, however, as the default ImVector<> ctor just
sets the structure data members to 0, which is exactly what the memset does.

Casting the data structure address to void* pointer silences this warning.
2020-10-02 19:12:53 +02:00
ocornut
90b152f265 ImFontAtlas: Fixed multiple rebuild with same inputs erroneously increased ConfigDataCount. CI: Update Ubuntu 18.04 > 20.04 (motivated by )
Fix Freetype warning.
2020-08-07 16:27:55 +02:00
omar
5d87941451 Fixed ImFontConfig::GlyphExtraSpacing and ImFontConfig::PixelSnapH settings being pulled from the merged/target font settings when merging fonts, instead of being pulled from the source font settings. 2020-08-02 12:20:13 +02:00
Rokas Kupstys
0738611559 Misc: Bunch of code formatting changes suggested by a pass running 'astyle' 2020-06-30 16:37:21 +02:00
ocornut
53dfccbe4b imgui_freetype: Fix for rare case where FT_Get_Char_Index() succeed but FT_Load_Glyph() fails. () 2020-06-04 17:53:50 +02:00
omar
832fda8488 Fixed stray end of line blanks, added comments in .editorconfig, tweaked some headers. 2020-04-07 14:46:46 +02:00
omar
cc0d4e346a Misc: Added an explicit compile-time test for non-scoped IM_ASSERT() macros to redirect users to a solution + fixed our stb wrappers.
+ Nav: Use nav layer enum, comments.
2020-04-03 12:41:33 +02:00