Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
680 views
in Technique[技术] by (71.8m points)

css - Chrome 10/Windows @font-face encoding trouble

Has anyone come across something like this exclusively in Chrome 10/Win?

Screenshot of non-breaking spaces being replaced by question mark and square characters

All the non-breaking spaces in these two webfonts aren't rendered properly. Working in IE7/8/9, Firefox, Safari, and Chrome/OSX.

Contents of my fonts.css file:

@font-face {
    font-family: 'Hellenic';
    src: url('../fonts/eot/hellenic.eot?') format('eot'),
         url('../fonts/ttf/hellenic.ttf') format('truetype'),
         url('../fonts/woff/hellenic.woff') format('woff'), 
         url('../fonts/svg/hellenic.svg#MCMHellenicWide') format('svg');
}

@font-face {
    font-family: 'Lasalle';
    src: url('../fonts/eot/lasalle.eot?') format('eot'),
         url('../fonts/ttf/lasalle.ttf') format('truetype'),
         url('../fonts/woff/lasalle.woff') format('woff'), 
         url('../fonts/svg/lasalle.svg#FilmotypeLaSalle') format('svg');
}

@font-face {
    font-family: 'LeagueGothic';
    src: url('../fonts/eot/leaguegothic.eot?') format('eot'),
         url('../fonts/ttf/leaguegothic.ttf') format('truetype'),
         url('../fonts/woff/leaguegothic.woff') format('woff'), 
         url('../fonts/svg/leaguegothic.svg#svgFontName') format('svg');
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It is highly likely that the webfont is not assembled properly.

I have downloaded CaviarDreams font which is used on Sebastian's site and got the same bug.

Then I downloaded it from here: http://www.dafont.com/caviar-dreams.font, used fontsquirrel.com's typekit generator, and the result was perfectly fine.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...