Return a match score between *style1* and *style2*. An exact match returns 0.0. A match between 'italic' and 'oblique' returns 0.1. No match returns 1.0.
(self, style1, style2)
| 1372 | return 1.0 |
| 1373 | |
| 1374 | def score_style(self, style1, style2): |
| 1375 | """ |
| 1376 | Return a match score between *style1* and *style2*. |
| 1377 | |
| 1378 | An exact match returns 0.0. |
| 1379 | |
| 1380 | A match between 'italic' and 'oblique' returns 0.1. |
| 1381 | |
| 1382 | No match returns 1.0. |
| 1383 | """ |
| 1384 | if style1 == style2: |
| 1385 | return 0.0 |
| 1386 | elif (style1 in ('italic', 'oblique') |
| 1387 | and style2 in ('italic', 'oblique')): |
| 1388 | return 0.1 |
| 1389 | return 1.0 |
| 1390 | |
| 1391 | def score_variant(self, variant1, variant2): |
| 1392 | """ |