-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(site): offline bundled lato 2.0 and systemfonts, no googleimport by default #2359
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good as it 👍
@fomantic/maintainers I updated the PR, made it more flexible and used the advises by @mvorisek (thanks again) |
Co-authored-by: Michael Voříšek <[email protected]>
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.
Docs added by fomantic/Fomantic-UI-Docs#383 |
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
@fonts
which 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: false
or 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
@font
variable mixin.I also added
@supportIE
which 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-range
property 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