diff options
| author | Glenn Morris | 2020-06-07 09:03:59 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-06-07 09:03:59 -0700 |
| commit | fa6d56529f9ebaedaf62ecbf8887ffecca7dce12 (patch) | |
| tree | 922e12ffbf813534647a96788b9a5fb77b4f2288 /src | |
| parent | 6cb557e7a58d7f1c2e9afceeba45d0ced2aff214 (diff) | |
| parent | 35661ef943d261f6c43e93e475ddd8516f4a4b62 (diff) | |
| download | emacs-fa6d56529f9ebaedaf62ecbf8887ffecca7dce12.tar.gz emacs-fa6d56529f9ebaedaf62ecbf8887ffecca7dce12.zip | |
Merge from origin/emacs-27
35661ef943 (origin/emacs-27) Fix typo in "(elisp) Type Keywords"
1af0e95fec Gnus nnir-summary-line-format has no effect
dd366b5d3b Improve documentation of 'window-text-pixel-size'
fbd49f969e * src/xdisp.c (Fwindow_text_pixel_size): Doc fix. (Bug#41...
d8593fd19f Minor improvements to EDE and EIEIO manuals
3916e63f9e Have Fido mode also imitate Ido mode in ignore-case options
cc35b197c7 Update package-menu-quick-help
bf09106256 Improve documentation of 'sort-subr'
73749efa13 Update Ukrainian transliteration
30a7ee505a Fix Arabic shaping when eww/shr fill the text to be rendered
7d323f07c0 Silence some byte-compiler warnings in tests
cf473e742f * test/lisp/battery-tests.el: New file.
b07e3b1d97 Improve format-spec documentation (bug#41571)
# Conflicts:
# test/lisp/emacs-lisp/package-tests.el
Diffstat (limited to 'src')
| -rw-r--r-- | src/hbfont.c | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 60 |
2 files changed, 41 insertions, 26 deletions
diff --git a/src/hbfont.c b/src/hbfont.c index 576c5fe7f60..4b3f64ef504 100644 --- a/src/hbfont.c +++ b/src/hbfont.c | |||
| @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 26 | #include "composite.h" | 26 | #include "composite.h" |
| 27 | #include "font.h" | 27 | #include "font.h" |
| 28 | #include "dispextern.h" | 28 | #include "dispextern.h" |
| 29 | #include "buffer.h" | ||
| 29 | 30 | ||
| 30 | #ifdef HAVE_NTGUI | 31 | #ifdef HAVE_NTGUI |
| 31 | 32 | ||
| @@ -438,7 +439,11 @@ hbfont_shape (Lisp_Object lgstring, Lisp_Object direction) | |||
| 438 | 439 | ||
| 439 | /* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz | 440 | /* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz |
| 440 | guess it. */ | 441 | guess it. */ |
| 441 | if (!NILP (direction)) | 442 | if (!NILP (direction) |
| 443 | /* If they bind bidi-display-reordering to nil, the DIRECTION | ||
| 444 | they provide is meaningless, and we should let HarfBuzz guess | ||
| 445 | the real direction. */ | ||
| 446 | && !NILP (BVAR (current_buffer, bidi_display_reordering))) | ||
| 442 | { | 447 | { |
| 443 | hb_direction_t dir = HB_DIRECTION_LTR; | 448 | hb_direction_t dir = HB_DIRECTION_LTR; |
| 444 | if (EQ (direction, QL2R)) | 449 | if (EQ (direction, QL2R)) |
diff --git a/src/xdisp.c b/src/xdisp.c index 52f6ab8e709..bd0711471a2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10449,33 +10449,43 @@ in_display_vector_p (struct it *it) | |||
| 10449 | DEFUN ("window-text-pixel-size", Fwindow_text_pixel_size, Swindow_text_pixel_size, 0, 6, 0, | 10449 | DEFUN ("window-text-pixel-size", Fwindow_text_pixel_size, Swindow_text_pixel_size, 0, 6, 0, |
| 10450 | doc: /* Return the size of the text of WINDOW's buffer in pixels. | 10450 | doc: /* Return the size of the text of WINDOW's buffer in pixels. |
| 10451 | WINDOW must be a live window and defaults to the selected one. The | 10451 | WINDOW must be a live window and defaults to the selected one. The |
| 10452 | return value is a cons of the maximum pixel-width of any text line and | 10452 | return value is a cons of the maximum pixel-width of any text line |
| 10453 | the maximum pixel-height of all text lines. | 10453 | and the pixel-height of all the text lines in the accessible portion |
| 10454 | of buffer text. | ||
| 10455 | |||
| 10456 | This function exists to allow Lisp programs to adjust the dimensions | ||
| 10457 | of WINDOW to the buffer text it needs to display. | ||
| 10454 | 10458 | ||
| 10455 | The optional argument FROM, if non-nil, specifies the first text | 10459 | The optional argument FROM, if non-nil, specifies the first text |
| 10456 | position and defaults to the minimum accessible position of the buffer. | 10460 | position to consider, and defaults to the minimum accessible position |
| 10457 | If FROM is t, use the minimum accessible position that starts a | 10461 | of the buffer. If FROM is t, it stands for the minimum accessible |
| 10458 | non-empty line. TO, if non-nil, specifies the last text position and | 10462 | position that starts a non-empty line. TO, if non-nil, specifies the |
| 10459 | defaults to the maximum accessible position of the buffer. If TO is t, | 10463 | last text position and defaults to the maximum accessible position of |
| 10460 | use the maximum accessible position that ends a non-empty line. | 10464 | the buffer. If TO is t, it stands for the maximum accessible position |
| 10461 | 10465 | that ends a non-empty line. | |
| 10462 | The optional argument X-LIMIT, if non-nil, specifies the maximum text | 10466 | |
| 10463 | width that can be returned. X-LIMIT nil or omitted, means to use the | 10467 | The optional argument X-LIMIT, if non-nil, specifies the maximum X |
| 10464 | pixel-width of WINDOW's body; use this if you want to know how high | 10468 | coordinate beyond which the text should be ignored. It is therefore |
| 10465 | WINDOW should be become in order to fit all of its buffer's text with | 10469 | also the maximum width that the function can return. X-LIMIT nil or |
| 10466 | the width of WINDOW unaltered. Use the maximum width WINDOW may assume | 10470 | omitted means to use the pixel-width of WINDOW's body. This default |
| 10467 | if you intend to change WINDOW's width. In any case, text whose | 10471 | means text of truncated lines wider than the window will be ignored; |
| 10468 | x-coordinate is beyond X-LIMIT is ignored. Since calculating the width | 10472 | specify a large value for X-LIMIT if lines are truncated and you need |
| 10469 | of long lines can take some time, it's always a good idea to make this | 10473 | to account for the truncated text. Use nil for X-LIMIT if you want to |
| 10470 | argument as small as possible; in particular, if the buffer contains | 10474 | know how high WINDOW should become in order to fit all of its buffer's |
| 10471 | long lines that shall be truncated anyway. | 10475 | text with the width of WINDOW unaltered. Use the maximum width WINDOW |
| 10472 | 10476 | may assume if you intend to change WINDOW's width. Since calculating | |
| 10473 | The optional argument Y-LIMIT, if non-nil, specifies the maximum text | 10477 | the width of long lines can take some time, it's always a good idea to |
| 10474 | height (excluding the height of the mode- or header-line, if any) that | 10478 | make this argument as small as possible; in particular, if the buffer |
| 10475 | can be returned. Text lines whose y-coordinate is beyond Y-LIMIT are | 10479 | contains long lines that shall be truncated anyway. |
| 10476 | ignored. Since calculating the text height of a large buffer can take | 10480 | |
| 10477 | some time, it makes sense to specify this argument if the size of the | 10481 | The optional argument Y-LIMIT, if non-nil, specifies the maximum Y |
| 10478 | buffer is large or unknown. | 10482 | coordinate beyond which the text is to be ignored; it is therefore |
| 10483 | also the maxcomp height that the function can return (excluding the | ||
| 10484 | height of the mode- or header-line, if any). Y-LIMIT nil or omitted | ||
| 10485 | means consider all of the accessible portion of buffer text up to the | ||
| 10486 | position specified by TO. Since calculating the text height of a | ||
| 10487 | large buffer can take some time, it makes sense to specify this | ||
| 10488 | argument if the size of the buffer is large or unknown. | ||
| 10479 | 10489 | ||
| 10480 | Optional argument MODE-AND-HEADER-LINE nil or omitted means do not | 10490 | Optional argument MODE-AND-HEADER-LINE nil or omitted means do not |
| 10481 | include the height of the mode- or header-line of WINDOW in the return | 10491 | include the height of the mode- or header-line of WINDOW in the return |