title: Specifying external font in JavaFX CSS
body: <p>Is it possible to specify a font using CSS in JavaFX application? I have an FXML scene and the corresponding CSS file. In Java code, it's possible to specify a font using the <code>setFont</code> method:</p>
  
  <pre><code>text.setFont(Font.loadFont("file:resources/fonts/SourceSansPro-Bold.ttf", 12));
  </code></pre>
  
  <p>I tried different constructions, like:</p>
  
  <pre class="lang-css prettyprint-override"><code>-fx-font-family: url("../fonts/SourceSansPro-Bold.ttf");
  </code></pre>
  
  <p>But it doesn't work.</p>