Jump to content

Better font scaling?


vanfanel

Recommended Posts

Hi there,

I have been using GEMRB on GNU/Linux for years now, happily on PC and Raspberry Pi. I have always used it with the SDL2 video plugin and no OpenGL (SDL2 uses OpenGL_ES for image scaling under the hood anyway).

 

Thing is, is it possible to setup a better font scaling method? I have tried different fonts with the BG games, since they are customizable, but the problem is always the same: letter borders seem "grainy" in an ugly way. It's as if the letters were scaled using nearest instead of linear.I have already changed:

SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");

for
 

SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");

in gemrb/plugins/SDLVideo/SDL20Video.cpp, and things look smooth... except for the text.

 

So, the problem is not the font (I like the default font) but the scaling method it seems. Maybe fonts need some sub-pixel fixing to look fine as they do in most programs using modern displays? IS that available somehow in GEMRB?

Link to comment

If you use replacement TTF fonts, Freetype should take care of everything, I think. But if you use window scaling on top, you'll blur everything.

The original fonts are bitmap fonts, so there's not much one can do about scaling performance for them.

 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...