1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-23 16:47:41 +00:00
serenity/Userland/Libraries/LibGfx/Forward.h
Andreas Kling f900957d26 LibGfx+LibWeb: Move Gfx::ScaledFont caching from LibWeb into LibGfx
Before this change, we would only cache and reuse Gfx::ScaledFont
instances for downloaded CSS fonts.

By moving it into Gfx::VectorFont, we get caching for all vector fonts,
including local system TTFs etc.

This avoids a *lot* of style invalidations in LibWeb, since we now vend
the same Gfx::Font pointer for the same font when used repeatedly.
2023-12-26 18:15:55 +01:00

76 lines
1.2 KiB
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
namespace Gfx {
class Bitmap;
class ImmutableBitmap;
class CharacterBitmap;
class Color;
template<typename T>
class DisjointRectSet;
class Emoji;
class Font;
class GlyphBitmap;
class ImageDecoder;
struct FontPixelMetrics;
class ScaledFont;
template<typename T>
class Line;
class AntiAliasingPainter;
class Painter;
class Palette;
class PaletteImpl;
class Path;
class ShareableBitmap;
class StylePainter;
struct SystemTheme;
template<typename T>
class Triangle;
template<typename T>
class Point;
template<typename T>
class Size;
template<typename T>
class Rect;
template<typename T>
class Quad;
using DisjointIntRectSet = DisjointRectSet<int>;
using DisjointFloatRectSet = DisjointRectSet<float>;
using IntLine = Line<int>;
using FloatLine = Line<float>;
using IntRect = Rect<int>;
using FloatRect = Rect<float>;
using IntPoint = Point<int>;
using FloatPoint = Point<float>;
using IntSize = Size<int>;
using FloatSize = Size<float>;
using FloatQuad = Quad<float>;
enum class BitmapFormat;
enum class ColorRole;
enum class TextAlignment;
}
using Gfx::Color;