Home | History | Annotate | Download | only in minikin

Lines Matching defs:score

111 // Calculates a font score.
112 // The score of the font family is based on three subscores.
113 // - Coverage Score: How well the font family covers the given character or variation sequence.
114 // - Locale Score: How well the font family is appropriate for the locale.
115 // - Variant Score: Whether the font family matches the variant. Note that this variant is not the
119 // Coverage Score > Locale Score > Variant Score
120 // The returned score reflects this priority order.
140 // The highest 2 bits are for coverage score, then following 28 bits are for locale score,
141 // then the last 1 bit is for variant score.
145 // Calculates a font score based on variation sequence coverage.
189 // Do not give any extra score for the default emoji style.
201 // supported font, then the font obtains a score of 0.
203 // a match in subtag gets a score of 2 and a match in scripts gains a score of 1.
204 // 3. Regarding to two elements matchings, language-and-subtag matching has a score of 4, while
207 // If two locales in the requested list have the same locale score, the font matching with higher
208 // priority locale gets a higher score. For example, in the case the user requested locale list is
209 // "ja-Jpan,en-Latn". The score of for the font of "ja-Jpan" gets a higher score than the font of
212 // To achieve score calculation with priorities, the locale score is determined as follows:
215 // score. The possible values of s(i) are 0, 1, 2, 3 and 4.
222 uint32_t score = 0;
224 score = score * 5u + localeList[i].calcScoreFor(fontLocaleList);
226 return score;
229 // Calculates a font score based on variant ("compact" or "elegant") matching.
231 // - No score if the font has a variant but it doesn't match with the text style.
250 // 2. Calculate a score for the font family. See comments in calcFamilyScore for the detail.
251 // 3. Highest score wins, with ties resolved to the first font.
270 const uint32_t score = calcFamilyScore(ch, vs, variant, localeListId, family);
271 if (score == kFirstFontScore) {
276 if (score > bestScore) {
277 bestScore = score;