? Pending

User tests: Successful: Unsuccessful:

avatar coolcat-creations
coolcat-creations
8 Sep 2018

This PR changes the backend template font to the font that is used in the backend template draft:
https://magazine.joomla.org/item/3289-episode-iv-a-new-user-interface-for-the-joomla-backend

Summary of Changes

The Backend Font is now Roboto

Testing Instructions

Font sizes will be fixed in separate PRs just check if the font was arial before and roboto after.

I created a fonts folder to prepare a structure for other fonts. I think also font-awesome should be moved there in another PR.
The reason for two scss files is also a consistent structure. In FA you have a whole set of scss files.

avatar coolcat-creations coolcat-creations - open - 8 Sep 2018
avatar coolcat-creations coolcat-creations - change - 8 Sep 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2018
Category Administration Templates (admin)
avatar brianteeman
brianteeman - comment - 8 Sep 2018

What is the source of this font. The two places I found both contained a license text file that should be included and neither of them is referenced as v18 - based on the filedate alone this is a very old version of the font and the latest corrected version is at https://github.com/google/roboto/

avatar coolcat-creations
coolcat-creations - comment - 8 Sep 2018
avatar coolcat-creations
coolcat-creations - comment - 8 Sep 2018

You need webfonts for including it in the template and this source is offering the webfonts. If you have another source for roboto webfonts I can include them.

avatar gorgonz
gorgonz - comment - 8 Sep 2018

I have tested this item successfully on 2124fd8

works as expected


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

avatar gorgonz gorgonz - test_item - 8 Sep 2018 - Tested successfully
avatar brianteeman
brianteeman - comment - 8 Sep 2018

Looks like the master repo for the font is just the source - it was just that the readme says this is an older version.

A subset of an earlier version of Roboto is available from Google Fonts, and can be used as a web font.

So I guess this is fine i it supports all the languages

avatar chmst
chmst - comment - 8 Sep 2018

I have tested this item successfully on 2124fd8

Veriy nice. It is allitle bit narrower, so better use of space.


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

avatar chmst chmst - test_item - 8 Sep 2018 - Tested successfully
avatar renekreijveld
renekreijveld - comment - 8 Sep 2018

I have tested this item successfully on 2124fd8

Before test:
Font is: Arian, sans-serif
After apply patch:
Font is: Roboto, Arian, sans-serif
Easy Peasy test ;-)


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

avatar brianteeman
brianteeman - comment - 8 Sep 2018

image

avatar renekreijveld renekreijveld - test_item - 8 Sep 2018 - Tested successfully
avatar brianteeman
brianteeman - comment - 8 Sep 2018

I have tested this item ? unsuccessfully on 2124fd8


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

avatar brianteeman brianteeman - test_item - 8 Sep 2018 - Tested unsuccessfully
avatar coolcat-creations coolcat-creations - change - 8 Sep 2018
Labels Added: ?
avatar coolcat-creations
coolcat-creations - comment - 8 Sep 2018

Fontpath corrected, please retest @brianteeman @renekreijveld thanks!

avatar renekreijveld
renekreijveld - comment - 8 Sep 2018

I have tested this item successfully on 2124fd8

I retested and found the font file present, could even download them.
/administrator/templates/atum/fonts/roboto/roboto-v18-latin-700italic.ttf


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22075.
avatar renekreijveld renekreijveld - test_item - 8 Sep 2018 - Tested successfully
avatar crommie
crommie - comment - 8 Sep 2018

I have tested this item successfully on 4446814

Tested accorded to instructions.


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

avatar crommie crommie - test_item - 8 Sep 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

@renekreijveld can you please mark your Test again as its not in GitHub and Issue Tracker.

avatar renekreijveld
renekreijveld - comment - 8 Sep 2018

I have tested this item successfully on 4446814

Reconfirm test succesful.


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

avatar renekreijveld renekreijveld - test_item - 8 Sep 2018 - Tested successfully
avatar renekreijveld
renekreijveld - comment - 8 Sep 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Sep 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

Ready to Commit after two successful tests.

avatar brianteeman
brianteeman - comment - 8 Sep 2018

I have tested this item ? unsuccessfully on 4446814

only -700 is being loaded


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

avatar brianteeman brianteeman - test_item - 8 Sep 2018 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 8 Sep 2018

@franz-wohlkoenig please remove rtc as hound needs to be passing before it is ready

avatar brianteeman
brianteeman - comment - 8 Sep 2018

@coolcat-creations only -700 font is being loaded

image

image

image

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Sep 2018
Status Ready to Commit Pending
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

set back on Pending as stated above.


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

avatar coolcat-creations
coolcat-creations - comment - 8 Sep 2018

@brianteeman you have to run npm again

avatar brianteeman
brianteeman - comment - 8 Sep 2018

i had run rpm run build:css before posting - but just to be certain i just did a complete npm install

no difference

avatar brianteeman
brianteeman - comment - 8 Sep 2018

just tested again on firefox and it works but it doesnt in chrome

avatar coolcat-creations
coolcat-creations - comment - 8 Sep 2018

Chrome seems to be clever if the font is installed in the computer it does not pull it from the web. Just tested that and is reproduceable. So thats not a bug but a feature from chrome.

grafik

grafik

avatar brianteeman
brianteeman - comment - 8 Sep 2018

Yes I just logged back in to say that the problem was that I had roboto-700 installed on my system.

You can say its a "feature" of chrome but for me it means that we can't use a webfont

avatar infograf768 infograf768 - change - 8 Sep 2018
Title
Change backend font to roboto
[4.0] Change backend font to roboto
avatar infograf768 infograf768 - edited - 8 Sep 2018
avatar brianteeman
brianteeman - comment - 8 Sep 2018

It looks like the wa6y to resolve this is to remove

src: local('Roboto'), local('Roboto-Regular'),

avatar coolcat-creations
coolcat-creations - comment - 8 Sep 2018

Why would one say that? You can name it different in the scss file if you want to prevent that or remove the local reference. But I see no reason why we should block the opportunity to have a faster loading time.

avatar brianteeman
brianteeman - comment - 8 Sep 2018

Because if you only have a partial font installed locally eg just the bold variant then that line will prevent the full set of fonts being loaded on the site.

avatar brianteeman
brianteeman - comment - 8 Sep 2018

I just tested and removing
local('Roboto'), local('Roboto-Regular'),
will work - you need to keep the src:

avatar infograf768
infograf768 - comment - 8 Sep 2018

does roboto includes all necessary charsets? afaik, it has cyrillic, greek, latin and vietnamese only

avatar coolcat-creations
coolcat-creations - comment - 8 Sep 2018

does roboto includes all necessary charsets? afaik, it has cyrillic, greek, latin and vietnamese only
I tested the view with Persian and it looked good - maybe because i left the fallback to Arial inside the font-family specification...

avatar ciar4n
ciar4n - comment - 11 Sep 2018

I'd suggest removing the fonts and just keep the CSS property. The majority of users would have this font cached.

avatar coolcat-creations
coolcat-creations - comment - 11 Sep 2018

Then you‘d need to write a gdpr statement regarding google fonts ... That’s why it’s better to serve them local.

avatar ciar4n
ciar4n - comment - 11 Sep 2018

We won't be serving anything. I'm suggesting, don't serve 100kb of render blocking fonts when they are most likely already cached on the client.

avatar coolcat-creations
coolcat-creations - comment - 11 Sep 2018

Well, then back to the 80s using Arial? you forget about networks that are closed, about blocked resources in other countries, GDPR, and more...:-/

avatar mbabker
mbabker - comment - 11 Sep 2018

So how many of you have forked the Isis and/or Protostar templates to deal with Google Fonts on 3.x? Not anything new there.

Also, it is entirely possible to build a font stack that takes advantage of "fancy" fonts without including all of the fonts in the CMS distribution. But, since we like to not do things that WordPress does and they changed their admin to not rely on downloading external fonts we can't do that.

avatar ciar4n
ciar4n - comment - 12 Sep 2018

Well, then back to the 80s using Arial? you forget about networks that are closed, about blocked resources in other countries, GDPR, and more...:-/

??? Nothing in your statement relates to what I am saying so bowing out of this conversation.

As Micheal suggests, I think the best we can do here is a proper font stack with Roboto having priority.

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

@ciar4n
Sorry then I probably misunderstood you completely. How can we solve to have Roboto but not pulling it from external Sources? I did not understand your Solution. or maybe you can push into this PR and help.

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

But if you want to load it from local, why had @brianteeman asked me to remove to load it from local if available? I still don't understand the goal of what you want me to do...

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

Ok then production has to decide if

  1. We have a modern and clean backend with a consistent use of fonts which is IMHO also important for branding, continuity and style.
  2. Just use any font from a fontstack because we don't care about typography and design.

Since I do care about typography and design someone else would need to create the second PR, sorry.

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

So can we leave the PR as it is or not? I still don't understand your intentions, sorry.

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

No... I asked for a decision from production regarding this. How do we proceed?

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

Thats not a though question. I am sure @wilsonge can just reply if we stick to the design and concept of J4 Backend or do something else.

avatar wilsonge
wilsonge - comment - 12 Sep 2018

I approve using the Roberto font that we ship in the backend template only . It's going to be a one-off download (and after that the browser will cache it) and in the backend frankly performance doesn't matter quite as much as the frontend. Clearly it's different in the frontend template where I would expect us to use the "wordpress way" of using what's already been cached in the user's browser as performance is significantly higher importance there.

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

Thank you @wilsonge !

avatar dgrammatiko
dgrammatiko - comment - 12 Sep 2018

FWIW the build.js was written, contrary to what most people believe, to automate the "import" of all static assets. I see that this PR totally neglects this very simple idea to improve maintainability. (In other words that was totally wasted time for me...) PS: same story with Brians PR for the accessibility menu. Assets NEED to be handled through package.json you are doing it wrong!!!

Apart from that you need to make sure that the font covers all the languages that the product could possibly be installed/run. So does this font covers this very simple prerequisite, eg does it support Asian languages?

avatar brianteeman
brianteeman - comment - 12 Sep 2018

Apart from that you need to make sure that the font covers all the languages that the product could possibly be installed/run. So does this font covers this very simple prerequisite, eg does it support Asian languages?

I asked that four days ago but didn't get an answer

avatar brianteeman brianteeman - close - 12 Sep 2018
avatar brianteeman brianteeman - change - 12 Sep 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-09-12 23:40:49
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 12 Sep 2018

Wrong button sory

avatar brianteeman brianteeman - change - 12 Sep 2018
Status Closed New
Closed_Date 2018-09-12 23:40:49
Closed_By brianteeman
avatar brianteeman brianteeman - change - 12 Sep 2018
Status New Pending
avatar brianteeman brianteeman - reopen - 12 Sep 2018
avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

@brianteeman The question was asked by @Infograf and I replied directly afterwards below the question. Please don’t accuse me that I don’t reply.

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

@dgrammatiko is there any documentation how to use what you did or can you help me? I don’t understand what you mean, if you help me I could change whatever needs to be changed.

avatar dgrammatiko
dgrammatiko - comment - 12 Sep 2018

Unfortunately docs are not my strong point, neither my code is but lets skip that.
Check how we deal with Font Awesome (bloatware):

So basically duplicating these lines and replacing the names should make the magic copy in media/vendors/roboto/fonts/files...

avatar coolcat-creations
coolcat-creations - comment - 12 Sep 2018

Perfect thank you :-) !!!

avatar ciar4n
ciar4n - comment - 13 Sep 2018

Apart from that you need to make sure that the font covers all the languages that the product could possibly be installed/run. So does this font covers this very simple prerequisite, eg does it support Asian languages?

No. All that is loaded here is latin (120Kb). Compare to Arial Unicode which is 22Mb.

avatar infograf768
infograf768 - comment - 13 Sep 2018

In fact and after some research, whether for Arial or Roboto, a lot of charsets are NOT included in the font and still display in Joomla.
That is why we always need to add Sans-Serif to the font-family.

avatar ciar4n
ciar4n - comment - 13 Sep 2018

If we are going to go ahead and locally load Roboto we probably need to include Greek, Cryillic and Vietnamese to avoid mixed characters in some languages?? That brings font size up to about 260Kb (WOFF2). For older browsers that will be 350Kb (WOFF).

avatar brianteeman
brianteeman - comment - 13 Sep 2018

That brings font size up to about 260Kb (WOFF2). For older browsers that will be 350Kb (WOFF).

Ouch!

avatar brianteeman
brianteeman - comment - 13 Sep 2018

That only works if they are additional fonts. It doesn't work if it is one font with all character sets

avatar bembelimen
bembelimen - comment - 13 Sep 2018

Thatvonly works if they are additional fonts. It doesn't work if it is one font with all character sets

So the solution is not

Ouch!

but:
"Hey good input, let's look how we can do it the improved way"
?

avatar HLeithner
HLeithner - comment - 13 Sep 2018

@brianteeman

That only works if they are additional fonts. It doesn't work if it is one font with all character sets

at least google does exactly this for the font:
https://fonts.googleapis.com/css?family=Roboto&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese"%20rel="stylesheet

You can download the same files from herokuapp.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Sep 2018

i like the Discussion about pro and cons of a possible Solution. Thanks for learning by this.

avatar ciar4n
ciar4n - comment - 13 Sep 2018

if you use the css property unicode-range on loading the additional fonts you don't have this problem.

I can't see unicode-range working here. Presuming you are considering creating a font for each set, how would you stop say a Greek site from loading both Latin and Greek fonts?

Just to mention, Wordpress once loaded a Google font in their admin but recently went to lengths to remove it. Their reasoning for why might be a worthwhile read if anyone can source it.

avatar HLeithner
HLeithner - comment - 13 Sep 2018

My personal opinion is not to force the user/manager/admin to load 3rd party content for there own website. Mainly for privacy reasons. The same reason why I have a adblocker not because I don't want to see ads and support the website owner. The reason is self protection against tracking and drive-by adware.

The other reason is that there is normally no performance gain if you load anything from a CDN.

avatar ciar4n
ciar4n - comment - 13 Sep 2018

Loading the font remotely is not an option. The choices I believe are as follows....

  1. Load Roboto locally (this PR)
  2. Don't load the font but listed it in the font stack
  3. Leave as is
avatar dgrammatiko
dgrammatiko - comment - 13 Sep 2018

2 is the only logical solution

FWIW this was already proposed exactly 4 years ago (14 sept 2014) for ISIS with the only difference I used the Ubuntu font which is also open source and a free d/l: https://github.com/joomla/joomla-cms/pull/4280/files#diff-640427faca138ce1913bd20c2bac8541R47
PR: #4280

avatar coolcat-creations
coolcat-creations - comment - 13 Sep 2018

Unfortunately docs are not my strong point, neither my code is but lets skip that.
Check how we deal with Font Awesome (bloatware):

* https://github.com/joomla/joomla-cms/blob/4.0-dev/package.json#L35

* [joomla-cms/build/build-modules-js/settings.json](https://github.com/joomla/joomla-cms/blob/7d29f87dada9910281473ee6bacecfdbee9e1951/build/build-modules-js/settings.json#L146-L159)
      
      
          Lines 146 to 159
        in
        [7d29f87](/joomla/joomla-cms/commit/7d29f87dada9910281473ee6bacecfdbee9e1951)
      
      
      
      
  
          
            
             "font-awesome": { 
          
  
          
            
               "name": "font-awesome", 
          
  
          
            
               "css": { 
          
  
          
            
                 "css/font-awesome.css": "css/font-awesome.css", 
          
  
          
            
                 "css/font-awesome.min.css": "css/font-awesome.min.css" 
          
  
          
            
               }, 
          
  
          
            
               "filesExtra": { 
          
  
          
            
                 "css/font-awesome.css.map": "css/font-awesome.css.map", 
          
  
          
            
                 "scss": "scss", 
          
  
          
            
                 "fonts": "fonts" 
          
  
          
            
               }, 
          
  
          
            
               "dependencies": [], 
          
  
          
            
               "licenseFilename": "" 
          
  
          
            
             },

So basically duplicating these lines and replacing the names should make the magic copy in media/vendors/roboto/fonts/files...

@dgrammatiko I don't understand the settings.json file... It is loading css instead of .scss - is there any reason for it? I would prefer to have everything in the template.css or what it the reason for this structure? Maybe I just don't understand the logic behind...

avatar dgrammatiko
dgrammatiko - comment - 13 Sep 2018

@coolcat-creations here is some more help:
the name of the nodejs package is roboto-fontface according to https://github.com/choffmeister/roboto-fontface-bower and the version is 0.10.0
This needs to go to Joomla's package.json on the root folder
Then npm install will create the folder in the node_modules.
Next step is to get any files required and placed in media/vendor/somename and this is done in the

"font-awesome": {
"name": "font-awesome",
"css": {
"css/font-awesome.css": "css/font-awesome.css",
"css/font-awesome.min.css": "css/font-awesome.min.css"
},
"filesExtra": {
"css/font-awesome.css.map": "css/font-awesome.css.map",
"scss": "scss",
"fonts": "fonts"
},
"dependencies": [],
"licenseFilename": ""
},

Some explanation here, although might be a little bit off (it's been some time since I wrote this piece of ?):

 "roboto-fontface": { 
   "name": "roboto-fontface",
   "filesExtra": { 
     "fonts": "fonts",
    "css": "scss"
   }, 
   "dependencies": [], 
   "licenseFilename": "LICENSE" 
}
  • Tha name refers to the name of the folder that will be created under vendor
  • css and js is an object that holds the path of the source (node_modules/whatever/someFile.css) and the destination (media/vendor/whatever/someFile.css)
  • The FilesExtra is some magic helper to copy whole folders or files that are not css or js
  • Dependencies is an array that holds any dependencies the script/scss might have. Should be avoided at all costs!!!!
  • licenseFilename is just the license filename (might accept folder structure)
avatar coolcat-creations
coolcat-creations - comment - 15 Sep 2018

Closing this PR due to known reasons.

avatar coolcat-creations coolcat-creations - change - 15 Sep 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-09-15 09:09:27
Closed_By coolcat-creations
avatar coolcat-creations coolcat-creations - close - 15 Sep 2018

Add a Comment

Login with GitHub to post a comment