kivy / kivy

Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS
https://kivy.org
MIT License
17.49k stars 3.05k forks source link

Material font icons are not displayed #7547

Closed HeaTTheatR closed 2 years ago

HeaTTheatR commented 3 years ago

Software Versions

Describe the bug

In Kivy version 2.0.0, material font icons are displayed correctly. In Kivy version 2.1.0-dev icons are not displayed.

And the icons are displayed correctly in Windows. Here is a message from a Windows user

i'm_ using sdl2 as text provider. same default settings after installing kivy. i didn't change anything. these are my kivy initialization logs if helps:

[INFO   ] [Logger      ] Record log in C:\Users\Sina\.kivy\logs\kivy_21-06-01_6.txt
[INFO   ] [deps        ] Successfully imported "kivy_deps.angle" 0.3.0
[INFO   ] [deps        ] Successfully imported "kivy_deps.glew" 0.3.0
[INFO   ] [deps        ] Successfully imported "kivy_deps.sdl2" 0.3.1
[INFO   ] [Kivy        ] v2.1.0.dev0     
[INFO   ] [Kivy        ] Installed at "C:\Users\Sina\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO   ] [Python      ] v3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
[INFO   ] [Python      ] Interpreter at "C:\Users\Sina\AppData\Local\Programs\Python\Python37\python.exe"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
[INFO   ] [Factory     ] 189 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] GLEW initialization succeeded
[INFO   ] [GL          ] Backend used <glew>
[INFO   ] [GL          ] OpenGL version <b'4.3.0 - Build 20.19.15.4531'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel(R) HD Graphics 4400'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 3
[INFO   ] [GL          ] Shading version <b'4.30 - Build 20.19.15.4531'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Base        ] Start application main loop
[INFO   ] [GL          ] NPOT texture support is available

unknown

To Reproduce

from kivy.lang import Builder
from kivy.app import App

KV = '''
Screen:

    Label:
        font_name: "materialdesignicons-webfont.ttf"
        text: "\U000F02A2"
        pos_hint: {"center_x": .5, "center_y": .5}
'''

class MainApp(App):
    def build(self):
        return Builder.load_string(KV)

MainApp().run()

Screenshots

444

Additional context

However, if we change the provider for displaying the text:

os.environ["KIVY_TEXT"] = "pil"

... the icons in the Kiwi master branch will display correctly.

Icon pack - https://github.com/Templarian/MaterialDesign-Webfont/archive/master.zip

HeaTTheatR commented 2 years ago

python -m pip install "kivy[base] @ https://github.com/kivy/kivy/archive/master.zip" - this installation method solved the problem with displaying icons.