question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I check if the font file contains certain font?

See original GitHub issue

I use the libgdx-freetype extension to load .ttf font file.

I have multiple fonts files. And I want to load different fonts from different files.(For example,loading Japanese fonts from a Japanese font file,loading English fonts from a English font file)

But I did not find a way for libgdx-freetype to check whether the font glyph exists.

How can I do it? Thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
mingmoecommented, Nov 21, 2021

Fixed. #6703

Great :->

1reaction
mingmoecommented, Nov 21, 2021

I noticed that freetype providesFT_Get_Char_Index function to check whether the font exists.

I also found the com.badlogic.gdx.graphics.g2d.freetype provides getCharIndex method.

This may only require a small modification.

Should I fix it? @Frosty-J @tommyettinger @lyze237

I am very happy to make the first contribution to this project. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I find out which font contains a certain special ...
If so, select the content and the Word font menu will show you the source font on your computer that contains the necessary...
Read more >
Is there a way to programmatically determine if a font file has a ...
Then, given a char toCheck that you want to check and a Font theFont to ... It checks the font to /// see...
Read more >
How to check if a ttf file contains a certain character? [duplicate]
Using the command line, how can I check if a *.ttf file contains a certain character? I want to know if the font-file...
Read more >
FontFaceSet.check() - Web APIs - MDN Web Docs
The check() method of the FontFaceSet returns whether all fonts in the given font list have been loaded and are available.
Read more >
Determine whether a font file is OpenType format or TrueType ...
If a font contains TrueType based outlines (thus contains both glyf and loca tables) and doesn't contain OpenType feature related tables (e.g. ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found