mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Style font-variant-* css properties
This commit is contained in:
parent
aabbe87628
commit
1c42d6831b
Notes:
github-actions[bot]
2024-12-17 18:08:30 +00:00
Author: https://github.com/jdahlin
Commit: 1c42d6831b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2197
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/kalenikaliaksandr
Reviewed-by: https://github.com/tcl3
11 changed files with 659 additions and 203 deletions
91
Libraries/LibGfx/Font/FontVariant.h
Normal file
91
Libraries/LibGfx/Font/FontVariant.h
Normal file
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Johan Dahlin <jdahlin@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
struct FontVariantAlternates {
|
||||
bool historical_forms { false };
|
||||
};
|
||||
|
||||
struct FontVariantEastAsian {
|
||||
enum class Variant {
|
||||
Unset,
|
||||
Jis78,
|
||||
Jis83,
|
||||
Jis90,
|
||||
Jis04,
|
||||
Simplified,
|
||||
Traditional
|
||||
};
|
||||
enum class Width {
|
||||
Unset,
|
||||
Proportional,
|
||||
FullWidth
|
||||
};
|
||||
|
||||
bool ruby = false;
|
||||
Variant variant { Variant::Unset };
|
||||
Width width { Width::Unset };
|
||||
};
|
||||
|
||||
struct FontVariantLigatures {
|
||||
enum class Common {
|
||||
Unset,
|
||||
Common,
|
||||
NoCommon
|
||||
};
|
||||
enum class Discretionary {
|
||||
Unset,
|
||||
Discretionary,
|
||||
NoDiscretionary
|
||||
};
|
||||
enum class Historical {
|
||||
Unset,
|
||||
Historical,
|
||||
NoHistorical
|
||||
};
|
||||
enum class Contextual {
|
||||
Unset,
|
||||
Contextual,
|
||||
NoContextual
|
||||
};
|
||||
bool none = false;
|
||||
Common common { Common::Unset };
|
||||
Discretionary discretionary { Discretionary::Unset };
|
||||
Historical historical { Historical::Unset };
|
||||
Contextual contextual { Contextual::Unset };
|
||||
};
|
||||
|
||||
struct FontVariantNumeric {
|
||||
enum class Figure {
|
||||
Unset,
|
||||
Lining,
|
||||
Oldstyle
|
||||
};
|
||||
enum class Spacing {
|
||||
Unset,
|
||||
Proportional,
|
||||
Tabular
|
||||
};
|
||||
enum class Fraction {
|
||||
Unset,
|
||||
Diagonal,
|
||||
Stacked
|
||||
};
|
||||
bool ordinal = false;
|
||||
bool slashed_zero = false;
|
||||
Figure figure { Figure::Unset };
|
||||
Spacing spacing { Spacing::Unset };
|
||||
Fraction fraction { Fraction::Unset };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue