Hi,
I was just rereading the
CSS definition on font-weight, and it is very imprecise for good reasons it seems. I learned that my assumptions about weights for light/regular were wrong and adjusted accordingly.
@page {
size: a5 ;
}
body {
font-size: 8pt ;
line-height: 13pt ;
text-align: justify ;
}
div.light {
font-weight: 300 ;
}
div.regular {
font-weight: 400 ;
}
div.semi {
font-weight: 500 ;
}
div.bold {
font-weight: 700 ;
}
div.black {
font-weight: 900 ;
}
/* fonts */
/* body text */
@font-face {
font-family: serif ;
font-style: normal ;
font-weight: 300 ;
src: url("Calluna/Calluna-Light.otf");
}
@font-face {
font-family: serif ;
font-style: normal ;
font-weight: 400 ;
src: url("Calluna/Calluna-Regular.otf");
}
@font-face {
font-family: serif ;
font-style: italic ;
font-weight: 400 ;
src: url("Calluna/Calluna-It.otf");
}
@font-face {
font-family: serif ;
font-style: italic ;
font-weight: 500 ;
src: url("Calluna/Calluna-SemiboldIt.otf");
}
@font-face {
font-family: serif ;
font-style: normal ;
font-weight: 500 ;
src: url("Calluna/Calluna-Semibold.otf");
}
@font-face {
font-family: serif ;
font-style: italic ;
font-weight: 700 ;
src: url("Calluna/Calluna-BoldIt.otf");
}
@font-face {
font-family: serif ;
font-style: normal ;
font-weight: 700 ;
src: url("Calluna/Calluna-Bold.otf");
}
@font-face {
font-family: serif ;
font-style: normal ;
font-weight: 900 ;
src: url("Calluna/Calluna-Black.otf");
}
here is prince7b1's debug output (limited to font requests):
prince: Converting document...
prince: debug: pack
prince: debug: font request: serif
prince: used font: Calluna, Regular
prince: debug: font request: italic serif
prince: used font: Calluna, Italic
prince: debug: font request: 300 serif
prince: used font: Calluna, Light
prince: debug: font request: 500 serif
prince: used font: Calluna, Semibold
prince: debug: font request: 500 italic serif
prince: used font: Calluna, Semibold Italic
prince: debug: font request: bold serif
prince: used font: Calluna, Bold
prince: debug: font request: bold italic serif
prince: used font: Calluna, Bold Italic
prince: debug: font request: 900 serif
prince: used font: Calluna, Black
prince: debug: writing output: calluna-test.pdf
prince: Finished: success
The pdffonts tool from the poppler utilities give me the following for a sample document that uses all fonts:
$ pdffonts calluna-test.pdf
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
Calluna Type 1C (OT) yes no no 7 0
Calluna,Italic Type 1C (OT) yes no no 8 0
Calluna Type 1C (OT) yes no no 9 0
Calluna Type 1C (OT) yes no no 10 0
Calluna,Italic Type 1C (OT) yes no no 11 0
Calluna,Bold Type 1C (OT) yes no no 12 0
Calluna,BoldItalic Type 1C (OT) yes no no 13 0
Calluna Type 1C (OT) yes no no 14 0
$
The separate object IDs suggest these are the various font weights in order of inclusion, but the font names are not unique. This may lead to Adobe Reader showing only one font to be embedded. I don't know if this is a limitation of the PDF format or if it is an error in the embed logic used by Prince.