#include "ui/gfx/font_render_params.h"
#include <fontconfig/fontconfig.h>
#include "base/check_op.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
#include "ui/gfx/font.h"
#include "ui/gfx/linux/fontconfig_util.h"
#include "ui/linux/fake_linux_ui.h"
namespace gfx {
namespace {
const char kFontconfigFileHeader[] = …;
const char kFontconfigFileFooter[] = …;
const char kFontconfigMatchFontHeader[] = …;
const char kFontconfigMatchPatternHeader[] = …;
const char kFontconfigMatchFooter[] = …;
class TestFontDelegate : public ui::FakeLinuxUi { … };
bool LoadConfigDataIntoFontconfig(const std::string& data) { … }
std::string CreateFontconfigEditStanza(const std::string& name,
const std::string& type,
const std::string& value) { … }
std::string CreateFontconfigTestStanza(const std::string& name,
const std::string& op,
const std::string& type,
const std::string& value) { … }
std::string CreateFontconfigAliasStanza(const std::string& original_family,
const std::string& preferred_family) { … }
}
class FontRenderParamsTest : public testing::Test { … };
TEST_F(FontRenderParamsTest, Default) { … }
TEST_F(FontRenderParamsTest, Size) { … }
TEST_F(FontRenderParamsTest, Style) { … }
TEST_F(FontRenderParamsTest, Scalable) { … }
TEST_F(FontRenderParamsTest, UseBitmaps) { … }
TEST_F(FontRenderParamsTest, ForceFullHintingWhenAntialiasingIsDisabled) { … }
TEST_F(FontRenderParamsTest, ForceSubpixelPositioning) { … }
TEST_F(FontRenderParamsTest, OnlySetConfiguredValues) { … }
TEST_F(FontRenderParamsTest, NoFontconfigMatch) { … }
TEST_F(FontRenderParamsTest, MissingFamily) { … }
TEST_F(FontRenderParamsTest, SubstituteFamily) { … }
}