thankyouverycool
17b16f3997
FontEditor: Use memset/memcpy to copy/paste/delete glyphs
...
Iterating over each glyph to set bits was rather slow in large
selections. This lets us edit the entire character set almost
instantly.
2022-03-18 01:12:26 +01:00
electrikmilk
056ca62778
FontEditor: Add code previews for fixed-width fonts
...
Add pseudo code to font preview for fixed-width programming fonts.
2022-03-05 21:24:25 +01:00
Karol Kosek
cef595aa5c
CharacterMap+FontEditor: Switch current Unicode block on arrow press
2022-03-04 11:53:04 -05:00
Lenny Maiorani
064cfd6cb7
Applications: Fix undefined behavior capturing non-static constexpr
2022-03-02 22:01:58 -08:00
Lenny Maiorani
1dd70a6f49
Applications: Change static constexpr variables to constexpr
...
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
2022-02-28 13:54:27 +01:00
thankyouverycool
cd4c11ebaf
FontEditor: Remove listener client
...
FontEditor was relying on a hack to get notified about i32 config
changes, and scale is not a setting we want updated across all
editor instances, nor do we have any settings that make sense to
monitor universally, so let's remove listener privileges for now.
2022-02-18 07:38:29 -05:00
thankyouverycool
0d29419ed4
FontEditor: Save settings for showing metadata and unicode blocks
2022-02-18 07:38:29 -05:00
thankyouverycool
0061af170f
FontEditor: Add a search box to filter Unicode blocks
2022-02-18 07:38:29 -05:00
thankyouverycool
aefb2bcf43
FontEditor: Add a ListView to sort glyphs by their Unicode block
2022-02-15 10:13:19 -05:00
Lenny Maiorani
160bda7228
Applications: Use default constructors/destructors
...
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-02-14 22:06:55 +00:00
Timothy Flynn
d51d5f9591
FontEditor: Retrieve code point abbreviations from LibUnicode
...
Rather than using a hard-coded list from AK::UnicodeUtils, LibUnicode
contains the up-to-date official names and contains abbreviations for
more control code points.
2022-01-18 15:13:25 +00:00
thankyouverycool
c094bb60bc
FontEditor: Set GlyphEditor glyph on initialization
...
Fixes GlyphEditor appearing blank on start and subsequent
re-initializations.
2022-01-16 21:36:39 +01:00
thankyouverycool
8f60ea4470
FontEditor: Disambiguate save function from save-as action
2022-01-16 21:36:39 +01:00
thankyouverycool
c2b7bbbb2c
FontEditor: Update GlyphEditor and width widgets on paste and delete
...
Fixes unsynced state between widgets after paste and delete actions.
2022-01-16 21:36:39 +01:00
thankyouverycool
24bd2a427c
FontEditor: Calculate GlyphEditor toolbar widths more precisely
...
Fixes pixel imperfect toolbar widths when editing small fonts.
2022-01-16 21:36:39 +01:00
Sam Atkins
e975db23c0
LibGUI+FontEditor: Move seek-prev/next-glyph logic into GlyphMapWidget
2022-01-16 11:17:03 +01:00
Sam Atkins
21a24c36a8
LibGUI: Make GlyphMapWidget work with vector fonts
...
This basically just meant replacing the `m_font` field with the one
inherited from Widget.
2022-01-16 11:17:03 +01:00
Sam Atkins
8175cd0a28
LibGUI+FontEditor: Move GlyphMapWidget to LibGUI
...
This will allow us to use this in other apps, such as the upcoming
Character Map. :^)
2022-01-16 11:17:03 +01:00
Lady Gegga
10a52c0b32
FontEditor: Add Klingon phrase to Preview Font
2022-01-12 22:54:59 +01:00
Maciej
1d98499234
FontEditor: Support selection ranges
...
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!
2022-01-09 00:18:46 +01:00
Maciej
22b3c25f10
FontEditor: Save scale to config file
2022-01-09 00:18:46 +01:00
Maciej
4d4764e0fb
FontEditor: Display something for emoji glyphs
...
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 .
2022-01-09 00:18:46 +01:00
Marcus Nilsson
cecbed467b
LibGUI: Move rotate cw/ccw to CommonActions
...
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.
2022-01-06 21:25:02 +01:00
Andreas Kling
219339d2a5
FontEditor: Use GUI::MessageBox::ask_about_unsaved_changes()
2022-01-04 21:49:44 +01:00
thankyouverycool
298a6b9937
LibGUI+FontEditor: Allow ComboBox on_change callback to be toggled
...
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.
2021-11-30 10:51:51 +01:00
thankyouverycool
ca062d83db
FontEditor: Convert to east const
2021-11-30 10:51:51 +01:00
thankyouverycool
aa09e40eb2
FontEditor: Update status bar on initialization
...
Fixes incorrect glyph status immediately after loading a new font.
2021-11-30 10:51:51 +01:00
thankyouverycool
ae922c67fd
FontEditor: Remove code duplication when resizing GlyphEditor
...
The left column now also enforces a minimum width to prevent especially
small fonts from hiding the glyph toolbars and width widgets.
2021-11-30 10:51:51 +01:00
thankyouverycool
c1744822a1
FontEditor: Account for glyph width when pasting
...
Fixes glyphs not expanding up to their maximum width if necessary
when pasting larger glyphs into smaller ones.
2021-11-30 10:51:51 +01:00
thankyouverycool
281805696b
FontEditor: Don't allow cutting and copying absent glyphs
...
And update status bar on cut. Fixes placing these effectless actions
on the undo stack.
2021-11-30 10:51:51 +01:00
thankyouverycool
d2b211f14a
FontEditor: Don't null check newly created NonnullRefPtr fonts
2021-11-30 10:51:51 +01:00
thankyouverycool
74938e6f42
FontEditor: Factor out redundant code for a request to close
2021-11-30 10:51:51 +01:00
thankyouverycool
1e052f5a91
FontEditor: Convert mode and transform buttons into toolbar actions
...
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.
2021-11-30 10:51:51 +01:00
thankyouverycool
922e80e72b
FontEditor: Simplify start-up
...
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.
2021-11-30 10:51:51 +01:00
thankyouverycool
56a8a2b493
FontEditor: Use LibUnicode to convert character case
...
Fixes characters beyond the Basic Latin code block not showing
their upper-case form in the preview window.
2021-11-30 10:51:51 +01:00
thankyouverycool
edf86af4f4
LibGfx+FontEditor: Add helper to determine raw glyph presence
...
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.
2021-11-30 10:51:51 +01:00
Ben Wiederhake
f22c0ffe0c
LibGUI+Everywhere: Make sync requests to Clipboard server more obvious
2021-11-21 11:49:06 +00:00
Ben Wiederhake
8d80d1346d
FontEditor: Add ability to copy the selected code point
...
This makes it easier to preview the current glyph, if it is not easily
typable.
2021-11-20 12:56:35 +01:00
Ben Wiederhake
7180813cd4
FontEditor: Support flipping and rotating
...
This is especially useful for highly symmetric scripts like this:
https://www.unicode.org/charts/PDF/U1400.pdf
2021-11-20 12:56:35 +01:00
Ben Wiederhake
197b5f7c4a
FontEditor: More reasonable labels, move property to GML
2021-11-20 12:56:35 +01:00
Ben Wiederhake
b224efe73b
FontEditor: Show code point name in status bar
2021-11-20 00:31:55 +01:00
Andreas Kling
235f39e449
LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
...
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08 00:35:27 +01:00
Karol Kosek
0a54a86a8b
FontEditor: Accept file drops
2021-10-17 13:53:08 +01:00
Karol Kosek
a0cb8cfefd
FontEditor: Add FontEditorWidget::open_file() function
...
This part is also quite needed when opening files from drag-and-drop
events.
2021-10-17 13:53:08 +01:00
Karol Kosek
72378fd36c
FontEditor: Reuse the request_close() function in Open action
2021-10-17 13:53:08 +01:00
Gal Horowitz
cfc5df27f0
FontEditor: Close preview window when the main window is closed
2021-10-02 20:55:14 +02:00
thankyouverycool
fde48f1a7a
FontEditor: Allow editing new font header
...
And make use of mapping functions moved from
LibGUI/FontPickerWeightModel.h => LibGfx/FontStyleMapping.h
2021-09-24 14:59:39 +02:00
thankyouverycool
efe44451ca
FontEditor: Make update_{statusbar,preview} member functions
...
For use outside constructor. Renames demo to preview to make
the UI and code comport.
2021-09-22 21:35:42 +02:00
thankyouverycool
0a4640e892
FontEditor: Put glyph width changes on the undo stack
...
And select the restored glyph on undo/redo.
2021-09-22 21:35:42 +02:00
thankyouverycool
1ae4caca4b
FontEditor: Set width to zero when deleting a glyph
...
Previously, Delete left a glyph's width maximized.
2021-09-22 21:35:42 +02:00