mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
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.
This commit is contained in:
parent
701b7810ba
commit
d51d5f9591
Notes:
sideshowbarker
2024-07-17 20:40:32 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/d51d5f95913 Pull-request: https://github.com/SerenityOS/serenity/pull/11993
1 changed files with 2 additions and 3 deletions
|
@ -8,7 +8,6 @@
|
|||
#include "GlyphEditorWidget.h"
|
||||
#include "NewFontDialog.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/UnicodeUtils.h>
|
||||
#include <Applications/FontEditor/FontEditorWindowGML.h>
|
||||
#include <LibConfig/Client.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
|
@ -679,8 +678,8 @@ void FontEditorWidget::update_statusbar()
|
|||
StringBuilder builder;
|
||||
builder.appendff("U+{:04X} (", glyph);
|
||||
|
||||
if (AK::UnicodeUtils::is_unicode_control_code_point(glyph)) {
|
||||
builder.append(AK::UnicodeUtils::get_unicode_control_code_point_alias(glyph).value());
|
||||
if (auto abbreviation = Unicode::code_point_abbreviation(glyph); abbreviation.has_value()) {
|
||||
builder.append(*abbreviation);
|
||||
} else if (Gfx::get_char_bidi_class(glyph) == Gfx::BidirectionalClass::STRONG_RTL) {
|
||||
// FIXME: This is a necessary hack, as RTL text will mess up the painting of the statusbar text.
|
||||
// For now, replace RTL glyphs with U+FFFD, the replacement character.
|
||||
|
|
Loading…
Reference in a new issue