feat(site): offline bundled lato 2.0 and systemfonts, no googleimport by default#2359
Merged
lubber-de merged 6 commits intofomantic:developfrom May 29, 2022
Merged
feat(site): offline bundled lato 2.0 and systemfonts, no googleimport by default#2359lubber-de merged 6 commits intofomantic:developfrom
lubber-de merged 6 commits intofomantic:developfrom
Conversation
This was referenced Apr 30, 2022
Closed
This was referenced Apr 30, 2022
mvorisek
reviewed
Apr 30, 2022
prudho
previously approved these changes
May 4, 2022
Contributor
prudho
left a comment
There was a problem hiding this comment.
I think it looks good as it 👍
Member
Author
|
@fomantic/maintainers I updated the PR, made it more flexible and used the advises by @mvorisek (thanks again) |
mvorisek
reviewed
May 16, 2022
Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
lubber-de
added a commit
that referenced
this pull request
May 31, 2022
This PR makes all IE specific LESS code optional. By default the new variable @supportIE (introduced by #2359 ) is true, so the code compiles as before Early Edge Legacy versions still use the IE11 engine / -ms prefix syntax, so setting supportIE: false; will also disable support for those browsers.
Member
Author
|
Docs added by fomantic/Fomantic-UI-Docs#383 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR bundles the recent Lato 2.0 Font. It uses the same styles as the previous googleFonts Import does.
This fixes possible GDPR issues as the default theme now disables googlefont import.
I implemented a new variable
@fontswhich allows for a totally free description of font faces to be imported if needed. Each declared property will be used, so one can customize them as needed by that single variable.Disabling the whole import can be done via
@importFont: falseor setting@font: {}or setting@fontName: ''just as one likes.The new variables for unicode or font properties are done to simplify the default import and of course if one just wants to adjust them without redeclaring the whole
@fontvariable mixin.I also added
@supportIEwhich allows to disable the woff-font import, as all other supported browsers support woff2 already.The default theme uses Lato-Latin 2.0 now which is smaller in size but includes the most important glyphs for European Latin-based languages which were missing in Lato v1 (via googlefonts) like in "Řeřicha"
It also uses Lato with Greek+Cyrillic+Extended 2.0 via
unicode-rangeproperty which makes sure the font is only loaded when related characters are used inside the page.If no character matches at all, the system fonts will be used as fallback.
I created the unicode ranges by analyzing the fonts character ranges using https://github.com/fontforge/fontforge
I also added an optional theme to adjust the font via a change in theme.config:
The used Lato fonts are available free of charge under the SIL Open Font License from http://www.latofonts.com/
Testcase
Build FUI :)
To test System Fonts
theme.config:Screenshots
Closes
#367
#2355
Semantic-Org/Semantic-UI#7075