You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Transformation erroneously replacing all overlay spaces to underscore #160
This is causing some issues, like when I try to use some font name that contains spaces (eg: Roboto Condensed), it replaces with underscores and the URL become invalid (because font is invalid). The same applies to text content (overlay), when using the text My Text Content it appears on final Image as My_Text_Content.
I used TextLayer and it encodes text, but the issue is Cloudinary doesn't accept encoded font style.
So I want to pass font style with space to Cloudinary but the library doesn't support that. it replaces space with an underscore.
After changing the logic of this method to not replace space with the underscore and it's working fine.
Can you please share your cloud name and I will be able to check further? I just tested a font file with space in between using the TextLayer class and it worked. Please add the format at the end of the overlay when accessing a custom font. TextLayer t=layer.text("Roboto Condensed.ttf_70_bold:My Text Content");
Another thing to check will be the name of the file should be the same as the uploaded file.
You can also open a support ticket and share the cloud name if privacy is a concern.
I have opened a support ticket #133163. can you please check?
Also, The issue is with the font name with space (i. e. Roboto Condensed) and not the font file.
Activity
aditimadan-Cloudinary commentedon Feb 9, 2019
Hi Eduard,
Can you please try using %20 instead of space and test
Eg:
Thanks,
Aditi
edumelzer commentedon Feb 9, 2019
Hi Aditi,
Using
%20works, thanks!Is this a particularity of the cloudinary's java sdk?
aditimadan-Cloudinary commentedon Feb 9, 2019
Hi Eduard,
That was a workaround. We also have a TextLayer class - that already handles all the encoding for you: https://github.com/cloudinary/cloudinary_java/blob/master/cloudinary-core/src/main/java/com/cloudinary/transformation/TextLayer.java
Example:
Thanks,
Aditi
sagar-savaliya commentedon Oct 15, 2020
Hi Aditi,
using
%20in text font style throws below error:Unknown text style - Roboto%20Condensed_48_LEFTcode:
aditimadan-Cloudinary commentedon Oct 15, 2020
Hi Sagar,
As I mentioned in my last response that using %20 was a workaround. You can use the TextLayer class that already handles all the encoding for you: https://github.com/cloudinary/cloudinary_java/blob/master/cloudinary-core/src/main/java/com/cloudinary/transformation/TextLayer.java. And if you still have any issues then please raise a support ticket here:https://support.cloudinary.com/hc/en-us/requests/new and share your cloud name so that I can check further.
sagar-savaliya commentedon Oct 16, 2020
Hi Aditi,
I used TextLayer and it encodes text, but the issue is Cloudinary doesn't accept encoded font style.
So I want to pass font style with space to Cloudinary but the library doesn't support that. it replaces space with an underscore.
After changing the logic of this method to not replace space with the underscore and it's working fine.
Thanks.
aditimadan-Cloudinary commentedon Oct 16, 2020
Hi Sagar,
Can you please share your cloud name and I will be able to check further? I just tested a font file with space in between using the TextLayer class and it worked. Please add the format at the end of the overlay when accessing a custom font.
TextLayer t=layer.text("Roboto Condensed.ttf_70_bold:My Text Content");Another thing to check will be the name of the file should be the same as the uploaded file.
You can also open a support ticket and share the cloud name if privacy is a concern.
sagar-savaliya commentedon Oct 17, 2020
Hi Aditi,
I have opened a support ticket #133163. can you please check?
Also, The issue is with the font name with space (i. e. Roboto Condensed) and not the font file.
Thanks.
aleksandar-cloudinary commentedon Oct 17, 2020
Hi @sagar-savaliya - Thanks for raising the ticket. I've just responded on there.