-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transformation erroneously replacing all overlay spaces to underscore #160
Comments
Hi Eduard, Can you please try using %20 instead of space and test Eg:
Thanks, |
Hi Aditi, Using Is this a particularity of the cloudinary's java sdk? |
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, |
Hi Aditi, using code:
|
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. |
Hi Aditi, I used TextLayer and it encodes text, but the issue is Cloudinary doesn't accept encoded font style. After changing the logic of this method to not replace space with the underscore and it's working fine. Thanks. |
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. |
Hi Aditi, I have opened a support ticket #133163. can you please check? Thanks. |
Hi @sagar-savaliya - Thanks for raising the ticket. I've just responded on there. |
Currently, Transformation class is replacing all spaces on parameters to underscore in this line:
cloudinary_java/cloudinary-core/src/main/java/com/cloudinary/Transformation.java
Line 723 in 738b328
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 asMy_Text_Content
.Example:
Results in:
The text was updated successfully, but these errors were encountered: