0

I've been working on a Java fx program and wanted to add Amharic characters to a text area. i tried to add custom fonts using CSS but it doesn't seem to be working and i end up with square boxes instead of the characters. I'm trying to render Amharic characters and here's the CSS code.

@font-face {
    src: url('AbyssinicaSIL-Regular.ttf');
}

.text {
    -fx-font-family: 'Abyssinica SIL';
}

also if anyone knows how to add the fonts in the controller class or the FXML file it'd help a lot. thankyou in advance.

m.prime
  • 67
  • 7
  • have a look here: https://stackoverflow.com/questions/12173288/specifying-external-font-in-javafx-css You have to set the font family in the @font-face block. – mipa Nov 06 '19 at 14:59
  • OMG thank you so much you have saved me 5hrs – m.prime Nov 06 '19 at 15:23
  • Possible duplicate of [Specifying external font in JavaFX CSS](https://stackoverflow.com/questions/12173288/specifying-external-font-in-javafx-css) – Slaw Nov 06 '19 at 16:40

0 Answers0