From c02ae7cc40908d31834d54e8fdb11226e2ec256d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Mon, 8 May 2023 13:41:39 +0200 Subject: [PATCH] remove chinese --- mpv/scripts/modern.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/mpv/scripts/modern.lua b/mpv/scripts/modern.lua index 05eff40..93e5eb7 100644 --- a/mpv/scripts/modern.lua +++ b/mpv/scripts/modern.lua @@ -658,7 +658,6 @@ function render_elements(master_ass) buttontext = buttontext:gsub(':%((.?.?.?)%) unknown ', ':%(%1%)') --gsub('%) unknown %(\'', '') local maxchars = element.layout.button.maxchars - -- 认为1个中文字符约等于1.5个英文字符 local charcount = (buttontext:len() + select(2, buttontext:gsub('[^\128-\193]', ''))*2) / 3 if not (maxchars == nil) and (charcount > maxchars) then local limit = math.max(0, maxchars - 3)