Skip to main content
Share Your Experience: Take the 2024 Developer Survey
13 votes
Accepted

Is it reasonable to use FreeType

If you use a font rendering engine like FreeType, then the most common mistake is to re-render strings every frame. This is pointless, because when you render a string, it will usually be on the ...
Philipp's user avatar
  • 120k
8 votes
Accepted

Web build not respecting Monospace SystemFont for Godot Label

Currently SystemFont is not supported on web exports. I quote the documentation: Note: This class is implemented on iOS, Linux, macOS and Windows, on other ...
Theraot's user avatar
  • 27k
6 votes
Accepted

How to convert png images to True Type Font?

Truetype fonts are vector based. So you would have to trace the glyphs with a vector editor and then use a program like FontForge (which also is a vector editor) to build a font from that. That said, ...
CobaltHex's user avatar
  • 2,248
6 votes
Accepted

How does condition 5 of the Open Font License apply to using a font in my game/engine?

The intent of Condition #5 of the Open Font License seems to simply be to clarify the following: You do need to provide this license alongside your usage of the font, but This license applies just to ...
doppelgreener's user avatar
6 votes
Accepted

Is attribution sufficient for a CC BY-SA 3.0-licenced font in a video game?

Is attribution sufficient for a CC BY-SA 3.0-licenced font in a video game? Is it enough just to credit the creator? Yes. Do I have to sell my game under the same license? No. The web clearly ...
Vaillancourt's user avatar
  • 16.3k
5 votes

Spritebatch and Shaperenderer

From this topic: http://badlogicgames.com/forum/viewtopic.php?t=8573&p=38930 You should try not to do the following: (Quote from one of the GDX creators) ...
Jacob's user avatar
  • 2,552
4 votes

Is it reasonable to use FreeType

Yes, Freetype is reasonable. If you use .png files, you have to make one for EVERY size and EVERY color, and that may occupy 10 times the space a .ttf file takes up. Goodbye, free space on android ...
ShivGames's user avatar
  • 105
4 votes
Accepted

Two BitmapFonts from one .ttf font using AssetManager

I believe this could be an issue with the AssetManager as it uses an objectMap which maps loaded objects to the string used to load them. In this case you're loading the font and the assetManager is ...
dfour's user avatar
  • 768
3 votes
Accepted

How to maintain char widths of non-monospace fonts?

You need to input intended character widths, but not necessarily in a separate text file: the image itself can contain graphical markers at the boundaries of character sprites. For example, you can ...
Lorenzo Gatti's user avatar
3 votes

How can I use ImGui to render simple text instead of using stb_truetype directly?

From the GitHub issue you opened and the ImgUi FAQ: Create a dummy window with NoTitleBar|NoResize|NoMove|NoScrollbar|NoSavedSettings|NoInputs, then you can ...
Felipe Cortez's user avatar
3 votes

Sampled texture from bitmap font produces blue glow

So in true programmer fashion, I solved the issue after being frustrated with it forever. BITMAPINFO stores in ARGB format, not RGBA like I was expected. The solution is just changing the alpha ...
Kyle Elliott's user avatar
3 votes
Accepted

How do you deal with transparent fonts that you want to be white?

Here's another technique you can use. Select your font asset in the Inspector and set the Font Size to the size you want, and Character to the full set of characters you want to use. For this font, &...
DMGregory's user avatar
  • 135k
2 votes

Can I use fonts under C:\Windows\Fonts for text in my game?

This is explained on Microsoft's FAQ about font redistribution and licensing. tl;dr: If you would like to distribute the font files with your game, you need a license from the copyright holder, and ...
Philipp's user avatar
  • 120k
2 votes
Accepted

Can I use fonts under C:\Windows\Fonts for text in my game?

Just because a font came with your OS and you paid for the OS you can not use it for anything if it is not free. You could set yourself up for a lawsuit. Those fonts come under a Liberal license and ...
zimspy's user avatar
  • 347
2 votes
Accepted

Creating and editing a .fnt file based on a PNG source

The simplest way is probably just to redraw it maually, using a simple .fon editor like Fony. It will probably take less than a hour.
HolyBlackCat's user avatar
  • 2,035
2 votes
Accepted

Freetype: create Signed Distance Field based font

Unfortunately, freetype does not seem to render directly to a distance field as of version 2.9 (check the render modes listed here) You could calculate the distance from the alpha value of the ...
Antony Riakiotakis's user avatar
2 votes

Can I create realtime textures with text?

EDIT You could find too many approaches for solve your texturing problem, below I’ll share to you two of my favorites solutions based on some prototypes I’ve been working this week. SCRIPT FOR ...
user3054736's user avatar
2 votes

How does condition 5 of the Open Font License apply to using a font in my game/engine?

The Open Font FAQ Update 6 (current at the time I write this answer) has some good information on this, but nothing definitive. The license mainly describes the intention of using fonts covered by ...
Zodman's user avatar
  • 121
2 votes
Accepted

libGDX font generating bug

I found solution! I just added this: FreeTypeFontGenerator.setMaxTextureSize(2048); So, full code looks like so: ...
Pasha Oleynik's user avatar
2 votes

How do you deal with transparent fonts that you want to be white?

I am afraid this won't be possible with that font. TrueType-Fonts only have solid areas and transparent areas. They don't have a way to define which parts of each letter are "inside" and ...
Philipp's user avatar
  • 120k
2 votes

Getting a list of all supported characters in a Font

See Font-characterInfo. ...
Mangata's user avatar
  • 2,571
2 votes

How to add a fallback font to an existing Unity game?

One workaround for Wine is to copy Segoe fonts (Segoe UI symbol for this code point) to Wine. Unity Editor manual mentions "hard-coded global list of fallback fonts" but does not tells the ...
user2771324's user avatar
1 vote

Font Changes in WebGL Build

I just managed to solve the problem in a very weird way. I initially brought an Arial font file into the project and replaced all text object fonts with this. It didn't work. To make sure it was ...
JSparks's user avatar
  • 199
1 vote

How can I create color fonts to be used in Unity?

There is a good reason why these are all black and white. Most game engines allow you to manipulate the RGBA values of the textures in your buffer before being displayed. For example, in my own ...
Majte's user avatar
  • 843
1 vote

Unity font API behaves differently in built game

Just solved, it's about the readability of font.material.mainTexture. In the editor there's no warning or error, and it's readable, but not in the built game. Try ...
Arxz's user avatar
  • 95
1 vote

Scale screen space quads (used in font rendering)

It sounds like you've already answered this for yourself: this scales a single quad correctly, but the two closely neigboring quads are no longer closely neigboring, since the space between them is ...
DMGregory's user avatar
  • 135k
1 vote
Accepted

When I use a font in my game, do I have to include its license in the credits?

The attribution requirements of a work are part of the licence. You have to refer to it (or your lawyer who has been paid to read it for you) to know what must be done. If your question is actually "...
Weaver's user avatar
  • 362
1 vote
Accepted

Xna Spritefont from installed fonts

When a font is located in the content folder, and you keep the content folder along with your game, then it shouldn't be much of a problem. Spritefonts are treated similair like images, They both ...
Steven's user avatar
  • 881
1 vote

LibGdx: set TextButton font to a TrueTypeFont

In my answer to this question on SO I describe how you can add a TTF font to your skin file which will allow you to use the font on your labels. Basically when you ...
Charanor's user avatar
  • 7,870
1 vote

Creating and editing a .fnt file based on a PNG source

you can use Hiero for generating the .FNT file using your .ttf font file. Go through the link and download it. https://github.com/libgdx/libgdx/wiki/Hiero
arv's user avatar
  • 66

Only top scored, non community-wiki answers of a minimum length are eligible