View Issue Details

This bug affects 2 person(s).
 20
IDProjectCategoryView StatusLast Update
19081Bug reportsAssetspublic2023-11-13 15:43
Reportertigurr Assigned Totibor.pacalat  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version6.2.x 
Summary19081: Lato fonts are loaded from Google fonts instead of solely using the ones shipped with limesurvey itself
Description

https://github.com/LimeSurvey/LimeSurvey/blob/master/assets/fonts/lato.css references the lato font shipped with limesurvey under the directory at https://github.com/LimeSurvey/LimeSurvey/tree/master/assets/fonts/font-src

however probably due to the reference to google fonts at

https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/flatly.min.css#L12

the new default Bootswatch theme actually load fonts from google fonts instead of solely using the ones shipping them with limesurvey itself. This can be be considered a privacy issue, e.g. in Germany.

Steps To Reproduce

Steps to reproduce

  1. set bootswatch theme
  2. observe the browser console (sources and/or network) - see attached screenshot

Expected result

Have everything loaded from the server limesurvey is hosted on instead of fetching stuff from other servers e.g. google.

Actual result

Observe fonts loaded from fonts.googleapis.com & fonts.gstatic.com

TagsNo tags attached.
Attached Files
googlefonts.png (36,435 bytes)   
googlefonts.png (36,435 bytes)   
Bug heat20
Complete LimeSurvey version number (& build)6.2.6+230904
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMariaDB 10.11.4
Server OS (if known)
Webserver software & version (if known)
PHP Version8.1.21

Users monitoring this issue

There are no users monitoring this issue.

Activities

tigurr

tigurr

2023-09-13 13:59

reporter   ~76982

I've just noticed the various css variations also reference different fonts so it might also apply to not only lato and flatly.min.css in case of using a different variation. In our case and from there the screenshot is we didn't select any variation in the "Variations" dropdown list of "Survey options for theme bootswatch" (basically because none them is without issues in regards to readability and colors but that's another thing not relevant or related to this bug report).

gabrieljenik

gabrieljenik

2023-10-17 13:21

manager   ~77737

@tigurr, can I ask you to test the changes in here?
https://github.com/LimeSurvey/LimeSurvey/pull/3543/

If good, we will go ahead and apply them to the rest of the variations.

Thanks

tigurr

tigurr

2023-10-17 15:56

reporter   ~77746

@gabrieljenik flatly.min.css from https://github.com/LimeSurvey/LimeSurvey/pull/3543/ appears to work fine for me, though I had to also clean tmp/assets/ after replacing the file for limesurvey to pick up the changes.

gabrieljenik

gabrieljenik

2023-10-18 19:11

manager   ~77773

We noticed source-sans-pro.css is also served from cloud while it could be served locally. Can you confirm? Thanks

tigurr

tigurr

2023-10-20 12:39

reporter   ~77804

@gabrieljenik well of course, like I stated in comment https://bugs.limesurvey.org/view.php?id=19081#c76982 above, there are plenty of other fonts referenced from google in the various css variations. Maybe that's on purpose but it would be nice to just have a font selection on the bootswatch theme itself like in fruity instead of the various css variants shipping their own fonts hardcoded.

Roboto: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/cyborg.min.css
Roboto: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/sandstone.min.css
New Cycle: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/journal.min.css
Source Sans: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/lumen.min.css
Open Sans: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/simplex.min.css
Open Sans: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/spacelab.min.css
Open Sans: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/yeti.min.css
Ubuntu: https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/bootswatch/css/variations/united.min.css

gabrieljenik

gabrieljenik

2023-10-25 19:07

manager   ~78014

Last edited: 2023-10-25 19:07

After going deeper into this found the following:

Local Fonts

Some themes already support local fonts, like Fruity.

Fonts are published as packages and they can be configured using the config/fonts.php
Thats when the tmp/assets/xxx/font.css is created.

Then, the options.js (or similar) from the theme manages to turn the font selection into a parameter in the packages_to_load option.
That's when the font.css is imported (Actually linked to the webpage as a header).

Bootswatch

Bootswatch doesn't have the same mechanism.
Still, in the past some local font was configured there as well.
18422
https://github.com/LimeSurvey/LimeSurvey/pull/2689
Unluckily, this change was probbaly lost when merging v6 into master.

It used the same approach as we did on this PR: On the CSS do /@import url(../../../../../assets/fonts/lato.css)

Denis did a good question: What happens when asset manager is not being used?
It works, but why?

So we dig a little bit.
Answer is it works just by luck :)
When using the asset manager, the published CSS is in a structre with similar depth as when the asset manager is not used.
Then the import doens't fail.

