6
votes
Magento 2 - Remove 'Open Sans' font
To remove the fonts you can override the _typography.less file within your theme. I just did this as was using custom fonts and wanted to remove the unnecessary old fonts from being downloaded.
Move ...
2
votes
Magento 2 - How to add Font Family in admin panel wysiwyg editor?
To do this you need to extend the TinyMCE editor.
Step 1
In file:
magento_dir/lib/web/tiny_mce/themes/advanced/editor_template_src.js
find the line that looks like this and add your font
...
2
votes
Accepted
Ensure text remains visible during webfont load: Doesn't work on added fonts
First correct path file _typography.less should be
app/design/frontend/yourTHEME/VENDOR/web/css/source/_typography.less
you need add font like below
.lib-font-face(
@family-name: 'review-stars',
...
2
votes
Magento 2 font-display: swap
you can add it to your file _typography.less changed mixin
.lib-font-face(
@family-name,
@font-path,
@font-weight: normal,
@font-style: normal,
@font-display: swap
) {
@font-face {
...
2
votes
Accepted
Magento2: How to use custom font
You can import your new font like this:
style.css
@font-face {
font-family: Dinpro;
src: url(../fonts/Dinpro.ttf);
}
You put your Dinpro.ttf in app/design/frontend/{Vendor}/{themename}/...
1
vote
Magento 2 : How Can I disable woff2 format?
To disable the woff2 format and use only woff in Magento 2, you need to override the _typography.less file where the @font-face is defined. Here are the steps:
Create a new _typography.less file in ...
1
vote
Magento 2 : How Can I disable woff2 format?
@WhoYou
Hey,
You can edit the woff2 font format to woff by change/edit theme's or custom font css file.
Like go to css file where @font-face {} is used than just remove woff2 line than just simple ...
1
vote
Magento 2 - How to add Font Family in admin panel wysiwyg editor?
You can do It on several levels:
Directly for special WYSIWYG editor
For all WYSIWYG editors in Magento
Let's look for both solutions
Define new module
file-path app/code/Project/Wysiwyg/...
1
vote
Accepted
Google fonts not working in Firefox
The reason was a dummy one, but maybe someone in the future will have the same issue.
It was just that I had an option checked in Firefox, that can be found at
Options / Content / Fonts & Colours ...
1
vote
magento2 google font not working
Try setting up your xml file like this:
app/design/frontend/{{vendor}}/{{theme}}/Magento_Theme/layout/default_head_blocks.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/...
1
vote
how do add new font in magento2 with custom module in frontend?
Include link for the font in header of Magento using the below-mentioned code
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
font-family × 23magento2 × 12
fonts × 11
magento-1.9 × 4
theme × 4
css × 4
frontend × 3
design × 2
magento-1.7 × 1
php × 1
module × 1
xml × 1
custom × 1
email-templates × 1
magento-2.0 × 1
magento-community × 1
pdf × 1
cms-pages × 1
less × 1
magento2.4.2 × 1
rwd-theme × 1
wysiwyg × 1
local.xml × 1
editor × 1
scss × 1