Lines Matching refs:weight
195 * If pattern.weight < 400, weights below pattern.weight are checked
196 * in descending order followed by weights above pattern.weight
198 * If pattern.weight > 500, weights above pattern.weight are checked
199 * in ascending order followed by weights below pattern.weight
201 * If pattern.weight is 400, 500 is checked first
202 * and then the rule for pattern.weight < 400 is used.
203 * If pattern.weight is 500, 400 is checked first
204 * and then the rule for pattern.weight < 400 is used.
261 // Synthetics (weight, style) [no stretch synthetic?]
263 // CSS weight / SkFontStyle::Weight
264 // The 'closer' to the target weight, the higher the score.
265 // 1000 is the 'heaviest' recognized weight
266 if (pattern.weight() == current.weight()) {
269 } else if (pattern.weight() < 400) {
270 if (current.weight() <= pattern.weight()) {
271 currentScore += 1000 - pattern.weight() + current.weight();
273 currentScore += 1000 - current.weight();
276 } else if (pattern.weight() <= 500) {
277 if (current.weight() >= pattern.weight() && current.weight() <= 500) {
278 currentScore += 1000 + pattern.weight() - current.weight();
279 } else if (current.weight() <= pattern.weight()) {
280 currentScore += 500 + current.weight();
282 currentScore += 1000 - current.weight();
285 } else if (pattern.weight() > 500) {
286 if (current.weight() > pattern.weight()) {
287 currentScore += 1000 + pattern.weight() - current.weight();
289 currentScore += current.weight();