Function for plotting text along a circular arc. The code exists in a demo, and can just be migrated into the library.
Alternate algorithm for the rasterizer that uses a smaller buffer but imposes a limit on the complexity of the shapes you can plot in a single fill operation. This would be useful when someone mostly just wants very large numbers to show the time and they are running out of memory.
Functions to plot simple “stroked” shapes like a straight line segment of a circular arc segment.
I’ve published an alpha version of a new tool for creating .ffont and .fpath resources for fctx. It is a Python tool and you should be able to install it with uv much like pebble-tool.
uv tool install fctx-tool
There are currently two commands available, font and paths.
fctx font my.ttf my.ffont [0-9:APM] for example will create a font with the glyphs 0-9, colon, and the letters A, P, and M.
fctx paths my.svg paths will create an .fpath file in the paths directory for each path element found in my.svg. The output file name will be taken from the id of the path element.
Improvements to the functionality and ergonomics of the tool will be driven by my own usage and the feedback I get here.
Haha, I suppose it does. Does pebble-fctx-compiler require the paths to be in defs? It’s been so long since I used it. When I got back into watch coding recently, I just made a new tool because I had it with javascript.
I must have thought that made sense for some reason at the time.
Anyway, please let me know if there are workflows that make sense for you that I could support.
I think it would make more sense to just take any path element in the regular svg body instead. Though this tould be a breaking change, I suppose. Maybe add an argument that lets you specify the parent element or something like that?
So are you meaning you only want some of the paths in the file to be converted, and you would have those grouped together under a parent element/layer? I could do something like that, yeah.
Yeah. This would also let it be backwards-compatible with the old compiler, since you’d be able to specify the defs tag as the parent tag to replicate the old behaviour.
Oh awesome! I saw there’s a note about AA not working on routd in BW mode. The Round wasn’t retdering properly specifically when I turned off AA in colour mode on the Round. I just switched to using AA, so you’rl have to turn that off again to see the rendering bug.
Ohhh…. okay. I was just trying to figure out why I didn’t see the glitch when I built your code. I hadn’t caught that detail that you were using bi-level rendering on the color screen. That makes a lot more sense now. I just assumed color == anti-aliasing because why wouldn’t you? Actually, why didn’t you? Meaning, I’m curious why you didn’t want to use anti-aliasing.
Anyway, this gives me a much better idea what is going on. If I recall, clipping in the bi-level renderer was more complex because there are 8 pixels in every byte and the edges of the round display cut between byte boundaries, so I just punted on that work. I’ll go take a look and re-educate myself and see if I think I can get it working.
I originally turned it off because I didn’t have any overlap in the different colours of my SVG so it made holes in the graphic so instead of adding a little bit of overlap I decided it wasn’t a problem for now and turned off AA lol
Ahhh I see. I saw the warning about BW mode on Round in the readme, but I thought that meat there was a separate mode that only rendered in black and white