mpv/player
Avi Halachmi (:avih) 416668d3c8 stats.lua: page 4 (keys): better alignment of non-ascii keys
Previously we assumed the key-name string occupies strlen(name) cells,
now we count codepoints instead.

This improves alignment of non-english key names. Still not perfect
because we don't know if the key name is single or double width, but
wcwidth not available to scripts, notoriously unreliable (depends on
locale, correct and updated tables, etc), and also not always
available (Windows).

Still, better than nothing, and we err by at most one cell - vs up to
three before this commit (4 bytes keyname codepoint).

In the future we could do the alignment using libass tags, however,
this both complicates the ass-output generation, and also not available
when we output for the terminal, so for now only count codepoints.

Also, if the key name was in a right-to-left language, then previously
the name/command were swapped visually. Now we inject a left-to-right
marker before the name to ensure direction. This works also when
harfbuzz is disabled for libass (--sub-ass-shaper=simple).
2021-07-31 11:00:07 +03:00
..
javascript js: key bindings: ensure priorities for same-key bindings 2021-07-21 17:29:11 +03:00
lua stats.lua: page 4 (keys): better alignment of non-ascii keys 2021-07-31 11:00:07 +03:00
audio.c audio: check ao driver init failure to avoid use after free 2021-07-13 15:16:59 +00:00
client.c client API: inactivate the opengl_cb API 2020-09-03 14:52:11 +02:00
client.h scripting: remove race condition when toggling internal scripts 2020-03-26 23:59:44 +01:00
command.c command: handle changes to image-display-duration 2021-07-25 15:32:41 +00:00
command.h command: add internal INPUT_PROCESSED event 2020-11-16 20:29:58 +02:00
configfiles.c options: add watch-later-options 2021-07-21 13:19:28 +00:00
core.h options: add watch-later-options 2021-07-21 13:19:28 +00:00
external_files.c player: eac3 to the whitelist of audio extensions 2021-07-30 08:20:22 -05:00
external_files.h player: add automatic loading of external cover art files 2020-09-28 00:12:52 +02:00
javascript.c js: fix tiny leaks if js_try throws(!) 2021-07-23 17:50:24 +03:00
loadfile.c options: audio-display determines cover priority 2021-07-29 13:38:28 +00:00
lua.c scripting (lua/js): utils.getpid: make wrapper of pid property 2021-05-01 16:07:05 +03:00
main.c options: add watch-later-options 2021-07-21 13:19:28 +00:00
misc.c audio: refactor how data is passed to AO 2020-08-29 13:12:32 +02:00
osd.c player: add --term-title option 2020-05-25 20:39:37 +02:00
playloop.c player: fix missed pause state update during reset in some cases 2021-07-18 12:22:55 +02:00
screenshot.c screenshot: add --screenshot-sw option 2020-10-05 00:16:46 +02:00
screenshot.h player: make screenshot each-frame mode more accurate 2020-02-07 13:32:21 +01:00
scripting.c player/scripting: fix use-after-free when loading script folders 2021-04-08 23:47:35 +03:00
sub.c sub: fix subs/lyrics on music files with sub-past-video-end=no 2021-06-27 21:02:39 -04:00
video.c player: let frontend decide whether to use cover-art mode 2020-09-28 00:04:21 +02:00