projects/guix·blob python-team · refs

23 lines · 921 B

1Both of these functions, TTF_FontFaceStyleName() and
2TTF_FontFaceFamilyName() return 'const char *'. Update variables to
3match expected returned type.
4
5Bug-Debian: http://bugs.debian.org/1015106
6
7Taken from https://lists.gnu.org/archive/html/bug-freedink/2022-07/msg00001.html
8--- a/src/gfx_fonts.cpp 1970-01-01 07:30:01.000000000 +0730
9+++ b/src/gfx_fonts.cpp 2025-11-02 14:12:38.939879534 +0800
10@@ -293,9 +293,9 @@
11 */
12 void setup_font(TTF_Font *font)
13 {
14- char *familyname = TTF_FontFaceFamilyName(font);
15+ const char *familyname = TTF_FontFaceFamilyName(font);
16 if(familyname)
17 log_info("The family name of the face in the font is: %s", familyname);
18- char *stylename = TTF_FontFaceStyleName(font);
19+ const char *stylename = TTF_FontFaceStyleName(font);
20 if(stylename)
21 log_info("The name of the face in the font is: %s", stylename);
22 log_info("The font max height is: %d", TTF_FontHeight(font));
23