diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-08 19:23:00 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-09 23:00:24 +0000 |
commit | f3db548a3d068c051c4d6eba970b89422a6b9522 (patch) | |
tree | df8846e5699175b425ca8d07b7b6350c0a04dcf7 /Userland/Libraries/LibGfx/Font | |
parent | 2eacc7aec1b2b1cc5a491727baa75817ca819bc5 (diff) | |
download | serenity-f3db548a3d068c051c4d6eba970b89422a6b9522.zip |
AK+Everywhere: Rename FlyString to DeprecatedFlyString
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
Diffstat (limited to 'Userland/Libraries/LibGfx/Font')
-rw-r--r-- | Userland/Libraries/LibGfx/Font/FontDatabase.cpp | 8 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/Font/FontDatabase.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/Font/Typeface.h | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Libraries/LibGfx/Font/FontDatabase.cpp b/Userland/Libraries/LibGfx/Font/FontDatabase.cpp index 42c66122fc..d9e5d058c1 100644 --- a/Userland/Libraries/LibGfx/Font/FontDatabase.cpp +++ b/Userland/Libraries/LibGfx/Font/FontDatabase.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include <AK/FlyString.h> +#include <AK/DeprecatedFlyString.h> #include <AK/NonnullRefPtrVector.h> #include <AK/Queue.h> #include <AK/QuickSort.h> @@ -118,7 +118,7 @@ Font& FontDatabase::default_fixed_width_font() struct FontDatabase::Private { HashMap<DeprecatedString, NonnullRefPtr<Gfx::Font>> full_name_to_font_map; - HashMap<FlyString, Vector<NonnullRefPtr<Typeface>>> typefaces; + HashMap<DeprecatedFlyString, Vector<NonnullRefPtr<Typeface>>> typefaces; }; void FontDatabase::load_all_fonts_from_path(DeprecatedString const& root) @@ -214,7 +214,7 @@ RefPtr<Gfx::Font> FontDatabase::get_by_name(StringView name) return it->value; } -RefPtr<Gfx::Font> FontDatabase::get(FlyString const& family, float point_size, unsigned weight, unsigned slope, Font::AllowInexactSizeMatch allow_inexact_size_match) +RefPtr<Gfx::Font> FontDatabase::get(DeprecatedFlyString const& family, float point_size, unsigned weight, unsigned slope, Font::AllowInexactSizeMatch allow_inexact_size_match) { auto it = m_private->typefaces.find(family); if (it == m_private->typefaces.end()) @@ -226,7 +226,7 @@ RefPtr<Gfx::Font> FontDatabase::get(FlyString const& family, float point_size, u return nullptr; } -RefPtr<Gfx::Font> FontDatabase::get(FlyString const& family, FlyString const& variant, float point_size, Font::AllowInexactSizeMatch allow_inexact_size_match) +RefPtr<Gfx::Font> FontDatabase::get(DeprecatedFlyString const& family, DeprecatedFlyString const& variant, float point_size, Font::AllowInexactSizeMatch allow_inexact_size_match) { auto it = m_private->typefaces.find(family); if (it == m_private->typefaces.end()) diff --git a/Userland/Libraries/LibGfx/Font/FontDatabase.h b/Userland/Libraries/LibGfx/Font/FontDatabase.h index f46e47b395..64b9376e53 100644 --- a/Userland/Libraries/LibGfx/Font/FontDatabase.h +++ b/Userland/Libraries/LibGfx/Font/FontDatabase.h @@ -48,8 +48,8 @@ public: static void set_fixed_width_font_query(DeprecatedString); static void set_default_fonts_lookup_path(DeprecatedString); - RefPtr<Gfx::Font> get(FlyString const& family, float point_size, unsigned weight, unsigned slope, Font::AllowInexactSizeMatch = Font::AllowInexactSizeMatch::No); - RefPtr<Gfx::Font> get(FlyString const& family, FlyString const& variant, float point_size, Font::AllowInexactSizeMatch = Font::AllowInexactSizeMatch::No); + RefPtr<Gfx::Font> get(DeprecatedFlyString const& family, float point_size, unsigned weight, unsigned slope, Font::AllowInexactSizeMatch = Font::AllowInexactSizeMatch::No); + RefPtr<Gfx::Font> get(DeprecatedFlyString const& family, DeprecatedFlyString const& variant, float point_size, Font::AllowInexactSizeMatch = Font::AllowInexactSizeMatch::No); RefPtr<Gfx::Font> get_by_name(StringView); void for_each_font(Function<void(Gfx::Font const&)>); void for_each_fixed_width_font(Function<void(Gfx::Font const&)>); diff --git a/Userland/Libraries/LibGfx/Font/Typeface.h b/Userland/Libraries/LibGfx/Font/Typeface.h index 0e445bf76d..67e3d71436 100644 --- a/Userland/Libraries/LibGfx/Font/Typeface.h +++ b/Userland/Libraries/LibGfx/Font/Typeface.h @@ -6,7 +6,7 @@ #pragma once -#include <AK/FlyString.h> +#include <AK/DeprecatedFlyString.h> #include <AK/Function.h> #include <AK/RefCounted.h> #include <AK/Vector.h> @@ -24,8 +24,8 @@ public: { } - FlyString const& family() const { return m_family; } - FlyString const& variant() const { return m_variant; } + DeprecatedFlyString const& family() const { return m_family; } + DeprecatedFlyString const& variant() const { return m_variant; } unsigned weight() const; u8 slope() const; @@ -39,8 +39,8 @@ public: RefPtr<Font> get_font(float point_size, Font::AllowInexactSizeMatch = Font::AllowInexactSizeMatch::No) const; private: - FlyString m_family; - FlyString m_variant; + DeprecatedFlyString m_family; + DeprecatedFlyString m_variant; Vector<RefPtr<BitmapFont>> m_bitmap_fonts; RefPtr<VectorFont> m_vector_font; |