#include "ui/gfx/font_render_params.h"
#include <fontconfig/fontconfig.h>
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include "base/command_line.h"
#include "base/containers/lru_cache.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/lock.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "ui/gfx/font.h"
#include "ui/gfx/font_render_params_linux.h"
#include "ui/gfx/linux/fontconfig_util.h"
#include "ui/gfx/switches.h"
#if BUILDFLAG(IS_LINUX)
#include "ui/linux/linux_ui.h"
#endif
namespace gfx {
namespace {
int FontWeightToFCWeight(Font::Weight weight) { … }
float device_scale_factor_ = …;
const size_t kCacheSize = …;
struct QueryResult { … };
Cache;
struct SynchronizedCache { … };
base::LazyInstance<SynchronizedCache>::Leaky g_synchronized_cache = …;
std::string GetFontRenderParamsQueryKey(const FontRenderParamsQuery& query) { … }
}
bool QueryFontconfig(const FontRenderParamsQuery& query,
FontRenderParams* params_out,
std::string* family_out) { … }
FontRenderParams GetFontRenderParams(const FontRenderParamsQuery& query,
std::string* family_out) { … }
void ClearFontRenderParamsCacheForTest() { … }
float GetFontRenderParamsDeviceScaleFactor() { … }
void SetFontRenderParamsDeviceScaleFactor(float device_scale_factor) { … }
}