Announcement

  •  » Themes
  •  » Bootstrap und Google Fonts

#1 2022-11-22 15:25:31

slim
Member
2016-03-09
27

Bootstrap und Google Fonts

Hello,

bootstrap uses Google Fonts. It is defined in the respective CSS.

Code:

@import url("https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700");

What can or must I do so that the fonts are no longer loaded from Google but directly from Bootstrap.

Slim

Offline

 

#2 2022-11-22 19:08:02

Katryne
Member
2016-12-03
372

Re: Bootstrap und Google Fonts

Hello,
Look here : https://album.chauvigne.info/
it's a bootstrap Darkroom customised via the css tab of Local File Edtor. And my fonts, from Google and from Font Awesome are localised now on my site.

First of all, the so-called "Google fonts" are generally not made by Google or belonging to Google. They are distributed by Google. And each one of them has copyrights of its own, generally open source. Take the license into account if it's of importance to you.

Then Google fonts provides of course the code to call it's font from their servers, but it provides also download links to these fonts.

So you download the fonts you need, and upload them in local/css/fonts.

Here is the css code I have now in Local File Edtor :

Code:

@font-face{
  font-family:'fontawesome';
  font-style:normal;
  font-weight:normal;
  src:url("fonts/fontawesome-webfont.eot?v=4.2.0");
  src:url("fonts/fontawesome-webfont.eot?#iefix&v=4.2.0") format("embedded-opentype"),url("fonts/fontawesome-webfont.woff?v=4.2.0") format("woff"),url("fonts/fontawesome-webfont.ttf?v=4.2.0") format("truetype"),url("fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular") format("svg")}

@font-face {
  font-family: 'Merriweather';
  src: url('fonts/Merriweather-Regular.ttf')  format('truetype');
  font-weight: normal;
    font-style: normal;
  }
@font-face {
  font-family: 'Jura';
  src: url('fonts/Jura-Regular.ttf')  format('truetype');
  font-weight: normal;
    font-style: normal;
  }
@font-face {
  font-family: 'Lora';
  src: url('fonts/Lora-Regular.ttf')  format('truetype');
  font-weight: normal;
    font-style: normal;
  }
@font-face {
  font-family: 'Lora';
  src: url('fonts/Lora-Italic.ttf')  format('truetype');
  font-weight: normal;
    font-style: italic;
  }
@font-face {
  font-family: 'Raleway';
  src: url('fonts/Raleway-Regular.ttf')  format('truetype');
  font-weight: normal;
    font-style: normal;
  }
body, html {font: normal 'Raleway', Verdana, Helvetica, sans-serif!important;}

etc ...

First lines are to localise fonts to be used in your css.
The line beginning with body is an example of fonts call in your css

Last edited by Katryne (2022-11-22 19:09:45)


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#3 2022-11-22 21:20:29

slim
Member
2016-03-09
27

Re: Bootstrap und Google Fonts

@Katryne

Thanks for the info. I have found another solution.

Under Bootstrap_Darkroom there are some interfaces that do not load Google Font.

Slim

Last edited by slim (2022-11-22 21:20:44)

Offline

 
  •  » Themes
  •  » Bootstrap und Google Fonts

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact