Font Metadata's GroupBox height was off by an _unsightly_ 2 pixels.
Now we make heights explicit for all child widgets and let shrink_to_fit
automatically calculate things.
This makes editing much easier, e.g. you don't need longer to copy
hundreds of glyphs one by one.
It has some flaws, e.g. it's not integrated with undo stack,
but we need to start with something!
This commit makes FontEditor displaying emojis in GlyphMapWidget. They
are not editable, what is marked by red background of a glyph.
Additionally, a proper information is displayed in statusbar.
Fixes#10900.
The rotate clockwise/rotate counterclockwise actions can be added to
CommonActions since they are repeated in FontEditor, ImageViewer and
PixelPaint. This keeps the shortcuts and icons consistent across
applications.
This is partially a revert of commits:
10a8b6d411561b67a1ad
Rather than adding the prot_exec pledge requried to use dlopen(), we can
link directly against LibUnicodeData in applications that we know need
that library.
This might make the dlopen() dance a bit unnecessary. The same purpose
might now be fulfilled with weak symbols. That can be revisted next, but
for now, this at least removes the potential security risk of apps like
the Browser having prot_exec privileges.
Loading libunicodedata.so will require dlopen(), which in turn requires
mmap(). The 'prot_exec' pledge is needed for this.
Further, the .so itself must be unveiled for reading. The "real" path is
unveiled (libunicodedata.so.serenity) as the symlink (libunicodedata.so)
itself cannot be unveiled.
When calling set_selected_index() on ComboBox, allow its on_change
callback to be disabled. Fixes FontEditor window state erroneously
switching to modified when initializing between different slopes
and weights.
Fixes incorrect scale initialization and inconsistent margins, sets
minimum values for glyph width and height to 1, and labels page 1
more precisely as "Typeface" properties.
Fixes minor organizational inconsistency and zeroes initializations
for rows and columns as the previous values haven't been meaningful
since the map was converted to a scrollable widget. No functional
changes.
This will let us more easily organize and assign shortcuts to new
modes and transformations as they are built, and it generally looks
more polished as a uniform interface. Also adds a counterclockwise
option to the rotate action, moves Copy as Character to the edit
menu as it doesn't directly impact GlyphEditor, and makes the paint
and move modes exclusive checkables to make the editor's state more
visually obvious.
Previusly a cloned or newly loaded font was moved twice from main to
the constructor and then from constructor to an init routine where it
was finally used. The unmasked font is now moved only once, directly
to initialization, and redundant error checking is discarded.
GlyphBitmaps are considered present if they have a width greater
than zero. This adds a counterpart method for raw (unmasked) glyphs
and makes intent more explicit throughout FontEditor.
For an empty glyph (all pixels initially clear), this makes no
difference. However, if the glyph for the selected code point already
contains some set pixels, pasting used to "add" the set pixels, instead
of overwriting.