i want to change semantic-ui default font with @font-face but no matter...
i tried change in less file(site.variables) but I do not know how change it
i tried add my font with other custom css file but it not work
@font-face {
font-family: 'fontname';
src:url('themes/basic/assets/fonts/fontname.eot');
src:url('themes/basic/assets/fonts/fontname.eot?#') format('eot'),
url('themes/basic/assets/fonts/fontname.woff') format('woff');
}
body{
font-family: 'fontname';
}
Go to Format > Font > Font. + D to open the Font dialog box. Select the font and size you want to use. Select Default, and then select Yes.
Semantic includes a complete port of Font Awesome 5.0. 8 designed by the FontAwesome team for its standard icon set.
To override say, the font color, all we have to do is write a selector that is more specific than this selector. We can achieve this by combining their two class selectors (equally specific) with a type selector (additional specificity).
By default, React Material UI uses the Roboto font to build the components.
I know two ways to change font-face, using google fonts or offline fonts:
https://semantic-ui.com/introduction/getting-started.html
It is required to create the file site.variables
in semantic/src/site/globals/
We search for the source that we like most at https://fonts.google.com/ and copy the name.
In the file site.variables
we add the name of the font to the variable @fontName
as follows:
/*******************************
User Global Variables
*******************************/
@fontName : 'Roboto';
glup build-css
, the changes will be reflected in the file semantic /dist/semantic.css
https://semantic-ui.com/introduction/getting-started.html
It is required to create the file site.variables
in semantic/src/site/globals/
In the file site.variables
we add the variable @importGoogleFonts
with the value false
;
/*******************************
User Global Variables
*******************************/
@importGoogleFonts : false;
@fontName : 'fontname';
It is required to create the file site.overrides
in semantic/src/site/globals /
In the file site.overrides
we add our font-face
/*******************************
Site Overrides
*******************************/
@font-face {
font-family: 'fontname';
src:url('themes/basic/assets/fonts/fontname.eot');
src:url('themes/basic/assets/fonts/fontname.eot?#') format('eot'),
url('themes/basic/assets/fonts/fontname.woff') format('woff');
}
gulp build-css
, the changes will be reflected in the file semantic /dist/semantic.css
This video maked by @Aditya Giri explain how change font family from google fonts
https://www.youtube.com/watch?v=cSdKA-tZEbg
In the next issue @jlukic explain how use offline fonts
https://github.com/Semantic-Org/Semantic-UI/issues/1521
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With