http://localhost:8000/limesurvey/themes/survey/bootswatch/css/variations/cosmos.min.css
http://localhost:8000/limesurvey/tmp      /assets/d5dd6f4d  /css/variations/cosmos.min.css

Conclusions

Could we use in Bootswatch the system ued fro fruity?
Maybe.

Does it worth it?
Not sure. I believe not.

I would rather patch all files from bootswatch as it was on 18422, which was already the way to go.
Maybe re apply it as well.

Lookforward to your comments.

tigurr

tigurr

2023-10-26 13:26

reporter   ~78041

I second your opinion, everything else would probably be something for possible future developement/improvements and is out of scope for just fixing this issue for now, however I'm just a reporter and not involved in developement whatsoever.

I don't want to hijack this thread at all but just a simple question regarding the future and defaults in general as fruity was mentioned. Is fruity still considered the standard / best supported theme, somehow I got under the maybe false impression bootswatch might actually replace it as the default/standard theme in the (near) future(?). Thanks in advance for any claraification on this subject so I know where we possibly may invest time in adapting the theme for our needs to not have to start all over any time soon.

p_teichmann

p_teichmann

2023-10-26 16:42

administrator   ~78052

I think it is fine to keep the current implementation for bootswatch, however i would at some point prefer to add compiling steps to it as well to prevent us from having to edit minified files.
The fonts should be loaded through packages which are dependend on what i select in the themes font options, currently this doesn't seem to work correctly and no font at all is additionally loaded from the local font files.
Regarding which theme will be the main theme, that is currently "Fruity TwentyThree" > "fruity" and bootswatch/vanilla as alternatives.

gabrieljenik

gabrieljenik

2023-11-02 22:38

manager   ~78218

Last edited: 2023-11-02 22:39

I would open a separate ticket as to assses if 18422 needs to be reaplied or not.
(Or reopen it)

DenisChenu

DenisChenu

2023-11-03 08:52

developer   ~78226

Already test it : OK for core theme.

gabrieljenik

gabrieljenik

2023-11-03 12:50

manager   ~78245

@tigurr if you wish to help by testing a bit more would be great!

Thanks

DenisChenu

DenisChenu

2023-11-03 14:52

developer   ~78246

The fonts should be loaded through packages which are dependend on what i select in the themes font options

Its' variation here , need to set variation in package ?

Else : good idea.

tibor.pacalat

tibor.pacalat

2023-11-07 16:56

administrator   ~78326

@gabrieljenik there are some code checks that are failing https://github.com/LimeSurvey/LimeSurvey/actions/runs/6668816209?pr=3543

gabrieljenik

gabrieljenik

2023-11-07 18:00

manager   ~78328

Will merge master on top of it

gabrieljenik

gabrieljenik

2023-11-08 21:09

manager   ~78343

Green

tibor.pacalat

tibor.pacalat

2023-11-09 19:27

administrator   ~78364

Tested and merged.

guest

guest

2023-11-09 19:32

viewer   ~78366

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35738

LimeBot

LimeBot

2023-11-13 15:43

administrator   ~78431

Fixed in Release 6.3.5+231113

Related Changesets

LimeSurvey: master 47ec6559

2023-11-09 19:26:46

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 19081: Lato fonts are loaded from Google fonts instead of solely using the ones shipped with limesurvey itself (#3543)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
19081
add - themes/survey/bootswatch/css/variations/README.txt Diff File
mod - themes/survey/bootswatch/css/variations/cosmos.min.css Diff File
mod - themes/survey/bootswatch/css/variations/cyborg.min.css Diff File
mod - themes/survey/bootswatch/css/variations/darkly.min.css Diff File
mod - themes/survey/bootswatch/css/variations/flatly.min.css Diff File
mod - themes/survey/bootswatch/css/variations/journal.min.css Diff File
mod - themes/survey/bootswatch/css/variations/lumen.min.css Diff File
mod - themes/survey/bootswatch/css/variations/paper.min.css Diff File
mod - themes/survey/bootswatch/css/variations/readable.min.css Diff File
mod - themes/survey/bootswatch/css/variations/sandstone.min.css Diff File
mod - themes/survey/bootswatch/css/variations/simplex.min.css Diff File
mod - themes/survey/bootswatch/css/variations/spacelab.min.css Diff File
mod - themes/survey/bootswatch/css/variations/superhero.min.css Diff File
mod - themes/survey/bootswatch/css/variations/yeti.min.css Diff File

Issue History

Date Modified Username Field Change
2023-09-13 12:14 tigurr New Issue
2023-09-13 12:14 tigurr File Added: googlefonts.png
2023-09-13 13:49 ollehar Priority none => high
2023-09-13 13:59 tigurr Note Added: 76982
2023-09-13 13:59 tigurr Bug heat 0 => 2
2023-09-13 15:37 gabrieljenik Assigned To => gabrieljenik
2023-09-13 15:37 gabrieljenik Status new => assigned
2023-10-17 13:21 gabrieljenik Note Added: 77737
2023-10-17 13:21 gabrieljenik Bug heat 2 => 4
2023-10-17 13:21 gabrieljenik Status assigned => feedback
2023-10-17 15:56 tigurr Note Added: 77746
2023-10-17 15:56 tigurr Status feedback => assigned
2023-10-18 19:11 gabrieljenik Note Added: 77773
2023-10-20 12:39 tigurr Note Added: 77804
2023-10-25 19:07 gabrieljenik Note Added: 78014
2023-10-25 19:07 gabrieljenik Note Edited: 78014
2023-10-25 19:07 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2023-10-25 19:07 gabrieljenik Status assigned => feedback
2023-10-26 13:26 tigurr Note Added: 78041
2023-10-26 13:26 tigurr Status feedback => assigned
2023-10-26 16:16 tibor.pacalat Bug heat 4 => 6
2023-10-26 16:42 p_teichmann Note Added: 78052
2023-10-26 16:42 p_teichmann Bug heat 6 => 8
2023-10-27 14:08 tibor.pacalat Bug heat 8 => 6
2023-11-02 22:38 gabrieljenik Note Added: 78218
2023-11-02 22:39 gabrieljenik Note Edited: 78218
2023-11-02 22:45 gabrieljenik Assigned To tibor.pacalat => DenisChenu
2023-11-02 22:45 gabrieljenik Status assigned => ready for code review
2023-11-03 08:52 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-11-03 08:52 DenisChenu Status ready for code review => ready for testing
2023-11-03 08:52 DenisChenu Note Added: 78226
2023-11-03 08:52 DenisChenu Bug heat 6 => 8
2023-11-03 12:49 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2023-11-03 12:50 gabrieljenik Note Added: 78245
2023-11-03 14:52 DenisChenu Note Added: 78246
2023-11-06 13:54 guest Bug heat 8 => 14
2023-11-07 16:56 tibor.pacalat Note Added: 78326
2023-11-07 16:56 tibor.pacalat Bug heat 14 => 16
2023-11-07 18:00 gabrieljenik Note Added: 78328
2023-11-08 21:09 gabrieljenik Note Added: 78343
2023-11-09 19:27 tibor.pacalat Status ready for testing => resolved
2023-11-09 19:27 tibor.pacalat Resolution open => fixed
2023-11-09 19:27 tibor.pacalat Note Added: 78364
2023-11-09 19:32 Changeset attached => LimeSurvey master 47ec6559
2023-11-09 19:32 guest Note Added: 78366
2023-11-09 19:32 guest Bug heat 16 => 18
2023-11-13 15:43 LimeBot Note Added: 78431
2023-11-13 15:43 LimeBot Status resolved => closed
2023-11-13 15:43 LimeBot Bug heat 18 => 20