Need help with watermark

Hi All

Can I as for some help with watermarks please?
My understanding is that the watermarks use the same variables like the ones described here

https://docs.darktable.org/usermanual/4.8/en/special-topics/variables/

I have a few tags. They are in the following pattern

bb|places|europe|italy|rome

My desire is to take either “rome” or “italy”, likely capitalize the first symbol and place on a darker background - same as (or inspired by) the darktable.svg the demo watermark.

In my tag - it is either the last or second to the last but the depth can vary.

I would very much appreciate it if you can give me a hand with the formatting for the tag and if you can point me please where to locate darktable.svg

I will continue looking of course but thought to ask as someone may know it or have a template.

Thank you!
B

One down (the .svg)

The tag is still do do :thinking:

I think I found the next one

$(CATEGORY[2,bb|places]^) 

For me “bb|places” is the one that is the common ground.

I don’t think I can find how to capitalize every word. :disappointed:

The manual states, that bash-inspired string substitution for given variables is possible.
In Bash, ^ converts the first letter of a string to uppercase while ^^ converts all characters to uppercase.
So I think in your case a string substitution with

$(var^^)  

is the way to go. I didn’t try it out yet though

Edit: I just realized that you’re aming for first letter capitalization on multiple words. So my answer is of course not helpful. I’ll leave it here for future reference though

1 Like

If you can edit the SVG file, maybe you can do it with CSS using the property:

text-transform: capitalize;

I have done a test with the darktable.svg and Chrome by adding text-transform: lowercase; property to the text label for the text on the right bottom corner and it worked.

To help you to get the idea, I attached a screenshot as an example. As you can see the text on the bottom corner has been converted to lowercase.

Maybe it works also with Darktable, it depends on how it renders the SVG text-transform because I would say it is not a property of SVG but some browsers render it anyway.

— Update
Previous proposal was inspired by the darktable user manual - variables formatting section.

Following the markup link in that section, I saw that it supports the “text_transformation” (notice the underscore instead of dash) with the values ‘none’, ‘lowercase’, ‘uppercase’ or ‘capitalize’.

So, the text label could be something like this:

<text text_transformation="capitalize" ...> ... </text>

It should work.

Regards

1 Like

I played around a little bit and came up with the following simple solution for a simple-text watermark:

$(CATEGORY[2,bb|places]^) , $(CATEGORY[1,bb|places]^)

results in

Turns out easier as expected. What am I missing?

2 Likes

Here’s the same, applied to a modified version of the darktable.svg shipped with dt.

I am going to check this - Didn’t know that the .SVG can be edited.

Some towns are combination of 2 words.
Like “Saint-Tropez”

I think what a better approach is to have the tags capitalized properly (to start with) and then if needed - convert to all caps or all lowercase using the variables.

I still have to try what @rgo suggests. Even i resolve completely by renaming the tags (what I started actually) there are other entries that the capitalization can come handy.

Thank you all!