archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
973 stars 270 forks source link

Emojis do not renders properly in label properties #1041

Closed larchenkov closed 7 months ago

larchenkov commented 7 months ago

Version of Archi

5.2.0

Archi Plug-ins

coArchi

Operating System

MacOs Sonoma 14

Expected Behaviour

Fully rendered emoji in label properties (works only in element titles)

Actual Behaviour

image

Steps to Reproduce the Behaviour

  1. create element
  2. add emoji to propery
  3. add property to label , you will see partly rendered images
Phillipus commented 7 months ago

Yes, they are getting clipped by the Draw2d framework that is used to render text. I'm not sure if that's easily fixable.

A workaround is to use a label expression with a line break. For example:

${name}
(line break)

or:

${property:propertykey}
(line break)
larchenkov commented 7 months ago

Oh, well. Such an easy fix. Well ok. At least we can handle it with line break. Thanks

romualdrichard commented 7 months ago

Is there a list of emoji we can use?

jbsarrodie commented 7 months ago

Is there a list of emoji we can use?

You can use any emoji you want (knowing that several, if not most of them, will require you to add a newline to let it uncropped).

Phillipus commented 7 months ago

Such an easy fix

Not easy.

Archi uses a graphical framework Draw2D which is rather old. A text control's height is calculated on the basis of the font's metrics, not on an emoji (which didn't exist when Draw2d was first developed).

Phillipus commented 7 months ago

This is Mac only, emojis render OK on Windows.

I opened an issue on the Eclipse repo - https://github.com/eclipse/gef-classic/issues/414

Phillipus commented 7 months ago

I'm closing this issue as it's been reported https://github.com/eclipse/gef-classic/issues/414