JCH enabling changes fonts

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
armaanchowdhry
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jun 18, 2021 1:53 am

JCH enabling changes fonts

Post by armaanchowdhry » Fri Jun 18, 2021 10:32 pm

Hello,

I am facing some issues with the configuration of my joomla website,
As you can see from the article page, https://thescuttlebutthouse.com/sports/ ... -to-heaven

the google fonts which was used in the template don't reflect on the page.

See the difference in the attached images.

If anyone can help me solve this, it would be lovely!
You do not have the required permissions to view the files attached to this post.
Last edited by toivo on Sat Jun 19, 2021 1:57 am, edited 1 time in total.
Reason: mod note: moved, not related to 3.x Performance

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6890
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: JCH enabling changes fonts

Post by AMurray » Sat Jun 19, 2021 12:43 am

Don't understand the question. The page has perfectly good fonts.

What font face were you expecting it to be?

I can't read the screenshots for comparison to the actual live site link.

Perhaps part of JCH_Optimise job is to use web-safe fonts.
Regards - A Murray

armaanchowdhry
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jun 18, 2021 1:53 am

Re: JCH enabling changes fonts

Post by armaanchowdhry » Sat Jun 19, 2021 1:29 am

AMurray wrote:
Sat Jun 19, 2021 12:43 am
Don't understand the question. The page has perfectly good fonts.

What font face were you expecting it to be?

I can't read the screenshots for comparison to the actual live site link.

Perhaps part of JCH_Optimise job is to use web-safe fonts.
I am not really technical or understand the coding verbose much.
But I guess the font face you asked for meant the font? Poppins and Roboto they are.
i had added the URL in the OP.
I am not running JCH Optimise for the following URL
https://thescuttlebutthouse.com/sports/ ... hul-dravid

JCH is enabled for the following URL
https://thescuttlebutthouse.com/politic ... fic-police

also when I change the width of the page, the main image is not responsive and stays the size when JCH is enabled.

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6890
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: JCH enabling changes fonts

Post by AMurray » Sat Jun 19, 2021 10:44 pm

If JCH is causing the issues what happens if you disable or uninstall it?

Do things return to as you expect them to be?

Sounds like JCH is causing more problems than its worth.
Regards - A Murray

armaanchowdhry
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jun 18, 2021 1:53 am

Re: JCH enabling changes fonts

Post by armaanchowdhry » Sun Jun 20, 2021 10:25 pm

AMurray wrote:
Sat Jun 19, 2021 10:44 pm
If JCH is causing the issues what happens if you disable or uninstall it?

Do things return to as you expect them to be?
Yes, it does!
AMurray wrote:
Sat Jun 19, 2021 10:44 pm
Sounds like JCH is causing more problems than its worth.
I know, but the page speed increases and that is what I want to achieve.

illovo
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Sun Jan 13, 2013 9:30 am
Contact:

Re: JCH enabling changes fonts

Post by illovo » Mon Jun 21, 2021 12:07 am

armaanchowdhry wrote:
Sat Jun 19, 2021 1:29 am
I am not really technical or understand the coding verbose much.
But I guess the font face you asked for meant the font? Poppins and Roboto they are.
i had added the URL in the OP.
I am not running JCH Optimise for the following URL
https://thescuttlebutthouse.com/sports/ ... hul-dravid

JCH is enabled for the following URL
https://thescuttlebutthouse.com/politic ... fic-police
What is "OP"???? And what have you entered in it???

The main issue is (if you inspect the source code) that all of the Poppins rules (for h2 and so on) are loaded as inline <style> BEFORE JCH loads its combined CSS file that overrides these settings.

I think the font-face URLs aren't relevant here but rules like:

Code: Select all

<style type="text/css">
body{font-family:Roboto, sans-serif; font-size:16px; font-weight:normal; }
h1{font-family:Poppins, sans-serif; font-weight:700; }
h2{font-family:Poppins, sans-serif; font-weight:700; }
h3{font-family:Poppins, sans-serif; font-weight:700; }
h4{font-family:Poppins, sans-serif; font-weight:600; }
h5{font-family:Open Sans, sans-serif; font-weight:800; }
h6{font-family:Open Sans, sans-serif; font-weight:800; }
img {   border-radius: 8px; }
and so on.

You can try (no guarantee)
1) to define these rules harder e.g.

Code: Select all

html body{font-family:Roboto, sans-serif; font-size:16px; font-weight:normal; }

body h1{font-family:Poppins, sans-serif; font-weight:700; }
2) or to add !important rules

Code: Select all

body{font-family:Roboto, sans-serif !important; font-size:16px; font-weight:normal; }

body h1{font-family:Poppins, sans-serif !important; font-weight:700; }
3) or to add your inline <style> at the end of the <HEAD> or at the end of the page. You could use a plugin like https://github.com/GHSVS-de/plg_system_ ... svs#readme or so if that's not possible with your "OP" (whatever that is).

4) or to go into the JCH plugin > Click on headline "Automatic Settings Group" > try setting "Include in-page CSS <style>". Don't forget to save and delete the cache inside plugin settings AND Joomla cache before any test.

3) and 4) are the the variants to be preferred.

1) and 2) are mostly bad ideas because they also overrule other font-family settings then but I don't know that in your case.

But no guarantee at all! Too much stuff in your page.


Post Reply

Return to “Extensions for Joomla! 3.x”