summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2017-04-18 00:13:35 +0100
committerRicardo Constantino <wiiaboo@gmail.com>2017-04-19 20:18:23 +0100
commit05c8707a0b659a4108ea328dc1de96a646dbdd01 (patch)
treed96695c161550318c9e69ccffc510362a1378e9e
parenta047e636ab3240d2ad3f1f89e3785c59172b6dfc (diff)
downloadmpv-05c8707a0b659a4108ea328dc1de96a646dbdd01.tar.bz2
mpv-05c8707a0b659a4108ea328dc1de96a646dbdd01.tar.xz
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/
-rw-r--r--player/lua/osc.lua7
-rw-r--r--sub/osd_font.otfbin3032 -> 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
--- a/sub/osd_font.otf
+++ b/sub/osd_font.otf
Binary files differ