hotosm / learnosm

LearnOSM.org content, Jekyll layouts & issue tracking. This repository is dedicated to helping people learn how to map in OpenStreetMap (OSM) and use many of the software and tools in the OSM community.
http://learnosm.org
MIT License
246 stars 189 forks source link

Suggesting Sahel font for Farsi #628

Open iriman opened 4 years ago

iriman commented 4 years ago

The current font of website is very good for Latin script, but not very well readable for Farsi. Also it has too sharp angles. ّI would suggest to use Sahel font which is free and is specially designed for Farsi and gives much better feel and reads easily.

Also it could be configured so that doesn't load on non-Farsi pages at all.

Sahel font:

image

Default font: image

iriman commented 4 years ago

@michael63-osm What's your opinion on this more specific issue?


I guess the easiest way to implement it is using publisher-provided css on the default layout (without the need to self-hosting font files):

{% if page.lang == "fa" %}<link href="https://cdn.jsdelivr.net/gh/rastikerdar/sahel-font@v3.4.0/dist/font-face.css" rel="stylesheet" type="text/css" />{% endif %}

and applying some style rules via style-rtl.css:

/* font configuration for Farsi */
[lang="fa"] body,
[lang="fa"] .doc ol > li:before,
[lang="fa"] .doc ul > li:before,
[lang="fa"] .doc  ul li,.doc ol li, .doc p,
[lang="fa"] blockquote p,
[lang="fa"] .searchbox input,
[lang="fa"] .ui-menu-item {
  font-family: Sahel, sans-serif !important;
  font-size: 1em;
}