Hot answers tagged

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
  • 118k
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
  • 25.2k
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

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,238
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,522
4 votes

How do I render Unicode characters that my font doesn't support?

If you cannot find a single font containing all glyphs you want, you will have to have multiple fonts. Some text rasterisation APIs have "font linking" or "font substitution" in which they use more ...
Lars Viklund's user avatar
  • 4,084
4 votes

How do I render Unicode characters that my font doesn't support?

My approach is to do the following: Convert your font file to an image Store each character as a VAO (use a loop to store them all - array index = unicode number) Use a sprite batch to draw the text ...
Lucien's user avatar
  • 1,146
4 votes
Accepted

How can I find a free or cheap redistributable font supporting runic characters?

The fileformat.info page you linked to contains a link “Fonts that support this block”. The ones listed there with 100% support are— Everson Mono (cost: €25; license: Everson Mono Shareware License), ...
Anko's user avatar
  • 13.4k
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

Inverting a Font?

The way outline fonts (such as ttf) work is by defining a set of curves by vector graphics (quadratic Bézier in the case of ttf). What is inside or outside? At the moment of rendering the target area ...
Theraot's user avatar
  • 25.2k
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
  • 132k
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
  • 118k
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
  • 1,998
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

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
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
  • 118k
2 votes

Getting a list of all supported characters in a Font

See Font-characterInfo. ...
Mangata's user avatar
  • 2,451
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

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,800
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
1 vote
Accepted

How do I render Hindi text in Libgdx?

We can use "Chanakya" font for render the Hindi Text in correct way. Download the chanyaka.ttf from hera : http://indiatyping.com/index.php/download/199-chanakya-font After installing the font . You ...
arv's user avatar
  • 66

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