From 05c8707a0b659a4108ea328dc1de96a646dbdd01 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Tue, 18 Apr 2017 00:13:35 +0100 Subject: osc: add volume icons to osd font and use them Glyphs taken and based on U+1F507 to U+1F50A from Symbola, which is available under public domain: http://users.teilar.gr/~g1951d/ --- player/lua/osc.lua | 7 ++++--- sub/osd_font.otf | Bin 3032 -> 4812 bytes 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/player/lua/osc.lua b/player/lua/osc.lua index ea77c1dfe0..c0fcf1e953 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -1837,11 +1837,12 @@ function osc_init() ne.content = function() local volume = mp.get_property_number("volume", 0) local mute = mp.get_property_native("mute") - local volicon = {"🔈", "🔉", "🔊"} + local volicon = {"\238\132\139", "\238\132\140", + "\238\132\141", "\238\132\142"} if volume == 0 or mute then - return "🔇" + return "\238\132\138" else - return volicon[math.min(3,math.ceil(volume / (100/3)))] + return volicon[math.min(4,math.ceil(volume / (100/3)))] end end ne.eventresponder["mouse_btn0_up"] = diff --git a/sub/osd_font.otf b/sub/osd_font.otf index 26c8299673..7865220221 100644 Binary files a/sub/osd_font.otf and b/sub/osd_font.otf differ -- cgit v1.2.3