emilk / emilk/egui

Exact text scaling

Open
#7,664 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Is your feature request related to a problem? Please describe.**
It would be useful to have a way to draw scaled text, e.g. draw 12 point text at 3x its normal size. As far as I know, the best way to achieve something like this currently is to multiply the font size by the scale (as suggested in #3277), but that is clearly hacky and comes with a couple of issues, mainly that the text is not scaled precisely (i.e. the aspect ratio of the bounding boxes varies depending on the scale), and there is also a limit on how much you can scale before egui panics.

**Describe the solution you'd like**
Any way to be able to specify the scaling factor of text being drawn.

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; begin by tracing egui's text-drawing and font-size path, and review the existing workaround in #3277. Done means an API can accept a text scaling factor and scale text precisely without the current aspect-ratio drift or panic limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.