summaryrefslogtreecommitdiff
path: root/Userland/Applications/FontEditor
AgeCommit message (Collapse)Author
2021-10-02FontEditor: Close preview window when the main window is closedGal Horowitz
2021-09-24FontEditor: Allow editing new font headerthankyouverycool
And make use of mapping functions moved from LibGUI/FontPickerWeightModel.h => LibGfx/FontStyleMapping.h
2021-09-22FontEditor: Keep selected glyph in view on resizethankyouverycool
2021-09-22FontEditor: Make update_{statusbar,preview} member functionsthankyouverycool
For use outside constructor. Renames demo to preview to make the UI and code comport.
2021-09-22FontEditor: Remove reprobe_font()thankyouverycool
This was used to update GlyphMapWidget on Type changes and is no longer needed since removal of Type enumeration in bb592ae.
2021-09-22FontEditor: Sanitize RTL and control glyphs in Clipboard metadatathankyouverycool
Fixes display issues in ClipboardHistory.
2021-09-22FontEditor: Put glyph width changes on the undo stackthankyouverycool
And select the restored glyph on undo/redo.
2021-09-22FontEditor: Set width to zero when deleting a glyphthankyouverycool
Previously, Delete left a glyph's width maximized.
2021-09-22FontEditor: Simplify initialization by disabling widget callbacksthankyouverycool
Reduces some complexity dealing with callback effects and fixes redundant calls to update_title and erroneously set glyph widths.
2021-09-19FontEditor: Add new tools to navigate code pointsthankyouverycool
Visible glyphs can now be cycled through, or a code point specified and jumped to directly.
2021-09-19FontEditor: Update editor to handle new font formatthankyouverycool
The editor now unmasks fonts on load, mapping their glyphs to the complete unicode character set, and masks them upon saving to reduce disk space. This is a naive approach in terms of memory usage and can be improved but whose immediate goal is to allow editing any glyph without concern for range allocation.
2021-09-13Everywhere: Use my fancy new serenityos.org email :^)Mustafa Quraish
2021-09-06FontEditor: Don't loop over all glyphs to find selected oneMustafa Quraish
Previously we would loop over all glyphs in the GlyphMap, compute their rects, and then test to see if the mouse click position was inside that rect. This is silly since each element in the glyph map for a particular font is the same size, and we can just do some coordinate manipulation to get the index directly.
2021-09-06Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safeAli Mohammad Pur
2021-09-02Userland: Migrate to argument-less deferred_invokesin-ack
Only one place used this argument and it was to hold on to a strong ref for the object. Since we already do that now, there's no need to keep this argument around since this can be easily captured. This commit contains no changes.
2021-08-27FontEditor: Adjust margins and spacingthankyouverycool
Brings vertical spacing in line with most other apps using ToolbarContainers. Fixes GroupBox margins since CSS ordering change.
2021-08-27FontEditor: Let WindowServer manage modified markingsthankyouverycool
Simplifies building modified/new font titles and lets FontEditor make use of the comfy ellipsis close button.
2021-08-27FontEditor: Save discrete undo and redo states for each Commandthankyouverycool
Makes undo/redo actions compatible with the updated UndoStack sans finalization. Fixes having to click actions twice.
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-08-18Userland+LibGUI: Make Margins arguments match CSS orderingsin-ack
Previously the argument order for Margins was (left, top, right, bottom). To make it more familiar and closer to how CSS does it, the argument order is now (top, right, bottom, left).
2021-08-01Applications: Remove unused header includesBrian Gianforcaro
2021-07-27FontEditor: Fix minor margin inconsistencyFrHun
2021-07-21Userland: Add GUI::Window::add_menu() and use it everywhereAndreas Kling
Applications previously had to create a GUI::Menubar object, add menus to it, and then call GUI::Window::set_menubar(). This patch introduces GUI::Window::add_menu() which creates the menubar automatically and adds items to it. Application code becomes slightly simpler as a result. :^)
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-10FontEditor: Tweak offensive padding :^)Andreas Kling
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-06-06AK+Everywhere: Disallow constructing Functions from incompatible typesAli Mohammad Pur
Previously, AK::Function would accept _any_ callable type, and try to call it when called, first with the given set of arguments, then with zero arguments, and if all of those failed, it would simply not call the function and **return a value-constructed Out type**. This lead to many, many, many hard to debug situations when someone forgot a `const` in their lambda argument types, and many cases of people taking zero arguments in their lambdas to ignore them. This commit reworks the Function interface to not include any such surprising behaviour, if your function instance is not callable with the declared argument set of the Function, it can simply not be assigned to that Function instance, end of story.
2021-05-21Revert "Userland: static vs non-static constexpr variables"Linus Groh
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a. Booting the system no longer worked after these changes.
2021-05-21Userland: static vs non-static constexpr variablesLenny Maiorani
Problem: - `static` variables consume memory and sometimes are less optimizable. - `static const` variables can be `constexpr`, usually. - `static` function-local variables require an initialization check every time the function is run. Solution: - If a global `static` variable is only used in a single function then move it into the function and make it non-`static` and `constexpr`. - Make all global `static` variables `constexpr` instead of `const`. - Change function-local `static const[expr]` variables to be just `constexpr`.
2021-05-20FontEditor: Make statusbar text generation more robustMax Wipfli
This makes a few modifications to the statusbar text generation: * Use the canonical U+XXXX representation of unicode characters. * For control characters, display their alias instead of whitespace. * Substitute RTL codepoints with U+FFFD so the text paints correctly. * Only show the glyph's dimensions if it actually exists in the font. This fixes #7286.
2021-05-20FontEditor: Add tooltip to "Move Glyph" buttonMax Wipfli
This adds a simple tooltip to the "Move Glyph" button to indicate its functionality.
2021-05-15FontEditor: Add missing `unix` pledgeDaniel Bertalan
Without this change, FontEditor would crash due to LibDesktop opening an IPC connection. Fixes #7137.
2021-05-13Userland: Tighten a *lot* of pledges! :^)Andreas Kling
Since applications using Core::EventLoop no longer need to create a socket in /tmp/rpc/, and also don't need to listen for incoming connections on this socket, we can remove a whole bunch of pledges!
2021-05-08LibGUI: Remove UndoStack's automatic command combo'ingAndreas Kling
UndoStack will now merge adjacent commands *if they want to be merged* instead of bundling everything you push onto it until you tell it to "finalize the combo." This uses less memory and gives applications full control over how their undo stacks end up. :^)
2021-05-03LibGUI: Rename ScrollableWidget => AbstractScrollableWidgetAndreas Kling
2021-05-01Everywhere: Rename app_menu to file_menu or game_menuAndreas Kling
2021-04-29Everywhere: Use "the SerenityOS developers." in copyright headersLinus Groh
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
2021-04-26FontEditor: Don't put invalid clicks on the undo stackthankyouverycool
2021-04-26FontEditor: Warn on unsaved changesthankyouverycool
Standardizes saving conventions: Editor now warns on close, new, and open if there are unsaved changes, and new files prompt to Save As.
2021-04-23AK: Rename adopt() to adopt_ref()Andreas Kling
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
2021-04-23FontEditor: Set proper defaults in NewFontDialogthankyouverycool
GlyphBitmap width is currently limited to twiddling 32 bits so abide by a 32x36 standard for now. Fixes incorrect line values and ranges and removes unused RefPtr.
2021-04-23LibGfx+FontEditor: Account for raw width when painting glyphsthankyouverycool
Fixes hidden glyphs being painted in editor and map, and '?' subsitute glyphs being overdrawn in the system.
2021-04-23FontEditor: Don't append literal Line Feeds to clipboard metadatathankyouverycool
Fixes newline breakage in ClipboardHistory when copying LF glyphs
2021-04-23FontEditor: Set correct mean- and baseline ranges for new fontsthankyouverycool
Fixes out-of-bounds lines in glyph editor
2021-04-23FontEditor: Add move glyph toolthankyouverycool
When toggled on, glyphs can now be repositioned within the glyph editor by dragging the mouse
2021-04-23FontEditor: Add undo and redo commandsthankyouverycool
2021-04-23FontEditor: Add adjustable scaling to GlyphEditorWidgetthankyouverycool
The editor can now be adjusted under the View->Scale menu
2021-04-23FontEditor: Add status tips and missing Alt shortcuts to actionsthankyouverycool
2021-04-23FontEditor: Add text refresh button to Preview ToolWindowthankyouverycool
Cycles through classic pangrams and some symbols
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *