mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +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
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…
Add table
Add a link
Reference in a new issue