|
32 | 32 | - font variant is untested |
33 | 33 | - font stretch is incomplete |
34 | 34 | - font size is incomplete |
35 | | - - font size_adjust is incomplete |
36 | 35 | - default font algorithm needs improvement and testing |
37 | 36 | - setWeights function needs improvement |
38 | 37 | - 'light' is an invalid weight value, remove it. |
@@ -469,14 +468,9 @@ def ttfFontProperty(font): |
469 | 468 | # Length value is an absolute font size, e.g., 12pt |
470 | 469 | # Percentage values are in 'em's. Most robust specification. |
471 | 470 |
|
472 | | - # !!!! Incomplete |
473 | | - if font.scalable: |
474 | | - size = 'scalable' |
475 | | - else: |
476 | | - size = str(float(font.get_fontsize())) |
477 | | - |
478 | | - # !!!! Incomplete |
479 | | - size_adjust = None |
| 471 | + if not font.scalable: |
| 472 | + raise NotImplementedError("Non-scalable fonts are not supported") |
| 473 | + size = 'scalable' |
480 | 474 |
|
481 | 475 | return FontEntry(font.fname, name, style, variant, weight, stretch, size) |
482 | 476 |
|
@@ -538,9 +532,6 @@ def afmFontProperty(fontpath, font): |
538 | 532 |
|
539 | 533 | size = 'scalable' |
540 | 534 |
|
541 | | - # !!!! Incomplete |
542 | | - size_adjust = None |
543 | | - |
544 | 535 | return FontEntry(fontpath, name, style, variant, weight, stretch, size) |
545 | 536 |
|
546 | 537 |
|
@@ -592,7 +583,7 @@ def createFontList(fontfiles, fontext='ttf'): |
592 | 583 | continue |
593 | 584 | try: |
594 | 585 | prop = ttfFontProperty(font) |
595 | | - except (KeyError, RuntimeError, ValueError): |
| 586 | + except (KeyError, RuntimeError, ValueError, NotImplementedError): |
596 | 587 | continue |
597 | 588 |
|
598 | 589 | fontlist.append(prop) |
|
0 commit comments