Skip to content
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

Text entity display breaks if content overflows entity dimensions #583

Closed
Zetaphor opened this issue Aug 20, 2023 · 6 comments · Fixed by #937
Closed

Text entity display breaks if content overflows entity dimensions #583

Zetaphor opened this issue Aug 20, 2023 · 6 comments · Fixed by #937
Assignees
Labels
bug Something isn't working NLnet

Comments

@Zetaphor
Copy link
Contributor

If the text content of a text entity is longer than the text entity the text just fails to render, instead of overflowing and clipping.

Example:
image

Add another character (content should be "aaaaaa"):
image

Exported test entity:

{
  "DataVersion": 0,
  "Entities": [
    {
    "id": "{895ad5d1-2f7f-42c1-a115-66c11f69806a}",
    "type": "Text",
    "lastEdited": 1692549024403436,
    "name": "Breaking text demo",
    "dimensions": {
        "x": 0.6499999761581421,
        "y": 0.5,
        "z": 0.009999999776482582
    },
    "rotation": {
        "x": -0.0000457763671875,
        "y": -0.9981689453125,
        "z": -0.0000152587890625,
        "w": 0.060715675354003906
    },
    "created": 1692548197153729,
    "lastEditedBy": "{01e4625a-ead3-4d8f-987b-36508edfa8a2}",
    "queryAACube": {
        "x": -0.41006097197532654,
        "y": -0.41006097197532654,
        "z": -0.41006097197532654,
        "scale": 0.8201219439506531
    },
    "grab": {
        "grabbable": false,
        "equippableLeftRotation": {
            "x": -0.0000152587890625,
            "y": -0.0000152587890625,
            "z": -0.0000152587890625,
            "w": 1
        },
        "equippableRightRotation": {
            "x": -0.0000152587890625,
            "y": -0.0000152587890625,
            "z": -0.0000152587890625,
            "w": 1
        }
    },
    "damping": 0,
    "angularDamping": 0,
    "text": "aaaaaa",
    "lineHeight": 0.2409999966621399,
    "textColor": {
        "red": 0,
        "green": 255,
        "blue": 55
    },
    "textEffect": "outline fill",
    "textEffectColor": {
        "red": 212,
        "green": 66,
        "blue": 212
    },
    "textEffectThickness": 0.47999998927116394,
    "alignment": "center",
    "clientOnly": false,
    "avatarEntity": false,
    "localEntity": false,
    "faceCamera": false,
    "isFacingAvatar": false
}
    ],
  "Id": "{6540433f-928f-4d40-83d6-f6400164c5c7}",
  "Version": 133
}
@AleziaKurdis
Copy link
Contributor

Not really a bug, but more an enhancement request. (Since this is the current behavior since day 0)

I agree, it always been a bit annoying.

@Zetaphor
Copy link
Contributor Author

Zetaphor commented Aug 20, 2023

I understand it may have been historically broken, but I'd still call that broken and thus a bug. Semantics aside, it's a very jarring behavior.

I only discovered it through experimentation, initially I thought the text entity was just non-functional as I started by entering text that was too large for the dimensions.

@AleziaKurdis
Copy link
Contributor

AleziaKurdis commented Aug 20, 2023

It's precisely what I meant by "a bit annoying." ;-)
it doesn't help new people.

@vegaslon
Copy link
Contributor

The original solution for this was to use https://apidocs.overte.org/Entities.html#.textSize

@keeshii
Copy link
Contributor

keeshii commented Aug 21, 2023

The other behavior that is annoying is auto-trim. If we set text

"

Abc

"

It is automatically transformed into "Abc". But not sure if it is a good idea to change any of that.

@AleziaKurdis
Copy link
Contributor

You might need \n to force those lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NLnet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants