Lines Matching defs:pattern
183 * If the value of pattern.width is 5 (normal) or less,
185 * If the value of pattern.width is greater than 5 (normal),
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.
206 SkTypeface* SkFontStyleSet::matchStyleCSS3(const SkFontStyle& pattern) {
228 if (pattern.width() <= SkFontStyle::kNormal_Width) {
229 if (current.width() <= pattern.width()) {
230 currentScore += 10 - pattern.width() + current.width();
235 if (current.width() > pattern.width()) {
236 currentScore += 10 + pattern.width() - current.width();
249 SkASSERT(0 <= pattern.slant() && pattern.slant() <= 2 &&
256 /* [pattern] */
258 currentScore += score[pattern.slant()][current.slant()];
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();
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()) {
285 } else if (pattern.weight() > 500) {
286 if (current.weight() > pattern.weight()) {
287 currentScore += 1000 + pattern.weight() - current.weight();