TryGhost / Casper

The default theme for Ghost
https://demo.ghost.io
MIT License
2.54k stars 2.78k forks source link

Extended font #126

Closed balintant closed 10 years ago

balintant commented 10 years ago

The current font does not support the following characters (we use in Hungarian language): [ő, ű].

For now I will change the font, but I would be happy if you extend the current one.

onetdev commented 10 years ago

Actually I think it does support, but the embed font set is not Latin Extended. (The font's chars table: https://www.google.com/fonts/specimen/Noto+Serif)

This can be solved by using the following font URL: http://fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic|Open+Sans:400,700&subset=latin,latin-ext

Please note that this change will increase the fonts total filesize from 117KB to 351KB.

balintant commented 10 years ago

Thanks @orosznyet. I have not checked the source... Shame on me.
You have to do the change in /path/to/ghost/content/themes/casper/default.hbs.


If you want to make the admin UI manage your characters too, change the following line in /path/to/ghost/core/server/views/default.hbs to the line following that line:

<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700&subset=latin,latin-ext" />

Then you will have to restart the ghost's service. Here are some examples of that:

$ sudo service ghost restart
$ supervisorctl restart ghost
JohnONolan commented 10 years ago

Please note that this change will increase the fonts total filesize from 117KB to 351KB.

This is why we don't include it by default - but of course people who need the characters are more than welcome to use the extended set

balintant commented 10 years ago

@JohnONolan and the new font (Merriweather) does not have these characters (ő, Ő, ű. Ű). If we had theme-settings, we could make this easier to change (because of non-web-developer bloggers). :)