Questions tagged [java-font]

This tag supports topics related to font loading and font registration in Java.

This tag can be applied to questions related to Font.createFont() or GraphicsEnvironment.registerFont(), as well as related libraries such as Apache POI. There are certain system dependencies that make this tag relevant and unique:

  • Temporary directory availability and permissions
  • Font formatting and compatibility with Java Graphics2D
  • Availability of fontconfig package in Linux distros
6 questions
11
votes
3 answers

How to add extra linux dependencies into a spring-boot buildpack image?

I updated my spring-boot application to use buildpacks to create my docker-image instead of a dockerfile. I also use Apache POI in my application and since that update I get an error when generating an xlsx file. After some digging, I think it…
3
votes
2 answers

How to use kerning pairs extracted from a TTF file to correctly show glyphs as Path2D in Java?

This question is about recovering glyph font information in Java and it is related to a question posted here. For more details please check the question and answers. It was suggested there to use Apache FOP library to recover the kerning pairs…
2
votes
2 answers

Content from Jar file

Is it possible to create a custom font with a .ttf file that is inside a .jar file? I've created a jar file with the following structure Game.jar ├──Snake │ ├── lib │ | └── game_over.ttf | ├── src │ | ├── GameFrame.class │ | ├──…
André Clérigo
  • 846
  • 1
  • 10
  • 30
1
vote
0 answers

Do Java Fonts work with all unicode code points?

I am trying to read all glyphs the font has available, in my case 547. Here's what I've done so far: private static String getCharacters(Font font) { final int glyphs = font.getNumGlyphs(); System.out.println("Searching for " +…
0
votes
1 answer

Saving Fonts in JTextPane

As a part of learning Java GUI Programming with javax.swing I intend to save contents of a JTextPane with Font information. Is there a way to do so?
0
votes
1 answer

Why Java Font add a java icon in the Dock of macOs?

public static void main(String[] args) { Font arial = Font.getFont(ImmutableMap.of(TextAttribute.FAMILY, "Arial")); System.out.println(arial); } Having this little program, when executing it on my Mac, it runs (I think) another java…
bubbles
  • 2,597
  • 1
  • 15
  • 40