Skip to content

Font resource names containing digits are parsed incorrectly for rasterization size #329

Description

@defini-tiv

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When a custom font resource is given an identifier containing digits in the font name (e.g. FONT_B612_24), the build fails during font generation with the following error:

Exception: Glyph too large! codepoint 9647: 19278 > 512

Renaming the resource identifier to one without digits in the font name (while keeping the same font file and settings) allows the project to build successfully.

Expected Behavior

The build should succeed regardless of whether the font resource identifier contains digits before the trailing font size, or the documentation should specify that such identifiers are unsupported.

Steps To Reproduce

  1. Add a custom font resource (e.g. B612-Regular.ttf).
  2. Use a resource identifier containing digits in the font name, for example FONT_B612_24.
  3. Build the project.
  4. Observe that the build fails with Glyph too large!.
  5. Rename the resource identifier to remove the digits from the font name (for example FONT_B_24) without changing any other settings.
  6. Build the project again.
  7. Observe that the build succeeds.

Version

cloudpebble

Host OS

N/A

Watch

Pebble Time (Snowy), Pebble 2 Duo (Asterix)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions