In javafx.scene.text.Font attribute name is written:
"There is a single unified way to load both embedded and device fonts. Simply create the font by specifying the full name of the font you want to load. This class will first search for an embedded font by this name. If not found, then it will check a list of known fonts shipped with JavaFX. If the font is still not found, then system fonts will be checked. If the specific font still cannot be located, then a fallback font will be used. The "name" will be updated to reflect the actual name of the font being used. A load failure condition can be discovered by checking the name of the Font with the name you tried to load. "
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.