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: Handle negative indent properly #19059

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Dec 24, 2024

This PR fixes handling negative indent:

  • There seems to be an error in the documentation, as indent in DefineEditText should be signed (SI16).
  • When read from DefineEditText, the indent should be rounded to whole pixels.
  • Flash does not allow negative alignment offset. Which means that negative indent will be ignored, unless there's a margin defined.

The documentation says that indent is UI16,
in reality it seems to be SI16.
@kjarosh kjarosh added text Issues relating to text rendering/input A-core Area: Core player, where no other category fits T-fix Type: Bug fix (in something that's supposed to work already) labels Dec 24, 2024
Flash seems to ignore negative alignment offset:
* for negative indent, it's 0,
* for indent=-4, margin=8, it's 4.
Flash does not support non-integer values (in pixels)
of the indent when defined in the tag itself.
This test verifies the behavior of indent when
defined directly in the SWF tag.
@kjarosh kjarosh added the waiting-on-review Waiting on review from a Ruffle team member label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core player, where no other category fits T-fix Type: Bug fix (in something that's supposed to work already) text Issues relating to text rendering/input waiting-on-review Waiting on review from a Ruffle team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bejeweled Twist -- Tips text not showing up
1 participant