From 05c8707a0b659a4108ea328dc1de96a646dbdd01 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Tue, 18 Apr 2017 00:13:35 +0100 Subject: [PATCH] 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 26c8299673a9e7595f695f989decfa1f8d47b0ec..7865220221c9b3b0565e51c11d947061a27fd56e 100644 GIT binary patch literal 4812 zcmd^DYjjlA72apw%uFVLxlu693=kBsgqb9~DGVqvMg)ZLh^@pxUWB|#k}+wq3_%Gn zNCE-|AsS=V;!@BW3v?Aaf)AwW@=cf2YFw3yt?jZX+?kvSr{B4Ecr1i=`MdXKpS{n1 ze0!gL&%HNu=j7$hAqNG?NZwnsvpsLu{`M%5`2!-SKRY|`uEx1P`Z3YKEFwy|{kECe zbTbXdJPGsEIrGP4WIT539YoB7`F+bO3u|62IC_T2v>3X3%8Cn%Y*R-`+wVZ*%Al~m zXYCL9TTohAWnDwyZ{`ian~V9+DhnHG$Sp;70|rY~VP)|PO)r0id639(qNcjGP83rH z>g$5tLrl67-M?||yn@6jXUSna4Gq0>ytt72TjHjtIp$7L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