-
Bug
-
Resolution: Fixed
-
P3
-
fx1.2
You embed the font along with your application. You load the font by name. Simply place the ttf font file in a package in your application. Then you need to include a fonts.mf file in the META-INF of the jar so that we can discover the embedded fonts at runtime. The fonts.mf file is simply a properties file that lists the name of the font and the location of the font.
fonts.mf:
Arindam\ Neo\ Bold = /com/mycompany/fonts/arind.ttf
for example. Then in code you just load a font by name, using the name that you entered into your fonts.mf:
Font {
name: "Arindam Neo Bold"
size: 27
}
fonts.mf:
Arindam\ Neo\ Bold = /com/mycompany/fonts/arind.ttf
for example. Then in code you just load a font by name, using the name that you entered into your fonts.mf:
Font {
name: "Arindam Neo Bold"
size: 27
}
- duplicates
-
JDK-8099315 JavaFX should support FXD Font.fontFromURL directly to load 'embedded' fonts.
- Closed