bevyengine / bevyengine/bevy

`FontSize` implements `Component` but does not function when used as a component

Open
#25,385 0 comments 1 reaction 0 assignees View on GitHub
A-Text A-UI C-Bug S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version and features

version = 0.19.0
features = ["2d", "audio", "debug", "ui"]

## What went wrong

`FontSize` is a `Component`, but it doesn't work when attached to an entity. Instead, it only works when it is set on the `font_size` field of `TextFont`.

I think the easiest solution is to remove `Component` from the derives of `FontSize`, but I'm not sure whether `TextFont` is being split up into components.

Contributor guide

Open the contributing guide

Research direction

Locate the definitions and derives for FontSize and TextFont, then reproduce the issue by attaching FontSize to an entity rather than setting TextFont.font_size. Check the surrounding text component design and existing tests to determine whether FontSize should be removable as a Component or independently functional; done means the intended usage is consistent and covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.