Home | History | Annotate | Download | only in hwui

Lines Matching defs:typeface

17 #include "Typeface.h"
37 static Typeface::Style computeAPIStyle(int weight, bool italic) {
40 return italic ? Typeface::kBoldItalic : Typeface::kBold;
42 return italic ? Typeface::kItalic : Typeface::kNormal;
52 static minikin::FontStyle computeRelativeStyle(int baseWeight, Typeface::Style relativeStyle) {
54 if ((relativeStyle & Typeface::kBold) != 0) {
57 bool italic = (relativeStyle & Typeface::kItalic) != 0;
61 const Typeface* gDefaultTypeface = NULL;
63 const Typeface* Typeface::resolveDefault(const Typeface* src) {
68 Typeface* Typeface::createRelative(Typeface* src, Typeface::Style style) {
69 const Typeface* resolvedFace = Typeface::resolveDefault(src);
70 Typeface* result = new Typeface;
80 Typeface* Typeface::createAbsolute(Typeface* base, int weight, bool italic) {
81 const Typeface* resolvedFace = Typeface::resolveDefault(base);
82 Typeface* result = new Typeface();
92 Typeface* Typeface::createFromTypefaceWithVariation(
93 Typeface* src, const std::vector<minikin::FontVariation>& variations) {
94 const Typeface* resolvedFace = Typeface::resolveDefault(src);
95 Typeface* result = new Typeface();
113 Typeface* Typeface::createWithDifferentBaseWeight(Typeface* src, int weight) {
114 const Typeface* resolvedFace = Typeface::resolveDefault(src);
115 Typeface* result = new Typeface;
125 Typeface* Typeface::createFromFamilies(std::vector<std::shared_ptr<minikin::FontFamily>>&& families,
127 Typeface* result = new Typeface;
136 : families[0]->getClosestMatch(defaultStyle).font->typeface().get();
167 void Typeface::setDefault(const Typeface* face) {
171 void Typeface::setRobotoTypefaceForTest() {
180 sk_sp<SkTypeface> typeface = SkTypeface::MakeFromStream(fontData.release());
181 LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", kRobotoFont);
184 std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>());
191 Typeface* hwTypeface = new Typeface();
193 hwTypeface->fAPIStyle = Typeface::kNormal;
197 Typeface::setDefault(hwTypeface);