Skip to content

Conversation

@halx99
Copy link
Collaborator

@halx99 halx99 commented Aug 8, 2025

shouldn't modify config->faceSize inside getFontAtlasTTF

Describe your changes

Issue ticket number and link

Checklist before requesting a review

For each PR

  • Add Copyright if it missed:
    - "Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."

  • I have performed a self-review of my code.

    Optional:

    • I have checked readme and add important infos to this PR.
    • I have added/adapted some tests too.

For core/new feature PR

  • I have checked readme and add important infos to this PR.
  • I have added thorough tests.

Axmol 3.x ------------------------------------------------------------

For each 3.x PR

  • Check the '#include "axmol.h"' and replace it with the needed headers.

shouldn't modify config->faceSize inside getFontAtlasTTF
@halx99 halx99 added this to the 2.8.0 milestone Aug 8, 2025
@halx99 halx99 added the bug Something isn't working label Aug 8, 2025
@halx99 halx99 linked an issue Aug 8, 2025 that may be closed by this pull request
@halx99 halx99 changed the title Fix SDF font atlas cache Fix incorrect FontAtlas when switching label rendering mode from normal to SDF Aug 8, 2025
@aismann
Copy link
Contributor

aismann commented Aug 8, 2025

@halx99
Test with together with the "size" PR>

Works correct now, only one issue is still there:

if the ouline size raising there is a point which change the outline size in a wrong direction?

image image

@halx99
Copy link
Collaborator Author

halx99 commented Aug 8, 2025

Following message is from AI:

🎯 Recommended outlineSize Range for SDF Rendering

Use Case Suggested Maximum Range Notes
UI text rendering 1.0 – 5.0 Keeps edges sharp; ideal for buttons, labels, and interface elements
Headings or large fonts 5.0 – 10.0 Allows thicker outlines; watch for blur or aliasing
Special effects (e.g. glow, stroke) 10.0 – 20.0 Good for visual effects; may require shader optimization
Extreme or experimental effects >20.0 Can cause distortion or performance issues; use with caution

@aismann
Copy link
Contributor

aismann commented Aug 8, 2025

Following message is from AI:

🎯 Recommended outlineSize Range for SDF Rendering

Use Case Suggested Maximum Range Notes
UI text rendering 1.0 – 5.0 Keeps edges sharp; ideal for buttons, labels, and interface elements
Headings or large fonts 5.0 – 10.0 Allows thicker outlines; watch for blur or aliasing
Special effects (e.g. glow, stroke) 10.0 – 20.0 Good for visual effects; may require shader optimization
Extreme or experimental effects >20.0 Can cause distortion or performance issues; use with caution

Should be on the wiki page

@halx99
Copy link
Collaborator Author

halx99 commented Aug 8, 2025

Following message is from AI:

🎯 Recommended outlineSize Range for SDF Rendering

Use Case Suggested Maximum Range Notes
UI text rendering 1.0 – 5.0 Keeps edges sharp; ideal for buttons, labels, and interface elements
Headings or large fonts 5.0 – 10.0 Allows thicker outlines; watch for blur or aliasing
Special effects (e.g. glow, stroke) 10.0 – 20.0 Good for visual effects; may require shader optimization
Extreme or experimental effects >20.0 Can cause distortion or performance issues; use with caution

Should be on the wiki page

sure

@halx99 halx99 merged commit 763b6af into dev Aug 8, 2025
15 checks passed
@halx99 halx99 deleted the fix-sdf-atlas-cache branch August 8, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FontAtals incorrect when label switch rendering mode from normal to sdf

3 participants