pygame-community / pygame-ce

🐍🎼 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
862 stars 141 forks source link

freetype.Font.render should also support newlines #2735

Open denilsonsa opened 7 months ago

denilsonsa commented 7 months ago

I see that pygame.font.Font.render supports newlines since pygame-ce-2.1.4.

However, pygame.freetype.Font.render doesn't seem to support it. (I haven't tested, I'm assuming based on the documentation.) I believe the FreeType module should also be updated to have roughly the same features as the Font module.

oddbookworm commented 7 months ago

You’ve actually got the idea backward. The font module is intended to replace freetype iirc. Same as draw is intended to replace gfxdraw eventually

denilsonsa commented 7 months ago

But with the FreeType module I can get extra information about the font (such as family, and subfamily variant), while that info isn't available on the Font module.

(Please note I have limited connectivity these days and I can't double-check what I'm saying. I just wanted to give you a response as quickly as possible. Please forgive me for mistakes.)

On Mon, Mar 4, 2024, 05:25 Andrew Coffey @.***> wrote:

You’ve actually got the idea backward. The font module is intended to replace freetype iirc. Same as draw is intended to replace gfxdraw eventually

MyreMylar commented 7 months ago

Yes, we are trying to add the missing features you mention to font rather than the other way around.

On Mon, 4 Mar 2024, 14:38 Denilson SĂĄ Maia, @.***> wrote:

But with the FreeType module I can get extra information about the font (such as family, and subfamily variant), while that info isn't available on the Font module.

(Please note I have limited connectivity these days and I can't double-check what I'm saying. I just wanted to give you a response as quickly as possible. Please forgive me for mistakes.)

On Mon, Mar 4, 2024, 05:25 Andrew Coffey @.***> wrote:

You’ve actually got the idea backward. The font module is intended to replace freetype iirc. Same as draw is intended to replace gfxdraw eventually

— Reply to this email directly, view it on GitHub https://github.com/pygame-community/pygame-ce/issues/2735#issuecomment-1976728983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGDGGUAKFRZHZ3SXVFSH4LYWSBMRAVCNFSM6AAAAABEERTLNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWG4ZDQOJYGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>