File: text_size.rst

package info (click to toggle)
ezdxf 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104,528 kB
  • sloc: python: 182,341; makefile: 116; lisp: 20; ansic: 4
file content (59 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.. _Text Size Tools:

Text Size Tools
===============

.. module:: ezdxf.tools.text_size


.. class:: ezdxf.tools.text_size.TextSize

    A frozen dataclass as return type for the :func:`text_size` function.

    .. attribute:: width

        The text width in drawing units (float).

    .. attribute:: cap_height

        The font cap-height in drawing units (float).

    .. attribute:: total_height

        The font total-height = cap-height + descender-height in drawing units (float).

.. autofunction:: text_size


.. class:: ezdxf.tools.text_size.MTextSize

    A frozen dataclass as return type for the :func:`mtext_size` function.

    .. attribute:: total_width

        The total width in drawing units (float)

    .. attribute:: total_height

        The total height in drawing units (float), same as ``max(column_heights)``.

    .. attribute:: column_width

        The width of a single column in drawing units (float)

    .. attribute:: gutter_width

        The space between columns in drawing units (float)

    .. attribute:: column_heights

        A tuple of columns heights (float) in drawing units. Contains at least
        one column height and the column height is 0 for an empty column.

    .. attribute:: column_count

        The count of columns (int).

.. autofunction:: mtext_size

.. autofunction:: estimate_mtext_extents