Forum How do I...?

font question

sambodhiprem
Hi,

Terminal seems to be unhappy about the font 'Droid-Serif':

cpe-124-181-130-216:~ sambodhiprem$ prince /Volumes/Silent\ Sky/Dropbox/Websites/MyWayTheWayOfTheWhiteClouds/White-Cloud-book/chapter01.html 
prince: /Volumes/Silent Sky/Dropbox/Websites/MyWayTheWayOfTheWhiteClouds/White-Cloud-book/css/mywaythewayofthewhiteclouds.css: warning: failed to parse all CSS rules
prince: /Volumes/Silent Sky/Dropbox/Websites/MyWayTheWayOfTheWhiteClouds/White-Cloud-book/css/../img/hr-cloud.png: warning: can't open input file: No such file or directory
prince: warning: cyclic @font-face redirect to "Droid Serif"
prince: /Volumes/Silent Sky/Dropbox/Websites/MyWayTheWayOfTheWhiteClouds/White-Cloud-book/css/../font/Droid_Serif/DroidSerif.ttf: warning: cannot open resource




I have attached Droid-Serif in the css like so:

@import url(http://fonts.googleapis.com/css?family=Droid+Serif:400,400italic);
@import url(http://fonts.googleapis.com/css?family=Droid+Sans);


@import "clouds-pdf.css";

@font-face {
    font-family: 'Droid Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Droid Sans'), local('Droid-Sans'), url(../font/Droid_Sans/DroidSans.ttf) format('truetype');
}

@font-face {
    font-family: 'Droid Serif';
    font-style: normal;
    font-weight: 300;
    src: local('Droid Serif'), local('Droid-Serif'), url(../font/Droid_Serif/DroidSerif.ttf) format('truetype');
}




What corrections do I need to make for Droid Serif to show up in the pdf?

http://sambodhiprem.com/

mikeday
Prince doesn't like this:
font-family: Droid Serif;
src: local('Droid Serif')

Currently, Prince allows local() to redirect to other @font-face rules, so in this case it redirects cyclically to the same @font-face rule, causing problems. If you remove these local redirects it will work.
_savage
These are not case sensitive, it seems?

@font-face {
  font-family: tahoma;
  font-style: normal;
  font-weight: normal;
 /* src: local("Tahoma"); */
}


Commenting out src removed the warning, and everything still works.
mikeday
Commenting out src will make the @font-face rule non-functional, and Prince will find the Tahoma font anyway, if it is a system font.