CloudPebble error - changing fonts

I am working my way through the CloudPebble tutorials and am stuck n pArt 2 Customizing Your Watchface. I have exact same code as the example on github and have downloaded the true type font from there too. When I build I get the following error … Any ideas ??

Traceback (most recent call last):
  File "/root/.pebble-sdk/SDKs/current/sdk-core/pebble/.waf3-2.1.4-e7394e338829ca9f0f1b029a38b80f7a/waflib/Task.py", line 179, in process
    ret=self.run()
        ^^^^^^^^^^
  File "/root/.pebble-sdk/SDKs/current/sdk-core/pebble/.waf3-2.1.4-e7394e338829ca9f0f1b029a38b80f7a/waflib/extras/generate_resource_ball.py", line 13, in run
    reso=resource_generator.generate_object(self,self.definition)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.pebble-sdk/SDKs/current/sdk-core/pebble/common/waftools/resources/resource_map/resource_generator.py", line 97, in generate_object
    return cls.generate_object(task, definition)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.pebble-sdk/SDKs/current/sdk-core/pebble/common/waftools/resources/resource_map/resource_generator_font.py", line 52, in generate_object
    font_data = cls.build_font_data(font_path, definition)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.pebble-sdk/SDKs/current/sdk-core/pebble/common/waftools/resources/resource_map/resource_generator_font.py", line 69, in build_font_data
    font = Font(
           ^^^^^
  File "/root/.pebble-sdk/SDKs/current/sdk-core/pebble/common/tools/font/fontgen.py", line 114, in __init__
    self.face = freetype.Face(self.ttf_path)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/uv/tools/pebble-tool/lib/python3.11/site-packages/freetype/__init__.py", line 1192, in __init__
    raise FT_Exception(error)
freetype.ft_errors.FT_Exception: FT_Exception:  (unknown file format)
1 Like

I’m not in a position to test this out right now.

It is probably a good idea to try uploading a different TTF file in case the one you downloaded really is corrupted as per the error.

My Mass Effect watchface(s) make use of a custom font, so that’s what I intend to test later.

2 Likes

I have tried using other fonts and I get “Exception: Glyph too large!” and I can’t get ropund this either …

1 Like

Aha - so I did download font afresh and it now works .. thanks for the hint

1 Like