microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
40.31k stars 3.59k forks source link

Change font to one with ligatures #123

Closed fdeitelhoff closed 7 years ago

fdeitelhoff commented 8 years ago

I'm trying to change the font of the monaco editor. I found some properties to achieve this:

fontFamily: "Times", fontSize: 20,

But am not able to change that to a custom font like Hasklig (https://github.com/i-tu/Hasklig/). What am I missing. Should I access the font through the CSS classes?

alexdima commented 8 years ago

@fdeitelhoff Try first to use the font in a div or another element in your page to verify that the browser can correctly load the font. Then, use the same fontFamily on the editor creation options and it should behave the same.

alexdima commented 8 years ago

Maybe also try the option fontLigatures: true