font change

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
dart
Posts: 58
Joined: Sun May 30, 2021 4:46 pm

font change

Post by dart » Mon Mar 13, 2023 2:44 pm

Hello,

How do I change the overall font to Roboto ?

I have to accomplish this in css bit it still shows the original.

The font family is @ Lucida Console, Monaco, monospace ?

dart
Posts: 58
Joined: Sun May 30, 2021 4:46 pm

Re: font change

Post by dart » Mon Mar 13, 2023 8:56 pm

I meant to add this in first post since I had already tried this...

<head>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<style>
body {
font-family: 'Roboto';font-size: 22px;
}
</style>
</head>

font-family: 'Roboto';font-size: 12px

font-family: 'Roboto';
text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
}

User avatar
fraenkiman
Posts: 210
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: font change

Post by fraenkiman » Mon Mar 13, 2023 9:16 pm

Hello dart,

I guess you are using the FlatMaas Revisited style.
The information was missing.

Add in the file /fp-interface/themes/leggero/header.tpl the following:

Code: Select all

<head>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
...
...
If I'm right with my guess, have a look in the file /fp-interface/themes/leggero/flatmaas-rev/res/common.css in the line 118.

Code: Select all

/* ==== Redefinition HTML tag ==== */
html {
	font: 82.5% verdana, Helvetica, Arial, sans-serif;
	...;
	...
}
Here you can specify Roboto as font.

Code: Select all

font-family: 'Roboto', Font for fallback;
A small, maybe important hint: You might have to announce in your privacy policy that your website loads an "external" font from Google.
I would recommend you to park the font on your own webspace. Then you don't give lawyers any fuel for fire regarding privacy.

With best regards
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

User avatar
fraenkiman
Posts: 210
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: font change

Post by fraenkiman » Mon Mar 13, 2023 10:55 pm

Hello Dart,

I've been playing around with the font a bit.

Try the following:
To embed a font, copy the code into the <head> of your html

Code: Select all

<link rel='preconnect' href='https://fonts.googleapis.com'>
<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin>
<link href='https://fonts.googleapis.com/css2?family=Roboto&display=swap' rel='stylesheet' type='text/css'>
CSS rules to specify families

Code: Select all

font-family: 'Roboto', sans-serif;
Restful night
With best regards
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests