Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: sonexay on June 05, 2018, 06:24:22 AM

Title: Can we fixed font use for our website?
Post by: sonexay on June 05, 2018, 06:24:22 AM
My website default font is so awful, does it possible to change web default font?
my SMF version is 2.0.15
Title: Re: Can we fixed font use for our website?
Post by: GigaWatt on June 05, 2018, 06:57:16 AM
Could you post a screen shot?
Title: Re: Can we fixed font use for our website?
Post by: sonexay on June 05, 2018, 07:04:27 AM
as in scr shot it's Lao font and it's not standard font which we use in this country

the standard font we use is "Phetsarath OT" but in here is not i don't know what font is it, and it's too small when compare with English font.

I want to add my own font to the whole website to use "phetsarath Ot" does it possible?
Title: Re: Can we fixed font use for our website?
Post by: GigaWatt on June 05, 2018, 07:18:56 AM
The font settings are located in index.css of your theme. For example, for the default theme, index.css is located in forum_root/Themes/default/css/index.css. Also, take a look at this SMF wiki on creating themes, it's a good reference ;).

Creating Themes (https://wiki.simplemachines.org/smf/How_to_create_a_smf_theme)
Title: Re: Can we fixed font use for our website?
Post by: Aleksi "Lex" Kilpinen on June 05, 2018, 09:27:24 AM
Quote from: sonexay on June 05, 2018, 07:04:27 AM
as in scr shot it's Lao font and it's not standard font which we use in this country

the standard font we use is "Phetsarath OT" but in here is not i don't know what font is it, and it's too small when compare with English font.

I want to add my own font to the whole website to use "phetsarath Ot" does it possible?
In theory, if each and every user you have has the font installed - then you can define the font in the theme. However, it is my understanding that Phetsarath OT is currently only natively supported on Android and iOS devices - not desktop OSes like mainstream Linux or Windows. If I'm right, defining the font so, could then also make the view worse for some users then.
Title: Re: Can we fixed font use for our website?
Post by: landyvlad on July 06, 2018, 01:14:24 AM
sonexay - On an unrelated matter that's a clever logo.
Title: Re: Can we fixed font use for our website?
Post by: shawnb61 on July 06, 2018, 04:40:02 AM
I've never done this, but I believe you can add downloadable fonts to your site:
https://www.designcuts.com/tutorials/how-to-install-and-use-web-fonts/

Google offers a downloadable phetsarath webfont:
https://fonts.google.com/earlyaccess
Title: Re: Can we fixed font use for our website?
Post by: Gwenwyfar on July 16, 2018, 02:13:27 PM
If you want to be sure a font will be loaded, you can use one of those webfonts above (ie: google fonts), or you can use a list of fonts. How a list works is that if the user doesn't have the first, it will use the second, and so forth. If none of them are available it will use the browser default (which is normally ugly).