@@ -196,6 +196,7 @@ procedure TTF_ByteSwappedUNICODE(swapped: TSDL_bool); cdecl;
196
196
* \since This function is available since SDL_ttf 2.0.12.
197
197
*
198
198
* \sa TTF_Quit
199
+ * \sa TTF_WasInit
199
200
}
200
201
function TTF_Init (): cint; cdecl;
201
202
external TTF_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _TTF_Init' { $ENDIF} { $ENDIF} ;
@@ -252,15 +253,15 @@ function TTF_OpenFontIndex(file_: PAnsiChar; ptsize: cint; index: clong): PTTF_F
252
253
* size becomes the index of choosing which size. If the value is too high,
253
254
* the last indexed size will be the default.
254
255
*
255
- * If `freesrc` is non-zero, the RWops will be closed before returning,
256
- * whether this function succeeds or not. SDL_ttf reads everything it needs
257
- * from the RWops during this call in any case .
256
+ * If `freesrc` is non-zero, the RWops will be automatically closed once the
257
+ * font is closed. Otherwise you should close the RWops yourself after closing
258
+ * the font .
258
259
*
259
260
* When done with the returned TTF_Font, use TTF_CloseFont() to dispose of it.
260
261
*
261
262
* \param src an SDL_RWops to provide a font file's data.
262
- * \param freesrc non-zero to close the RWops before returning , zero to leave
263
- * it open.
263
+ * \param freesrc non-zero to close the RWops when the font is closed , zero to
264
+ * leave it open.
264
265
* \param ptsize point size to use for the newly-opened font.
265
266
* \returns a valid TTF_Font, or nil on error.
266
267
*
@@ -278,9 +279,9 @@ function TTF_OpenFontRW(src: PSDL_RWops; freesrc: cint; ptsize: cint): PTTF_Font
278
279
* size becomes the index of choosing which size. If the value is too high,
279
280
* the last indexed size will be the default.
280
281
*
281
- * If `freesrc` is non-zero, the RWops will be closed before returning,
282
- * whether this function succeeds or not. SDL_ttf reads everything it needs
283
- * from the RWops during this call in any case .
282
+ * If `freesrc` is non-zero, the RWops will be automatically closed once the
283
+ * font is closed. Otherwise you should close the RWops yourself after closing
284
+ * the font .
284
285
*
285
286
* Some fonts have multiple "faces" included. The index specifies which face
286
287
* to use from the font file. Font files with only one face should specify
@@ -289,8 +290,8 @@ function TTF_OpenFontRW(src: PSDL_RWops; freesrc: cint; ptsize: cint): PTTF_Font
289
290
* When done with the returned TTF_Font, use TTF_CloseFont() to dispose of it.
290
291
*
291
292
* \param src an SDL_RWops to provide a font file's data.
292
- * \param freesrc non-zero to close the RWops before returning , zero to leave
293
- * it open.
293
+ * \param freesrc non-zero to close the RWops when the font is closed , zero to
294
+ * leave it open.
294
295
* \param ptsize point size to use for the newly-opened font.
295
296
* \param index index of the face in the font file.
296
297
* \returns a valid TTF_Font, or nil on error.
@@ -364,15 +365,15 @@ function TTF_OpenFontIndexDPI(file_: PAnsiChar; ptsize: cint; index: clong; hdpi
364
365
* size becomes the index of choosing which size. If the value is too high,
365
366
* the last indexed size will be the default.
366
367
*
367
- * If `freesrc` is non-zero, the RWops will be closed before returning,
368
- * whether this function succeeds or not. SDL_ttf reads everything it needs
369
- * from the RWops during this call in any case .
368
+ * If `freesrc` is non-zero, the RWops will be automatically closed once the
369
+ * font is closed. Otherwise you should close the RWops yourself after closing
370
+ * the font .
370
371
*
371
372
* When done with the returned TTF_Font, use TTF_CloseFont() to dispose of it.
372
373
*
373
374
* \param src an SDL_RWops to provide a font file's data.
374
- * \param freesrc non-zero to close the RWops before returning , zero to leave
375
- * it open.
375
+ * \param freesrc non-zero to close the RWops when the font is closed , zero to
376
+ * leave it open.
376
377
* \param ptsize point size to use for the newly-opened font.
377
378
* \param hdpi the target horizontal DPI.
378
379
* \param vdpi the target vertical DPI.
@@ -394,9 +395,9 @@ function TTF_OpenFontDPIRW(src: PSDL_RWops; freesrc: cint; ptsize: cint; hdpi: c
394
395
* size becomes the index of choosing which size. If the value is too high,
395
396
* the last indexed size will be the default.
396
397
*
397
- * If `freesrc` is non-zero, the RWops will be closed before returning,
398
- * whether this function succeeds or not. SDL_ttf reads everything it needs
399
- * from the RWops during this call in any case .
398
+ * If `freesrc` is non-zero, the RWops will be automatically closed once the
399
+ * font is closed. Otherwise you should close the RWops yourself after closing
400
+ * the font .
400
401
*
401
402
* Some fonts have multiple "faces" included. The index specifies which face
402
403
* to use from the font file. Font files with only one face should specify
@@ -405,8 +406,8 @@ function TTF_OpenFontDPIRW(src: PSDL_RWops; freesrc: cint; ptsize: cint; hdpi: c
405
406
* When done with the returned TTF_Font, use TTF_CloseFont() to dispose of it.
406
407
*
407
408
* \param src an SDL_RWops to provide a font file's data.
408
- * \param freesrc non-zero to close the RWops before returning , zero to leave
409
- * it open.
409
+ * \param freesrc non-zero to close the RWops when the font is closed , zero to
410
+ * leave it open.
410
411
* \param ptsize point size to use for the newly-opened font.
411
412
* \param index index of the face in the font file.
412
413
* \param hdpi the target horizontal DPI.
@@ -670,10 +671,10 @@ function TTF_FontDescent(font: PTTF_Font): cint; cdecl;
670
671
external TTF_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _TTF_FontDescent' { $ENDIF} { $ENDIF} ;
671
672
672
673
{ *
673
- * Query the recommended spacing between lines of text for a font.
674
+ * Query the spacing between lines of text for a font.
674
675
*
675
676
* \param font the font to query.
676
- * \returns the font's recommended spacing.
677
+ * \returns the font's line spacing.
677
678
*
678
679
* \since This function is available since SDL_ttf 2.0.12.
679
680
}
@@ -956,9 +957,9 @@ function TTF_SizeUNICODE(font: PTTF_Font; text: pcuint16; w: pcint; h: pcint): c
956
957
* \param font the font to query.
957
958
* \param text text to calculate, in Latin1 encoding.
958
959
* \param measure_width maximum width, in pixels, available for the string.
960
+ * \param extent on return, filled with latest calculated width.
959
961
* \param count on return, filled with number of characters that can be
960
962
* rendered.
961
- * \param extent on return, filled with latest calculated width.
962
963
* \returns 0 if successful, -1 on error.
963
964
*
964
965
* \since This function is available since SDL_ttf 2.0.18.
@@ -981,9 +982,9 @@ function TTF_MeasureText(font: PTTF_Font; text: PAnsiChar; measure_width: cint;
981
982
* \param font the font to query.
982
983
* \param text text to calculate, in UTF-8 encoding.
983
984
* \param measure_width maximum width, in pixels, available for the string.
985
+ * \param extent on return, filled with latest calculated width.
984
986
* \param count on return, filled with number of characters that can be
985
987
* rendered.
986
- * \param extent on return, filled with latest calculated width.
987
988
* \returns 0 if successful, -1 on error.
988
989
*
989
990
* \since This function is available since SDL_ttf 2.0.18.
@@ -1011,9 +1012,9 @@ function TTF_MeasureUTF8(font: PTTF_Font; text: PAnsiChar; measure_width: cint;
1011
1012
* \param font the font to query.
1012
1013
* \param text text to calculate, in UCS-2 encoding.
1013
1014
* \param measure_width maximum width, in pixels, available for the string.
1015
+ * \param extent on return, filled with latest calculated width.
1014
1016
* \param count on return, filled with number of characters that can be
1015
1017
* rendered.
1016
- * \param extent on return, filled with latest calculated width.
1017
1018
* \returns 0 if successful, -1 on error.
1018
1019
*
1019
1020
* \since This function is available since SDL_ttf 2.0.18.
@@ -1312,6 +1313,7 @@ function TTF_RenderGlyph32_Solid(font: PTTF_Font; ch: cuint32; fg: TSDL_Color):
1312
1313
* \param font the font to render with.
1313
1314
* \param text text to render, in Latin1 encoding.
1314
1315
* \param fg the foreground color for the text.
1316
+ * \param bg the background color for the text.
1315
1317
* \returns a new 8-bit, palettized surface, or nil if there was an error.
1316
1318
*
1317
1319
* \since This function is available since SDL_ttf 2.0.12.
@@ -1343,6 +1345,7 @@ function TTF_RenderText_Shaded(font: PTTF_Font; text: PAnsiChar; fg: TSDL_Color;
1343
1345
* \param font the font to render with.
1344
1346
* \param text text to render, in UTF-8 encoding.
1345
1347
* \param fg the foreground color for the text.
1348
+ * \param bg the background color for the text.
1346
1349
* \returns a new 8-bit, palettized surface, or nil if there was an error.
1347
1350
*
1348
1351
* \since This function is available since SDL_ttf 2.0.12.
@@ -1378,6 +1381,7 @@ function TTF_RenderUTF8_Shaded(font: PTTF_Font; text: PAnsiChar; fg: TSDL_Color;
1378
1381
* \param font the font to render with.
1379
1382
* \param text text to render, in UCS-2 encoding.
1380
1383
* \param fg the foreground color for the text.
1384
+ * \param bg the background color for the text.
1381
1385
* \returns a new 8-bit, palettized surface, or nil if there was an error.
1382
1386
*
1383
1387
* \since This function is available since SDL_ttf 2.0.12.
@@ -1411,6 +1415,7 @@ function TTF_RenderUNICODE_Shaded(font: PTTF_Font; text: pcuint16; fg: TSDL_Colo
1411
1415
* \param font the font to render with.
1412
1416
* \param text text to render, in Latin1 encoding.
1413
1417
* \param fg the foreground color for the text.
1418
+ * \param bg the background color for the text.
1414
1419
* \returns a new 8-bit, palettized surface, or nil if there was an error.
1415
1420
*
1416
1421
* \since This function is available since SDL_ttf 2.0.18.
@@ -1440,6 +1445,7 @@ function TTF_RenderText_Shaded_Wrapped(font: PTTF_Font; text: PAnsiChar; fg: TSD
1440
1445
* \param font the font to render with.
1441
1446
* \param text text to render, in UTF-8 encoding.
1442
1447
* \param fg the foreground color for the text.
1448
+ * \param bg the background color for the text.
1443
1449
* \returns a new 8-bit, palettized surface, or nil if there was an error.
1444
1450
*
1445
1451
* \since This function is available since SDL_ttf 2.0.18.
@@ -1476,6 +1482,7 @@ function TTF_RenderUTF8_Shaded_Wrapped(font: PTTF_Font; text: PAnsiChar; fg: TSD
1476
1482
* \param font the font to render with.
1477
1483
* \param text text to render, in UCS-2 encoding.
1478
1484
* \param fg the foreground color for the text.
1485
+ * \param bg the background color for the text.
1479
1486
* \returns a new 8-bit, palettized surface, or nil if there was an error.
1480
1487
*
1481
1488
* \since This function is available since SDL_ttf 2.0.18.
@@ -1674,6 +1681,9 @@ function TTF_RenderUNICODE_Blended(font: PTTF_Font; text: pcuint16; fg: TSDL_Col
1674
1681
* \param font the font to render with.
1675
1682
* \param text text to render, in Latin1 encoding.
1676
1683
* \param fg the foreground color for the text.
1684
+ * \param wrapLength the text is wrapped to multiple lines on line endings and
1685
+ * on word boundaries if it extends beyond this value in
1686
+ * pixels.
1677
1687
* \returns a new 32-bit, ARGB surface, or nil if there was an error.
1678
1688
*
1679
1689
* \since This function is available since SDL_ttf 2.0.18.
@@ -1702,6 +1712,9 @@ function TTF_RenderText_Blended_Wrapped(font: PTTF_Font; text: PAnsiChar; fg: TS
1702
1712
* \param font the font to render with.
1703
1713
* \param text text to render, in UTF-8 encoding.
1704
1714
* \param fg the foreground color for the text.
1715
+ * \param wrapLength the text is wrapped to multiple lines on line endings and
1716
+ * on word boundaries if it extends beyond this value in
1717
+ * pixels.
1705
1718
* \returns a new 32-bit, ARGB surface, or nil if there was an error.
1706
1719
*
1707
1720
* \since This function is available since SDL_ttf 2.0.18.
@@ -1737,6 +1750,9 @@ function TTF_RenderUTF8_Blended_Wrapped(font: PTTF_Font; text: PAnsiChar; fg: TS
1737
1750
* \param font the font to render with.
1738
1751
* \param text text to render, in UCS-2 encoding.
1739
1752
* \param fg the foreground color for the text.
1753
+ * \param wrapLength the text is wrapped to multiple lines on line endings and
1754
+ * on word boundaries if it extends beyond this value in
1755
+ * pixels.
1740
1756
* \returns a new 32-bit, ARGB surface, or nil if there was an error.
1741
1757
*
1742
1758
* \since This function is available since SDL_ttf 2.0.18.
@@ -2108,6 +2124,7 @@ function TTF_RenderUNICODE(font: PTTF_Font; text: pcuint16; fg, bg: TSDL_Color):
2108
2124
*
2109
2125
* \since This function is available since SDL_ttf 2.0.12.
2110
2126
*
2127
+ * \sa TTF_OpenFont
2111
2128
* \sa TTF_OpenFontIndexDPIRW
2112
2129
* \sa TTF_OpenFontRW
2113
2130
* \sa TTF_OpenFontDPI
0 commit comments