Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Garbage character displayed while printing web fonts from Google Chrome

I have a problem with printing web fonts from Google chrome v 18 but it works totally fine with IE and Firefox, I am using CSS file to pass the web fonts and the code for it is as follows.

@font-face {

font-family: 'C39P24DmTtNormal';
src: url('WebFonts/v100025_-webfont.eot');
src: url('WebFonts/v100025_-webfont.eot?#iefix') format('embedded-opentype'),
     url('WebFonts/v100025_-webfont.woff') format('woff'),
     url('WebFonts/v100025_-webfont.ttf') format('truetype'),
     url('WebFonts/v100025_-webfont.svg#C39P24DmTtNormal') format('svg');

font-weight: normal;
font-style: normal;
}

Issue Screen-Shot:

enter image description here

Image Description:

In the above screen-shot all the ones marked in red are the bar-codes provided by the web fonts in CSS file but while printing are shown as above.

I tried to search on Google, but it seems to be a possible bug with Chrome and they are trying to fix it as soon as they can.

Is there any kind of workaround that can help me as I don't want my clients to install the fonts on each and every computer they use to browse my web application.

like image 257
Karan Shah Avatar asked Nov 14 '22 07:11

Karan Shah


1 Answers

Put .svg at the start of the sources and try with different formats, like .svg as truetype:

@font-face {
    font-family: 'EnzoOT-Medi';
    src: url('font.eot');
    src: url('font.svg') format('truetype'),
         url('font.eot?#iefix') format('embedded-opentype'),
      url('font.woff') format('woff'),
      url('font.ttf') format('truetype'),
      url('font.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}
like image 98
laszlo-horvath Avatar answered Dec 23 '22 04:12

laszlo-horvath