Skip to content

pygame-ce‘s freetypeFont seems not support ’escape character‘ ? #3469

Open
@YeWenxuan64

Description

@YeWenxuan64

it happened when i want to render a string like f'test \n test2' or other string has ’escape character‘.
it can not wrap to another line.............. and displays an error character.

env: arrch64 (rk3588soc), debian12, python3.11.2, pygame-ce 2.5.4
code like:

import pygame
import pygame.freetype

pygame.init()
pygame.freetype.init()

pg_font = pygame.freetype.Font('./path/to/font.ttf')

screen = pygame.display.set_mode((1920, 1080))

pg_font.render_to(screen, (960, 540), f'test \n test2', (255,255,255), size=24)

pygame.display.flip()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions