# SDL\_ttf: Make the fallback fonts use the same \`ascent\` value as the main font

**URL:** <https://discourse.libsdl.org/t/sdl-ttf-make-the-fallback-fonts-use-the-same-ascent-value-as-the-main-font/69586>\
**Category:** SDL Commits\
**Created:** [October 17, 2026, 5:58pm UTC](https://discourse.libsdl.org/t/sdl-ttf-make-the-fallback-fonts-use-the-same-ascent-value-as-the-main-font/69586 "2026-10-17T17:58:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [October 17, 2026, 5:58pm UTC](https://discourse.libsdl.org/t/sdl-ttf-make-the-fallback-fonts-use-the-same-ascent-value-as-the-main-font/69586/1 "2026-10-17T17:58:28Z")

</div>

> <https://github.com/libsdl-org/SDL_ttf/commit/fc8d545f3bf2298c40f41fda5225eb6328fb85f6>

```diff
From fc8d545f3bf2298c40f41fda5225eb6328fb85f6 Mon Sep 17 00:00:00 2001
From: choyunjin <[EMAIL REDACTED]>
Date: Fri, 16 Oct 2026 00:47:11 +0900
Subject: [PATCH] Make the fallback fonts use the same `ascent` value as the
 main font

---
 src/SDL_ttf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index 0cca9cf8..b9653c69 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -3603,7 +3603,7 @@ static bool CollectGlyphs(TTF_Font *font, const char *text, size_t length, TTF_D
 
         // Compute positions
         pos->x = x + pos->x_offset;
- pos->y = y + F26Dot6(pos->font->ascent) - pos->y_offset;
+ pos->y = y + F26Dot6(font->ascent) - pos->y_offset;
         x += pos->x_advance;
         y += pos->y_advance;
 #if !TTF_USE_HARFBUZZ

```
