Skip to content

avm2: Small text_block.rs apply_format cleanup - #24306

Closed
evilpie wants to merge 1 commit into
ruffle-rs:masterfrom
evilpie:apply_format
Closed

avm2: Small text_block.rs apply_format cleanup#24306
evilpie wants to merge 1 commit into
ruffle-rs:masterfrom
evilpie:apply_format

Conversation

@evilpie

@evilpie evilpie commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Description

I think this makes the code easier to understand and shorter, but opinions might differ of course.

Testing

No functional change.

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

@evilpie evilpie added the T-refactor Type: Refactor / Cleanup label Jul 26, 2026
Comment thread core/src/avm2/globals/flash/text/engine/text_block.rs Outdated
(None, None, None, true)
};
let fd = ef.font_description();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it's easier to understand what's going on if all of the properties (font, bold, italic, is_device_font) are separate variables, but either way is much simpler than what the code currently is

@Lord-McSweeney Lord-McSweeney added A-avm2 Area: AVM2 (ActionScript 3) fte/tlf Issues relating to the FTE (Flash Text Engine) AVM2 API or the TLF (Text Layout Framework) library labels Jul 26, 2026
@evilpie
evilpie enabled auto-merge (rebase) July 26, 2026 12:41
@evilpie
evilpie disabled auto-merge July 26, 2026 12:58
@evilpie
evilpie enabled auto-merge (rebase) July 26, 2026 12:59
@evilpie

evilpie commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

The code here changed so much, there isn't much point in keep this open.

@evilpie evilpie closed this Aug 2, 2026
auto-merge was automatically disabled August 2, 2026 12:23

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm2 Area: AVM2 (ActionScript 3) fte/tlf Issues relating to the FTE (Flash Text Engine) AVM2 API or the TLF (Text Layout Framework) library T-refactor Type: Refactor / Cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants