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 ...
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 ...
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, ...
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 ...
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 ...
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)
...
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 ...
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 ...
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 ...
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 ...
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 ...
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, &...
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.
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 ...
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 ...
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 ...
2
votes
Accepted
libGDX font generating bug
I found solution!
I just added this:
FreeTypeFontGenerator.setMaxTextureSize(2048);
So, full code looks like so:
...
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 ...
2
votes
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 ...
1
vote
Accepted
LibGDX Letter spacing is reduced if I use GlyphLayout to draw a bitmap font
I managed to solve the problem myself but it still seems like it may be a bug. It happens because glyphLayout.setText(font, text); is declared in the constructor ...
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 ...
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 ...
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 ...
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 "...
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 ...
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 ...
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 ...
1
vote
Why can't I read .ttf file when running Android configuration?
If your test desktop filesystem is running on Windows NTFS and the Android device filesystem is on Android native, the difference is in the filesystem drivers.
The Windows filesystem drivers are not ...
1
vote
libgdx - Trying to load ttf font using asset manager
I updated the LibGDX wiki to specifically address this issue. The old example code used there was just too confusing for anyone to take a quick glance at and figure out what they were doing. Take a ...
Only top scored, non community-wiki answers of a minimum length are eligible