Commit 5fc9559
committed
Don't set a default size for FT2Font
In the interest of handling non-scalable fonts and reducing font
initialization, drop the default size from the `FT2Font` constructor.
Non-scalable fonts are sometimes used for bitmap-backed emoji fonts.
When we start supporting collection fonts (`.ttc`), then setting a size
is a waste, as we will just need to read the count of fonts within.
The renderer method `Renderer.draw_text` always sets a size immediately
after creating the font object, so this doesn't affect anything in most
cases. Only the direct `FT2Font` tests need changes.1 parent 8839576 commit 5fc9559
File tree
3 files changed
+15
-7
lines changed- doc/api/next_api_changes/behavior
- lib/matplotlib/tests
- src
3 files changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | 191 | | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| 760 | + | |
760 | 761 | | |
761 | 762 | | |
762 | 763 | | |
| |||
778 | 779 | | |
779 | 780 | | |
780 | 781 | | |
| 782 | + | |
781 | 783 | | |
782 | 784 | | |
783 | 785 | | |
| |||
818 | 820 | | |
819 | 821 | | |
820 | 822 | | |
| 823 | + | |
821 | 824 | | |
822 | 825 | | |
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
| 829 | + | |
826 | 830 | | |
827 | 831 | | |
828 | 832 | | |
| |||
832 | 836 | | |
833 | 837 | | |
834 | 838 | | |
| 839 | + | |
835 | 840 | | |
836 | 841 | | |
837 | 842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | 224 | | |
231 | 225 | | |
232 | 226 | | |
| |||
0 commit comments