Skip to content

akarin.Text: Support float precision formatting syntax (e.g. {MyFrameProp:.4f} - #24

Merged
sgt0 merged 2 commits into
Jaded-Encoding-Thaumaturgy:masterfrom
n00mkrad:float-format
Jun 23, 2026
Merged

akarin.Text: Support float precision formatting syntax (e.g. {MyFrameProp:.4f}#24
sgt0 merged 2 commits into
Jaded-Encoding-Thaumaturgy:masterfrom
n00mkrad:float-format

Conversation

@n00mkrad

@n00mkrad n00mkrad commented Jun 20, 2026

Copy link
Copy Markdown

Allows usage of :.<n>f suffix for specifying how many decimal places to show when using akarin.Text, just like in regular f-strings.

Disclaimer

This was made almost entirely using LLMs, under my guidance and supervision.

Tested to be working, compiles on all platforms. However if you do not want to accept LLM code, feel free to reject this PR. I primarily did this because it was a feature I wanted personally.

@sgt0
sgt0 self-requested a review June 20, 2026 02:14
@sgt0

sgt0 commented Jun 20, 2026

Copy link
Copy Markdown
Member

Kinda an edge case, but when there's a missing prop, this misinterprets the fill dot as precision.

set_output(clip.akarin.Text("Test: {x.DoesNotExist:.>10d}"))

Before this change:

image

After this change:

image

@n00mkrad

Copy link
Copy Markdown
Author

Pushes a commit that should retain the old behavior

@sgt0
sgt0 merged commit 87c5a18 into Jaded-Encoding-Thaumaturgy:master Jun 23, 2026
12 checks passed
@sgt0

sgt0 commented Jun 23, 2026

Copy link
Copy Markdown
Member

thank you!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants