T
T
tripcollor2017-12-07 08:58:10
css
tripcollor, 2017-12-07 08:58:10

How to connect a font from another domain (as google fonts does)?

It is necessary to compose a letter with a non-standard font that is not in google fonts, I thought it would be possible to do something similar myself, but it didn’t work.
What I did: I uploaded the fonts themselves and the @font-face styles to my domain and connected to them in html in this way (the link is working):

<link href="http://kangoroom.ru/MuseoSansCyr/stylesheet.css" rel="stylesheet">

at this link you can see how I registered all @font-face , I made the paths to the fonts in this way
url('http://kangoroom.ru/MuseoSansCyr/MuseoSansCyrl-700.woff2')

I set the font family in styles, but nothing happens
font-family: 'MuseoSansCyrl-500';
Tell me what I did wrong or how can I make it work

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2017-12-07
@tripcollor

Most email clients will simply ignore your external css file. Add the rules directly to the html, just like you would with a normal email layout.
You also need to transfer the fonts to the HTTPS protocol, add the correct SSL certificate, and make sure that the correct cross-origin headers are configured on the server.

A
Andrey Fatyuk, 2017-12-07
@fatuk

Where is the page hosted? Why not keep the font and css in the same place?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question