Feature ? Language Change Documentation Required PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
15 Mar 2023

Currently cassiopeia offers three font configuration settings all with their limitations

  1. none - boring generic system font
  2. Roboto Local - slow
  3. Google Fonts - privacy

Using a system font stack is always the best. It is fast, there is nothing to download, there is no layout shift (google pagespeed hates that).

The problem with a system font stack is that every system has different fonts available so you need to be careful in defining it. Thats why the current system font stack from Bootstrap that is used in Cassiopeia is so boring and safe and why people choose google fonts etc.

This PR adds 14 modern system font stacks from @danklammer

System font stack CSS organized by typeface classification for every modern OS
The fastest fonts available. No downloading, no layout shifts, no flashes — just instant renders.

You can see them in action at https://modernfontstacks.com/ and helpfully see which font in each stack your own system will use.

This was developed for my own sites and I am offering it here as I am certain that it will be useful to all. Especially to those people who don't realise they can have great font choices with Joomla without impacting privacy or performance.

The base branch for this PR is 4.3 simply because that's what is developed on. I leave it to maintainers to decide if and when it can be merged.

It is fully backwards compatible
I created language strings for each font stack but I suspect that most translation teams will chose not to translate them.

Testing Instructions

In the template style options for Cassiopeia there is now an additional option in the Fonts Scheme select
image

Once the System Fonts option is selected there are two new lists available to chose both a body font stack and a heading font stack. There is also an additional line added to the Notes

image

Once you have selected your stack and saved the style you can test it on the front end.
Viewing the source you should now see
image

Inspecting the css you should see
image

Link to documentations

If/when accepted I will update the docs - who knows which site it will be on by then

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

6f20670 15 Mar 2023 avatar brianteeman stack
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2023
Category Language & Strings Front End Templates (site)
avatar brianteeman brianteeman - open - 15 Mar 2023
avatar brianteeman brianteeman - change - 15 Mar 2023
Status New Pending
avatar HLeithner
HLeithner - comment - 15 Mar 2023

Can we remove remote fonts? there are zero benefits.

avatar brianteeman
brianteeman - comment - 15 Mar 2023

Can we remove remote fonts? there are zero benefits.

Beyond the scope of this PR and also a disruptive b/c break

avatar brianteeman brianteeman - change - 15 Mar 2023
Title
[4.3] Cassiopeia Fonts
[4.3] Cassiopeia Fontstacks
avatar brianteeman brianteeman - edited - 15 Mar 2023
avatar brianteeman brianteeman - change - 15 Mar 2023
Labels Added: Language Change PR-4.3-dev
avatar coolcat-creations
coolcat-creations - comment - 15 Mar 2023

That's quite interesting. Most of my customers want and need specific fonts, but this would be useful for small association and NGO websites and that are those who mostly would use Cassiopeia I guess.

avatar brianteeman
brianteeman - comment - 15 Mar 2023

Not really sure why you commented @coolcat-creations as this is clearly nothing to do with any template other than cassiopeia or offering specific conts (though I doubt they do really need a specific font). Not everyone has the money to spend on a custom designed template or on a closed platform like yootheme.

avatar coolcat-creations
coolcat-creations - comment - 15 Mar 2023

I think my comment was lost in translation because I don't understand your answer :-)

avatar coolcat-creations
coolcat-creations - comment - 15 Mar 2023

Let me rephrase:

That suggestion is very interesting. I do not have a lot of customers that would use system fonts even if they use Cassiopeia. Most of them want and need specific fonts. I think this suggestion would be useful for small association and NGO websites where the font does not matter so much. And I think such organizations are most likely those who would use Cassiopeia, the template you suggested it for.

I hope my comment makes more sense now ??‍♀️

avatar richard67
richard67 - comment - 15 Mar 2023

@brianteeman Am I blind so I am missing it, or have you not implemented the system-ui font stack?

avatar brianteeman
brianteeman - comment - 15 Mar 2023

@brianteeman Am I blind so I am missing it, or have you not implemented the system-ui font stack?

I was wondering who would ask that first
Bootstrap already has a system font stack defined

This PR (like the other font options) adds the selected font stack (as a variable --cassiopeia-font-family) to the existing boostrap system stack (--body-font-family). So there was no need to add a value for system-ui as it would result in a duplicated stack.

I could also have included it as an option in this select list with a blank value - would that be less confusing?

avatar richard67
richard67 - comment - 15 Mar 2023

Bootstrap already has a system font stack defined

@brianteeman Do you mean this one here? https://github.com/joomla/joomla-cms/blob/4.3-dev/build/media_source/templates/site/cassiopeia/scss/tools/variables/_variables.scss#L161

That's not really the same as the font-family: system-ui, sans-serif; from the system-ui font stack, that's why I had asked.

Another thing: Do you think it could make sense to add emoji support like described here? https://github.com/system-fonts/modern-font-stacks#emoji-support

avatar richard67
richard67 - comment - 15 Mar 2023

@brianteeman P.S.: Hmm, reading here I think you are right and the result is (nearly) the same: https://css-tricks.com/snippets/css/system-font-stack/ . So you might be right and it does not need the "system-ui" font stack.

avatar gwstyles
gwstyles - comment - 15 Mar 2023

I would be very pleased to have this available in the Cassiopeia template and not rely on external fonts. Thanks Brian , lets hope it is accepted soon.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40124.

avatar richard67
richard67 - comment - 15 Mar 2023

I would be very pleased to have this available in the Cassiopeia template and not rely on external fonts. Thanks Brian , lets hope it is accepted soon.

@gwstyles It needs 2 successful human tests, then it will be considered, and I don't see any reason not to accept it. So if you want to help with it coming forward, test it and report back your test result using the "Text this" button in the issue tracker https://issues.joomla.org/tracker/joomla-cms/40124 . You can download an installation package for testing on a testing environment here: https://ci.joomla.org/artifacts/joomla/joomla-cms/4.3-dev/40124/downloads/63203/ .

avatar gwstyles
gwstyles - comment - 16 Mar 2023

I have tried to install https://ci.joomla.org/artifacts/joomla/joomla-cms/4.3-dev/40124/downloads/63203/ . On wampserver and on my live server and it will not install...screen shot 2023-03-16 at 08 35 11


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40124.

avatar alikon alikon - test_item - 19 Mar 2023 - Tested successfully
avatar alikon
alikon - comment - 19 Mar 2023

I have tested this item successfully on 99b09c0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40124.

avatar viocassel viocassel - test_item - 20 Mar 2023 - Tested successfully
avatar viocassel
viocassel - comment - 20 Mar 2023

I have tested this item successfully on 99b09c0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40124.

avatar alikon alikon - change - 20 Mar 2023
Status Pending Ready to Commit
avatar alikon
alikon - comment - 20 Mar 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40124.

avatar HLeithner
HLeithner - comment - 8 May 2023

This pull request has been automatically rebased to 5.0-dev. No new features will be merged into Joomla! 4.3 series. Joomla! 4.4 series is a bridge release to make migration from Joomla! 4 to 5 as smooth as possible.

avatar brianteeman brianteeman - change - 8 May 2023
Title
[4.3] Cassiopeia Fontstacks
[5.0] Cassiopeia Fontstacks
avatar brianteeman brianteeman - edited - 8 May 2023
avatar HLeithner HLeithner - change - 15 Jun 2023
Labels Added: Feature ? Documentation Required PR-5.0-dev
Removed: PR-4.3-dev
avatar HLeithner HLeithner - change - 15 Jun 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-06-15 07:09:53
Closed_By HLeithner
avatar HLeithner HLeithner - close - 15 Jun 2023
avatar HLeithner HLeithner - merge - 15 Jun 2023
avatar HLeithner
HLeithner - comment - 15 Jun 2023

thanks

avatar brianteeman
brianteeman - comment - 15 Jun 2023

thanks

avatar brianteeman
brianteeman - comment - 29 Jun 2023

Add a Comment

Login with GitHub to post a comment