Character set specification by RegEx in CloudPebble

It turns out reducing a character set size for a font may be useful in the future given a recent puzzling session making a watch face.

I am using CloudPebble and Javascript. This may or may not be how I express “give me just the characters 0-9 and :” I don’t get any failures or warnings on a build with this in my manifest.json sections. Does this look correct?

{
“include”: [
“$(MODDABLE)/examples/manifest_mod.json”
],
“modules”: {
": “./main.js”
},
“resources”: {
"
-alpha”: [
{
“source”: “./assets/Garfield”,
“size”: 35,
“monochrome”: true,
“blocks”: [“Basic Latin”]
},
{
“source”: “./assets/Garfield”,
“size”: 47,
“monochrome”: true,
“characterRegex”: “[:0-9]”
}
]
}
}

1 Like

Yep, [:0-9] will yield 0123456789:

1 Like

Thanks for checking that. I found the syntax in the documentation linked to the “how to make a Pebble face” but it was setting up for a C program environment I believe.

1 Like