Select to view content in your preferred language

Label adding unwanted weird symbol at the end

540
3
08-14-2023 01:06 AM
Labels (3)
ofirrosner
New Contributor III

Hello
im using Esri version 100.12

i noticed something weird, when i put the text "4 500,00\r\n Meow"  to a label like this

g.Attributes[LabelKey] = "4 500,00\r\n Meow"


resulting something along the line of

ofirrosner_0-1691999849097.png

when I remove the space between the 4 and 5("4500,00\r\n Meow")
OR I remove the \r("4500,00\n Meow")
the text appears just fine without the rectangle 

I tried to mess around with the LabelDefention properties but it didn't helped
I don't want to manipulate the string with, for example, .Replace() 
because it will hinder my performance

is there anyway around it?

0 Kudos
3 Replies
RichardShepherd
Esri Contributor

Hi, ofirrosner.

When Arcade reads the literal text "4 500,00\r\n Meow" it converts the \r and \n pairs of characters to the carriage-return and line-feed control characters. Labeling attempts to position these and have them rendered using the font requested (or closest font available).

My guess is that the \n line-feed is working as expected - inserting a break between the rows of text, but the \r isn't being ignored or used properly and the font is replacing it with a nodef glyph, often a square box or blank for symbols it doesn't know how to draw. (Although that looks a more chunky box than usual in your image)

Could you tell me what font you're using and I'll see if I can reproduce the problem.

0 Kudos
ofirrosner
New Contributor III

Hi RichardShepherd ,thank you for the quick answer

my symbol looks more chunky because i draw it in ms-paint(I cannot take screenshot from my live session)

anyway im currently using "Arial" i also tried "Times new roman" "Comic sans"  and "MS Gothic"  all yielded the same result

But when i change to "Calibri" it seems to solve the problem
but i prefer not to change the font

0 Kudos
RichardShepherd
Esri Contributor

Thanks for the font info.

I've not had any luck reproducing the extra symbol with Runtime back to 100.13 (100.12 is just beyond what I can easily set up) but I have a few more configurations to explore

0 Kudos