I'm working with JasperSoft to generate .pdf
files and Java as my backend
to generate my dynamic data to fill the pdf
. I need to add my new font as a dependency in my pom.xml
and be able to use it in my Java code like:
new Font("Font Family Name", Font.PLAIN, 7);
How can I do that, please ?
EDIT More information about my problem. I can't get my family name correctly in Java. Debugging I found that always come with the wrong family name:
"java.awt.Font[family=Dialog,name=GothamNarrow,style=plain,size=8]"
This is my dependency in my pom.xml:
<dependency>
<groupId>com.company</groupId>
<artifactId>jFreeChartFontsCobaGothamNarrow</artifactId>
<version>0.0.1</version>
</dependency>
And this is my folder structure in the maven-repo
folder:
valter@company:$ ls -lthaR jFreeChartFontsCobaGothamNarrow/
jFreeChartFontsCobaGothamNarrow/:
total 16K
drwxrwxr-x 30 valter valter 4,0K Okt 23 09:30 ..
-rw-rw-r-- 1 valter valter 331 Okt 23 09:23 maven-metadata-local.xml
drwxrwxr-x 3 valter valter 4,0K Okt 23 09:16 .
drwxrwxr-x 2 valter valter 4,0K Okt 23 09:16 0.0.1
jFreeChartFontsCobaGothamNarrow/0.0.1:
total 224K
-rw-rw-r-- 1 valter valter 215 Okt 23 09:23 _maven.repositories
drwxrwxr-x 2 valter valter 4,0K Okt 23 09:16 .
drwxrwxr-x 3 valter valter 4,0K Okt 23 09:16 ..
-rw-rw-r-- 1 valter valter 495 Okt 23 09:16 jFreeChartFontsCobaGothamNarrow-0.0.1.pom
-rw-rw-r-- 1 valter valter 197K Okt 23 09:09 jFreeChartFontsCobaGothamNarrow-0.0.1.jar
-rw-rw-r-- 1 valter valter 554 Okt 23 08:45 jFreeChartFontsCobaGothamNarrow-0.0.1.jar.lastUpdated
-rw-rw-r-- 1 valter valter 554 Okt 23 08:45 jFreeChartFontsCobaGothamNarrow-0.0.1.pom.lastUpdated