[vlc-devel] [PATCH 2/8] qt: fix glyph icons not beeing rendered properly

Rohan Rajpal rohan17089 at iiitd.ac.in
Mon Jun 17 16:54:56 CEST 2019


From: Pierre Lamot <pierre.lamot.prestataire at sfr.com>

glyph weren't rendered when the drawing is only in (horizontal) negative space
---
 modules/gui/qt/pixmaps/makeIconFont.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/pixmaps/makeIconFont.py b/modules/gui/qt/pixmaps/makeIconFont.py
index 8b0b1bafc7..6492ad808c 100755
--- a/modules/gui/qt/pixmaps/makeIconFont.py
+++ b/modules/gui/qt/pixmaps/makeIconFont.py
@@ -95,9 +95,11 @@ def main(model_fd):
         c = font.createChar(charcode)
         glyph["charcode"]  = "\\u{:x}".format(charcode)
         c.importOutlines(glyph["path"])
-        #scale glyph to fit between 200 (base line) and 800 (x 0.6) and center it horizontally around 0
-        c.transform((0.6, 0.0, 0.0, 0.6, -300.0, 200.0))
+        #scale glyph to fit between 200 (base line) and 800 (x 0.6)
+        c.transform((0.6, 0.0, 0.0, 0.6, 200.0, 200.0))
         c.vwidth = 1000
+        c.width = 1000
+
     font.generate(data["font_file"])
     genQml(data)
 
-- 
2.17.1



More information about the vlc-devel mailing list