#include "ui/gfx/platform_font_skia.h"
#include <string>
#include "base/check_op.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/notreached.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/font.h"
#include "ui/gfx/font_names_testing.h"
#include "ui/gfx/font_render_params.h"
#if BUILDFLAG(IS_WIN)
#include "ui/gfx/system_fonts_win.h"
#endif
#if BUILDFLAG(IS_LINUX)
#include "ui/linux/fake_linux_ui.h"
#endif
namespace gfx {
#if BUILDFLAG(IS_LINUX)
class TestFontDelegate : public ui::FakeLinuxUi { … };
class PlatformFontSkiaTest : public testing::Test { … };
TEST_F(PlatformFontSkiaTest, DefaultFont) { … }
#endif
TEST(PlatformFontSkiaRenderParamsTest, DefaultFontRenderParams) { … }
#if BUILDFLAG(IS_WIN)
TEST(PlatformFontSkiaOnWindowsTest, SystemFont) {
gfx::Font system_font = win::GetDefaultSystemFont();
gfx::Font default_font;
EXPECT_EQ(system_font.GetFontName(), default_font.GetFontName());
EXPECT_EQ(system_font.GetFontSize(), default_font.GetFontSize());
EXPECT_EQ(system_font.GetStyle(), default_font.GetStyle());
EXPECT_EQ(system_font.GetWeight(), default_font.GetWeight());
EXPECT_EQ(system_font.GetHeight(), default_font.GetHeight());
EXPECT_EQ(system_font.GetBaseline(), default_font.GetBaseline());
EXPECT_EQ(system_font.GetBaseline(), default_font.GetBaseline());
EXPECT_EQ(system_font.GetFontRenderParams(),
default_font.GetFontRenderParams());
}
#endif
}