Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

widget_styles don't support bitmap_font #391

Open
michael-betz opened this issue Oct 28, 2019 · 1 comment
Open

widget_styles don't support bitmap_font #391

michael-betz opened this issue Oct 28, 2019 · 1 comment

Comments

@michael-betz
Copy link

my config.yaml

widget_styles:
  text_default:
    bitmap_font: True
    font_name: CG-pixel

slides:
    testSlide:
    - type: text
      text: TEST

slide_player:
  mode_attract_started: testSlide

result:

kivy: Exception while processing RegisteredHandler(callback=<bound method McConfigPlayer.play_from_trigger of McConfigPlayer.widgets>, priority=1, kwargs={}, key=UUID('1d1a423e-565d-4b9e-a980-b80fb095a1de'), condition=None, blocking_facility=None) for event widgets_play
Traceback (most recent call last):
  File "/home/sysop/mpfdev/mpf/mpf/core/events.py", line 662, in _run_handlers
    result = handler.callback(**merged_kwargs)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/core/mc_config_player.py", line 56, in play_from_trigger
    self.play(settings=settings, context=context, calling_context=calling_context, priority=priority, **kwargs)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/config_players/widget_player.py", line 147, in play
    self._action_add(s, instance_dict, widget, context, kwargs)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/config_players/widget_player.py", line 105, in _action_add
    slide.add_widgets_from_library(name=widget, play_kwargs=play_kwargs, **s)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/uix/slide.py", line 136, in add_widgets_from_library
    play_kwargs=play_kwargs)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/uix/widget.py", line 909, in create_widget_objects_from_config
    mc=mc, config=widget, key=this_key, play_kwargs=play_kwargs)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/widgets/text.py", line 96, in __init__
    self._process_text(self.original_text)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/widgets/text.py", line 204, in _process_text
    self.update_vars_in_text(text)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/widgets/text.py", line 243, in update_vars_in_text
    self.update_text(text)
  File "/home/sysop/mpfdev/mpf-mc/mpfmc/widgets/text.py", line 264, in update_text
    self._label.texture_update()
  File "/home/sysop/.pyenv/versions/3.6.6/lib/python3.6/site-packages/kivy/uix/label.py", line 413, in texture_update
    self._label.refresh()
  File "/home/sysop/.pyenv/versions/3.6.6/lib/python3.6/site-packages/kivy/core/text/__init__.py", line 759, in refresh
    self.resolve_font_name()
  File "/home/sysop/.pyenv/versions/3.6.6/lib/python3.6/site-packages/kivy/core/text/__init__.py", line 356, in resolve_font_name
    raise IOError('Label: File %r not found' % fontname)
OSError: Label: File 'CG-pixel.ttf' not found

Note that the slide below displays correctly

slides:
    testSlide:
    - type: text
      font_name: CG-pixel
      bitmap_font: True
      text: TEST
@gbouthenot
Copy link

I have the exact same problem.
mfp-mc 0.56.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants