summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/FontDatabase.cpp
AgeCommit message (Collapse)Author
2021-09-24LibGfx: Remove debug spam about not having some font installedAndreas Kling
2021-09-04LibGfx: Make FontDatabase cache store fonts in NonnullRefPtrAndreas Kling
We don't cache failed font lookups, so there's no need for nullity here.
2021-07-29LibTTF/LibGfx: Remove circular dependency by merging LibTTF into LibGfxAndrew Kaster
LibTTF has a concrete dependency on LibGfx for things like Gfx::Bitmap, and LibGfx has a concrete dependency in the TTF::Font class in Gfx::FontDatabase. This circular dependency works fine for Serenity and Lagom Linux builds of the two libraries. It also works fine for static library builds on Lagom macOS builds. However, future changes will make Lagom use shared libraries, and circular library dependencies are not tolerated in macOS.
2021-07-11LibGfx: Try to get TTF font when query is not in name->font mapLuK1337
This change allows us to select TTF fonts in display settings again :^)
2021-07-04LibTTF: Make TTF::Font loading API return error stringsAndreas Kling
2021-05-21LibGfx+WindowServer: Have WindowServer broadcast system font settingsAndreas Kling
Instead of everybody getting their system fonts from Gfx::FontDatabase (where it's all hardcoded), they now get it from WindowServer. These are then plumbed into the usual Gfx::FontDatabase places so that the old default_font() and default_fixed_width_font() APIs keep working.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_fixed_width_font()Andreas Kling
Ask for a bold_variant() of the default_fixed_width_font() instead.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_font()Andreas Kling
Instead use default_font().bold_variant() in cases where we want a bold variant of the default font. :^)
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-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 *
2021-04-21LibGfx: Minor clean-ups in Gfx::FontDatabaseAndreas Kling
Use Core::DirIterator::next_full_path() instead of manually building each path. Also convert a fprintf(stderr, ...) to warnln()
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-16LibGfx: Remove debug spam from FontDatabase lookupsAndreas Kling
2021-02-15LibGfx: Remove static load_from_file() from abstract Font classStephan Unverwerth
2021-02-15LibGUI+LibGfx+LibTTF: Make fontpicker handle TTF fontsStephan Unverwerth
2021-02-15LibGfx: Add more query methods to FontDatabase and TypefaceStephan Unverwerth
2021-02-15LibGfx: Insert pixel and ttf fonts into Typeface structureStephan Unverwerth
This adds a new structure 'Typeface' to the FontDatabase that represents all fonts of the same family and variant. It can contain a list of BitmapFonts with varying size but of the same family and weight or a pointer to a single TTF font for all sizes of this Typeface.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling