? No Code Attached Yet
avatar coolcat-creations
coolcat-creations
11 Aug 2022

Is your feature request related to a problem? Please describe.

I tried to show my Joomla Kids how to customize Cassiopeia. In Germany you are not allowed to embed Google Fonts so you have to upload them into the template.
It's not possible to upload it because of security restriction.

Describe the solution you'd like

Allow Upload of:
eot, woff, otf, ttf, woff2 and svg into a font folder of the template through the template manager

avatar coolcat-creations coolcat-creations - open - 11 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 11 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Aug 2022
avatar mariantanase
mariantanase - comment - 12 Aug 2022

Also in Italy

In Germany you are not allowed to embed Google Fonts so you have to upload them into the template.

avatar dgrammatiko
dgrammatiko - comment - 12 Aug 2022

Only woff and woff2 fonts should be supported, all the others are really, really old...

avatar coolcat-creations
coolcat-creations - comment - 12 Aug 2022

The others are standard in the webfont kits that myfonts and other services are providing. To not make it too complicated I would suggest just to whitelist all the font formats as it does not hurt and prevents frustration when trying to upload and it does not work.

avatar chmst chmst - change - 12 Aug 2022
Labels Added: ?
avatar chmst chmst - labeled - 12 Aug 2022
avatar dgrammatiko
dgrammatiko - comment - 12 Aug 2022

I have no idea what tools you're using but the most known (GUI) one defaults to also WOFF and WOFF2. The reason is simple the other ones are for old IE (eg IE < 8)... (TTF is huge for the web and you should not use it)

Screenshot 2022-08-12 at 20 19 26

avatar Fedik Fedik - change - 12 Aug 2022
Title
Joomla 4.1.5 - Enable upload of font files to the template manager
Enable upload of font files to the template manager
avatar Fedik Fedik - edited - 12 Aug 2022
avatar Fedik
Fedik - comment - 12 Aug 2022

I have removed version from the title, because it feature request, and having a version in the title may confuse ?

avatar coolcat-creations
coolcat-creations - comment - 12 Aug 2022

Thank you @Fedik
@dgrammatiko I use for example myfonts and the https://google-webfonts-helper.herokuapp.com/fonts both deliver the full package. It does not harm to allow the files so why discussing it? It's worse for a beginner not to be able to upload and being confused by it.

avatar dgrammatiko
dgrammatiko - comment - 12 Aug 2022

@coolcat-creations I just stated that the CMS should not promote deprecated/unsupported things. Anyways, I have my own solution that doesn't require any of all that copy/paste/upload/etc (I even tried to contribute that in the core: #30914)

Screen.Recording.2022-08-12.at.23.05.57.mp4
avatar coolcat-creations
coolcat-creations - comment - 12 Aug 2022

What's wrong with allowing file types that are common for templates in the template manager?

avatar coolcat-creations coolcat-creations - change - 13 Aug 2022
Title
Enable upload of font files to the template manager
Enable upload of template file formats to the template manager
avatar coolcat-creations coolcat-creations - edited - 13 Aug 2022
avatar coolcat-creations coolcat-creations - change - 13 Aug 2022
The description was changed
avatar coolcat-creations coolcat-creations - edited - 13 Aug 2022
avatar coolcat-creations
coolcat-creations - comment - 13 Aug 2022

I added also the wish for allowing .min. in filenames. renaming template.min.css for example to style.min.css does not work.

avatar brianteeman
brianteeman - comment - 13 Aug 2022

Thats a slightly different issue so could you please make a new issue for that (if there isnt one already) - the reason that you cannot currently upload a ..* file was to address a security issue (which may not be relevant anymore)

avatar coolcat-creations coolcat-creations - change - 13 Aug 2022
Title
Enable upload of template file formats to the template manager
Enable upload of font file formats to the template manager
avatar coolcat-creations coolcat-creations - edited - 13 Aug 2022
avatar coolcat-creations coolcat-creations - change - 13 Aug 2022
The description was changed
avatar coolcat-creations coolcat-creations - edited - 13 Aug 2022
avatar HLeithner
HLeithner - comment - 13 Aug 2022

The reason not to support legacy or better deprecated file types is to make it easier for people to do the right thing. If you only allow state of the art (in this case only needed) file types you automatically teach people to do the right thing and they don't need to make there own research what they have to do.

I personally would only allow woff2, the usage difference is about 1,5% an that's mainly IE users (0,97) and some really dated android versions (0,44%). 100% isn't possible because Opera mini doesn't support webfonts at all.

avatar N6REJ
N6REJ - comment - 13 Aug 2022

@coolcat-creations I just stated that the CMS should not promote deprecated/unsupported things. Anyways, I have my own solution that doesn't require any of all that copy/paste/upload/etc (I even tried to contribute that in the core: #30914)

Screen.Recording.2022-08-12.at.23.05.57.mp4

@coolcat-creations does his video solve the issue or is that too complex for the kids?
We definitely need to support our kids. The winning popularity of raspberry pi's proves that point.

avatar brianteeman
brianteeman - comment - 13 Aug 2022

Instead of wasting time debating which font formats to support why not spend the time more productively on an actual method to upload the files.

PS joomla already has support for those other font formats in the preview

avatar brianteeman
brianteeman - comment - 14 Aug 2022

It's not possible to upload it because of security restriction.

It is currently perfectly possible to upload ttf, woff and otf fonts in the template manager - don't know why you could not?

The only one that cannot be uploaded currently is woff2 and all thata has to be done is to add it to the list of font formats in the template options.

image

image

woff2 can be added to the default for new installs if desired - upgraded sites will need to update the options themself

avatar brianteeman
brianteeman - comment - 14 Aug 2022

please remove the new feature tag as its already possible

avatar coolcat-creations
coolcat-creations - comment - 15 Aug 2022

I tested again and It's not possible to upload eot and woff files. These are all files contained in the herokuapp package. If it's not adviseable to use these font formats the error should say: "You don't need this font format, we advise you to only upload woff" - A beginner does not know why you dissallow the upload of a font what for example myfonts.com or herokuapp is giving you. and if .eot is the first font in the list to upload why should I bother to try upload the others? Well, thats what happened. It would be great to either fix the error message or to let the user decide himself what he needs in the template.

avatar brianteeman
brianteeman - comment - 15 Aug 2022

eot is not in the list of allowed file types as defined in the component options. Add it and you will be able to upload.
I have no problem uploading woff files at all as shown in the screenshot.

I have discovered a mismatch between the default options in the component (includes woff2) and the default options created in the database (does not include woff2). I will do a pr for that but it will only impact on new installs see #38465. For existing installs just go to the template options and add woff2

avatar dgrammatiko
dgrammatiko - comment - 15 Aug 2022

@coolcat-creations couple of things:

avatar coolcat-creations
coolcat-creations - comment - 15 Aug 2022

Ok, got you @brianteeman and @dgrammatiko - can we also add something to the error messages to understand why something is blocked? A beginner just does not understand and thinks Joomla does not work properly. Also the Filemanager is weird you have to click a folder before uploading and you can't move files when you forgot. But thats another issue.

I have discovered a mismatch between the default options in the component (includes woff2) and the default options created in the database (does not include woff2). I will do a pr for that but it will only impact on new installs. For existing installs just go to the template options and add woff2

Thank you, appreciate that!

avatar brianteeman
brianteeman - comment - 15 Aug 2022

What more do you want than is there currently

image

avatar coolcat-creations
coolcat-creations - comment - 15 Aug 2022

@coolcat-creations I just stated that the CMS should not promote deprecated/unsupported things. Anyways, I have my own solution that doesn't require any of all that copy/paste/upload/etc (I even tried to contribute that in the core: #30914)
Screen.Recording.2022-08-12.at.23.05.57.mp4

Sorry somehow I overlooked this, this is a very nice solution!

avatar coolcat-creations
coolcat-creations - comment - 15 Aug 2022

What more do you want than is there currently

image

Maybe something like "You tried to upload a svg font. Svg fonts are a outdated format and should not be used anymore. Try to upload a woff file"

avatar brianteeman
brianteeman - comment - 15 Aug 2022

Then you would need to have a message for every single type of file

avatar coolcat-creations
coolcat-creations - comment - 15 Aug 2022

Or maybe we add a message like: This file format is not supported. To read more about why click here on manuals.joomla.org/supported-file-formats.... And there we could explain for severall file formats why they are outdated. ?

avatar brianteeman
brianteeman - comment - 15 Aug 2022

But it might not be that they are outdated. It might be that they are really not supported on the web or that they are too new a format etc.

avatar coolcat-creations
coolcat-creations - comment - 15 Aug 2022

But it might not be that they are outdated. It might be that they are really not supported on the web or that they are too new a format etc.

Yes we could explain that all on the manuals page - Hopefully the manuals Page will have a module like "was this explanation helpful for you?" at the end so we can get feedback from the users where to improve. @bembelimen

avatar brianteeman
brianteeman - comment - 15 Aug 2022

i thought the manuals site was for developer docs not user docs?

avatar coolcat-creations
coolcat-creations - comment - 15 Aug 2022

Oh I thought it would be a full new documentation for every level... @bembelimen ? Is it only for developers?

avatar HLeithner
HLeithner - comment - 22 Aug 2022

yes https://manual.joomla.org is primary used for "developer" documentation

avatar brianteeman
brianteeman - comment - 22 Aug 2022

I think I forgot to reference #38465

avatar brianteeman
brianteeman - comment - 24 Aug 2022

There really is nothing to do here and this should be closed. It is already possible to upload fonts. A small bug that woff2 wasn't appearing on the list has already been fixed. The only remaining thing is to add documentation links to error messages. There is already an open issue for that from the op.

Please close

avatar coolcat-creations coolcat-creations - change - 24 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-24 07:17:29
Closed_By coolcat-creations
avatar coolcat-creations coolcat-creations - close - 24 Aug 2022

Add a Comment

Login with GitHub to post a comment