Insert image in label text

Is there any screenshot that you can provide so that we can better understand what you exactly want to do?

This will not work.

I have tried this in past to do like this, but not succeed.

You can only insert emojiā€™s that are available in keyboard emoji directory.

And also

I want to create a label who contain information like thisImmagine
with symbols (made by me) and part of text with different color.

This :point_down: is the closest that I could try. of-course the heart emoji color or font color is different(compared to snapshot you provided).
The font color can be changed to what you like but you cannot change the heart emoji color.(You can try to adjust & keep image component and label side-by-side in a horizontal arrangement and then load the desired image in the image component)


This all is done using HTML :wink:

I understand, unfortunately I need certain symbols and not emojis.
Did you say that you can also use HTML in the label text, right? Do you know if there is a way to recall an image for example via the img tag or similar things? Maybe recalling the image directly from the app as a ā€œfileā€?

Yes by enabling the HTML property of label.

img tag is not possible in Kodular

See here :point_down: to know what tags you can use in Kodular

1 Like

Ok thank you, Iā€™ll try to read it as soon as possible :slight_smile:

1 Like

Nothing to do, there isnā€™t a method with HTML for do that.
RIP

Use a webviewer component instead of a label. Give it the size of the label you need and make a little html page to display all you want in this ā€œfakeā€ label.

1 Like

Nice Idea, but thereā€™s a problem.
With my app allow the user to input the text in the label, using ā€œkey wordsā€ with symbols before save in gallery their creation.
With a webviewer is possible to do this? or is only a ā€œwindowā€ where a portion of my html page is visible and unchanging?

I donā€™t know how familiar you are with HTML , but you can make a page that accepts strings thru GET or POST methods. Example mypage.html?string1=Andrea&string2=Petricola.
Then use string1 and string2 separately inside the html to format your fake label anyway you want.

A more practical solution will be to create some sort of template for your fake label with image and label components inside an arrangement. This is an example, you will place the components according to your needs, of course.

ok wait, Iā€™m not familiar with HTML up to this point unfortunately, but you are telling me that if, for example, I created an HTML page that contains a list of images that can be recalled via a string, I can simply ā€œreplaceā€ a portion of text with this string to display the image in the label?

Example:
ā€œI Love The Sea.ā€

would become, replacing ā€œSeaā€:

ā€œI Love the ā€˜string that displays the imageā€™.ā€

is this correct or am i wrong?

Actually, I made a mistake. To read the string passed to the little html page you will need a PHP server, which is not available in the webviewer.

However, If all you need is to have little icons at the beggining of a sentence, the best solution for your problem is to use a font that has those icons incorporated.

There is no such font, because I create the icons directly.
Is there a way to insert icons that I create inside a specific font?

Yes, not an easy task but doable for sure. You can use Fontforge to create or modify your own font file.

Great! I try immediately, although difficult I want to be able to insert those icons.
I also know what type of font to modify.
Thanks so much!

1 Like

Apparently there seems to be no solution.
With FontLab (another program who create and modify fonts) I tried to insert my icons in a totally new font, instead of not useful symbols inside the label text.
on the PC they see PERFECTLY, just as I wanted ā€¦ but in the app and also in the companion the icons are converted to SVG in black and white.
And if I try to insert colored SVG icons in the font, they are not displayed in the least.
I donā€™t know what else to do.

1 Like

@Italo had a great idea

and concerning this

why donā€™t you just use a textbox and then pass the entered text to the webviewer to display it?

Taifun

1 Like

As a last resource, maybe you can ask extensions developers if they can come up with a label component capable of doing what you need. It may not be free though.
But if I were you, I think I would have to find an alternative way of displaying your information using what it is available in Kodular. Adapt your app to Kodular posibilities, and not the other way around.