#include "ui/gfx/font_list.h"
#include <ostream>
#include <unordered_set>
#include "base/lazy_instance.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "skia/ext/font_utils.h"
#include "third_party/skia/include/core/SkFontMgr.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/gfx/font_list_impl.h"
namespace {
base::LazyInstance<std::string>::Leaky g_default_font_description = …;
base::LazyInstance<scoped_refptr<gfx::FontListImpl>>::Leaky g_default_impl = …;
bool g_default_impl_initialized = …;
#if !BUILDFLAG(IS_MAC)
bool IsFontFamilyAvailable(const std::string& family, SkFontMgr* font_manager) { … }
#endif
}
namespace gfx {
bool FontList::ParseDescription(const std::string& description,
std::vector<std::string>* families_out,
int* style_out,
int* size_pixels_out,
Font::Weight* weight_out) { … }
FontList::FontList() : … { … }
FontList::FontList(const FontList& other) : … { … }
FontList::FontList(const std::string& font_description_string)
: … { … }
FontList::FontList(const std::vector<std::string>& font_names,
int font_style,
int font_size,
Font::Weight font_weight)
: … { … }
FontList::FontList(const std::vector<Font>& fonts)
: … { … }
FontList::FontList(const Font& font) : … { … }
FontList::~FontList() { … }
FontList& FontList::operator=(const FontList& other) { … }
void FontList::SetDefaultFontDescription(const std::string& font_description) { … }
FontList FontList::Derive(int size_delta,
int font_style,
Font::Weight weight) const { … }
FontList FontList::DeriveWithSizeDelta(int size_delta) const { … }
FontList FontList::DeriveWithStyle(int font_style) const { … }
FontList FontList::DeriveWithWeight(Font::Weight weight) const { … }
FontList FontList::DeriveWithHeightUpperBound(int height) const { … }
int FontList::GetHeight() const { … }
int FontList::GetBaseline() const { … }
int FontList::GetCapHeight() const { … }
int FontList::GetExpectedTextWidth(int length) const { … }
int FontList::GetFontStyle() const { … }
int FontList::GetFontSize() const { … }
Font::Weight FontList::GetFontWeight() const { … }
const std::vector<Font>& FontList::GetFonts() const { … }
const Font& FontList::GetPrimaryFont() const { … }
FontList::FontList(FontListImpl* impl) : … { … }
const scoped_refptr<FontListImpl>& FontList::GetDefaultImpl() { … }
std::string FontList::FirstAvailableOrFirst(const std::string& font_name_list) { … }
}