... to avoid side effects under Windows where the default would
prevent entering emoji's with the emoji palette if the WNDCLASS
begins with "edit" (conflict with a system WNDCLASS).
This is also documented in the respective tutorial chapter.
Backported from master (6f8ed5a85d).
Exporting executable files means that they would appear in the CMake
config files as "imported targets". This could break the config files
of Linux and other distributions if such executables are not installed
when building FLTK programs.
The only executable files that need to be exported are the `fluid`
executables that may be used to convert .fl files during building.
Note: we can't have FL_EXPORT together with an *implementation* in
a header file.
If compiled with FL_DLL defined, the error message would be:
"Fl_Font_Descriptor::~Fl_Font_Descriptor()' definition is marked
dllimport"
... with some build types using gcc (e.g. cross-compiling for Windows).
- use demo strings in UTF-8 encoding rather than converting them
which also simplifies the code
- replace some hard-coded width and pos. values with constants
- enlarge width of text widgets (left column) of the main window
- replace display of Unicode range U+D800 ... U+DFFF with a text
explaining that this space is used by UTF-16 surrogate pairs to
prevent warning messages about invalid Unicode text.
This commit makes platforms Windows and macOS compute string widths
with the same mechanism as what is in place for platforms Wayland/X11:
- the width of a string containing a single codepoint is computed and
memorized in the table of character widths;
- the width of a string containing several codepoints is computed as
such rather than as the sum of the widths of its composing characters.
This commit also fixes how text input under Windows is processed
when a character needs encoding as a surrogate.
The result is that FLTK text widgets input and draw correctly also
complex emojis encoded with context-dependent codepoints.
Documentation only: users must load a font with fl_font(face, size)
before measuring text with methods like fl_measure(), fl_height(),
fl_width(), fl_text_extents() etc.