Skip to content

Draw calls will be increased a lot when using a custom font in Label (broken batching) #104537

@AllenDang

Description

@AllenDang

Tested versions

  • Reproducible in 4.4 stable

System information

macOS v15/windows 11

Issue description

A label control with lots of texts behave differently with custom font. With default font, draw call is 31, with custom font, draw call increased to 237.

Image

Image

Steps to reproduce

  1. Create a new project.
  2. Create a new 2d scene.
  3. Add a label and set lots of Chinese text.
  4. Run, in editor -> debugger -> monitor, and pick draw call, notice the total draw call is 31.
  5. Stop
  6. Set label's theme_override -> fonts to load a custom font
  7. Run, notice the total draw call increased to 237

Minimal reproduction project (MRP)

2d_batching_test.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions