@ font-face attachment in iOS 3.0 - 4.1

here is an example of my CSS (which works in iOS 4.2) but does not work in any earlier versions of iOS <4.1)

/**** CSS3 Font embedding ****/
@font-face {
font-family: 'ChevinLight';
src: url('./uploads/fonts/chevilig-webfont.eot');
src: url('./uploads/fonts/chevilig-webfont.ttf') format('truetype'), url('./uploads/fonts/chevilig-webfont.svg') format('svg');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'ChevinBold';
src: url('./uploads/fonts/chevibol-webfont.eot');
src: url('./uploads/fonts/chevibol-webfont.ttf') format('truetype'), url('./uploads/fonts/chevibol-webfont.svg') format('svg');
font-weight: normal;
font-style: normal;
}


body {
height: 100%;
font-family: Helvetica, Arial, sans-serif;
background: #009933;
padding: 0 10px 0 10px;
}


/****** ELEMENTS *****/
h1, h2 {
text-transform: uppercase;
color: #FFFFFF;
}
h1 {
font-family: 'ChevinBold', Helvetica, Arial, sans-serif;
font-size: 16px;
margin: 0 0 5px 0;
font-weight: normal;
line-height: 1px;
}
h2 {
font-family: 'ChevinLight', Helvetica, Arial, sans-serif;
font-size: 16px;
margin: 6px 0 5px 0;
font-weight: normal;
line-height: 1px;
}
p {
font-family: 'ChevinLight', Helvetica, Arial, sans-serif;
font-size: 15px;
font-weight: normal;
color: #FFFFFF;
}

I cannot develop (or find) a way to embed fonts in these earlier versions of Safari in these versions of iOS.

Can someone please help?

Thank.

+3
source share
2 answers

SVG fonts should be specified as follows:

@font-face {
    font-family: 'KomikaHandRegular';
    src: url('Komika_Hand-webfont.ttf') format('truetype'),
         url('Komika_Hand-webfont.svg#webfontATHY6trD') format('svg');
    font-weight: normal;
    font-style: normal;
}

... where #webfontATHY6trDis the font identifier in the SVG file. It should look something like this (just open it in a text editor):

font id="webfontATHY6trD" horiz-adv-x="1259"
+6
source

svg. - , , squirrel .

0

Source: https://habr.com/ru/post/1787836/


All Articles