mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Add some clarifications to text-sizing spec
Based on feedback from users
This commit is contained in:
@@ -105,7 +105,11 @@ characters and thus ends up rendering text at twice the base size.
|
|||||||
|
|
||||||
When ``w`` is a non-zero value, it specifies the width in scaled cells of the
|
When ``w`` is a non-zero value, it specifies the width in scaled cells of the
|
||||||
following text. Note that **all** the text in that escape code must be rendered
|
following text. Note that **all** the text in that escape code must be rendered
|
||||||
in ``s * w`` cells. If it does not fit, the terminal is free to do whatever it
|
in ``s * w`` cells. When both ``s`` and ``w`` are present, the resulting multicell
|
||||||
|
contains all the text in the escape code rendered in a grid of ``(s * w, s)``
|
||||||
|
cells, i.e. the multicell is ``s*w`` cells wide and ``s`` cells high.
|
||||||
|
|
||||||
|
If the text does not fit, the terminal is free to do whatever it
|
||||||
feels is best, including truncating the text or downsizing the font size when
|
feels is best, including truncating the text or downsizing the font size when
|
||||||
rendering it. It is up to client applications to use the ``w`` key wisely and not
|
rendering it. It is up to client applications to use the ``w`` key wisely and not
|
||||||
try to render too much text in too few cells. When sending a string of text
|
try to render too much text in too few cells. When sending a string of text
|
||||||
@@ -128,6 +132,13 @@ when using fractional scaling, as described below.
|
|||||||
|
|
||||||
.. note:: Text sizes specified by scale are relative to the base font size,
|
.. note:: Text sizes specified by scale are relative to the base font size,
|
||||||
thus if the base font size is changed, these sizes are changed as well.
|
thus if the base font size is changed, these sizes are changed as well.
|
||||||
|
So if the terminal emulator is using a base font size of ``11pt``, then
|
||||||
|
``s=2`` will be rendered in approximately ``22pt`` (approx. because the
|
||||||
|
terminal may need to slightly adjust font size to ensure it fits as not all
|
||||||
|
fonts scale sizes linearly). If the user changes the base font size of the
|
||||||
|
terminal emulator to ``12pt`` then the scaled font size becomes ``~24pt``
|
||||||
|
and so on.
|
||||||
|
|
||||||
|
|
||||||
Fractional scaling
|
Fractional scaling
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
Reference in New Issue
Block a user