Browse Source

Doc: mention IMGUI_USE_WCHAR32 in fonts documentation (#3562)

M. Frink ~ Lemur 4 years ago
parent
commit
a129621292
2 changed files with 2 additions and 1 deletions
  1. 1 0
      docs/FONTS.md
  2. 1 1
      imconfig.h

+ 1 - 0
docs/FONTS.md

@@ -157,6 +157,7 @@ Some solutions:
 3. Set `io.Fonts.TexDesiredWidth` to specify a texture width to minimize texture height (see comment in `ImFontAtlas::Build()` function).
 3. Set `io.Fonts.TexDesiredWidth` to specify a texture width to minimize texture height (see comment in `ImFontAtlas::Build()` function).
 4. Set `io.Fonts.Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight;` to disable rounding the texture height to the next power of two.
 4. Set `io.Fonts.Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight;` to disable rounding the texture height to the next power of two.
 5. Read about oversampling [here](https://github.com/nothings/stb/blob/master/tests/oversample).
 5. Read about oversampling [here](https://github.com/nothings/stb/blob/master/tests/oversample).
+6. To support the extended range of unicode beyond 0xFFFF (e.g. emoticons, dingbats, symbols, shapes, ancient languages, etc...) add `#define IMGUI_USE_WCHAR32`in your `imconfig.h`
 
 
 ##### [Return to Index](#index)
 ##### [Return to Index](#index)
 
 

+ 1 - 1
imconfig.h

@@ -49,7 +49,7 @@
 //---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
 //---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
 //#define IMGUI_USE_BGRA_PACKED_COLOR
 //#define IMGUI_USE_BGRA_PACKED_COLOR
 
 
-//---- Use 32-bit for ImWchar (default is 16-bit) to support full unicode code points.
+//---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
 //#define IMGUI_USE_WCHAR32
 //#define IMGUI_USE_WCHAR32
 
 
 //---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
 //---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version