diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-11-13 20:39:18 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-11-13 20:39:18 +0300 |
commit | 73047c69ea803a35f3eb4082b5ccdc7d2c53514d (patch) | |
tree | 6ae8aaf0a693f2a0a983f3fedaca9aff971dc16c /source/blender/python | |
parent | e8a8bb67fcefa5e935214e1af1ec3da38465dda1 (diff) |
BLF: Use Floats for Font Point Sizes
Allow the use of floating-point values for font point sizes, which
allows greater precision and flexibility for text output.
See D8960 for more information, details, and justification.
Differential Revision: https://developer.blender.org/D8960
Reviewed by Campbell Barton
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/generic/blf_py_api.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index 9e725730d40..a49c943df94 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -70,14 +70,15 @@ PyDoc_STRVAR(py_blf_size_doc, "font use 0.\n" " :type fontid: int\n" " :arg size: Point size of the font.\n" - " :type size: int\n" + " :type size: float\n" " :arg dpi: dots per inch value to use for drawing.\n" " :type dpi: int\n"); static PyObject *py_blf_size(PyObject *UNUSED(self), PyObject *args) { - int fontid, size, dpi; + int fontid, dpi; + float size; - if (!PyArg_ParseTuple(args, "iii:blf.size", &fontid, &size, &dpi)) { + if (!PyArg_ParseTuple(args, "ifi:blf.size", &fontid, &size, &dpi)) { return NULL; } |