Forum Bugs

prince using the wrong font for italics

ollieman
Prince takes the following document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>untitled</title>
	<style type="text/css" media="all">
		body {
			font-family: 'Courier';
		}
	</style>
</head>
<body>
<div>
<p>Lorem ipsum dolor sit amet, <i>consectetur adipisicing</i> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</body>
</html>


and produces the following verbose output:


prince: loading HTML input: /Users/oliver/Desktop/untitled.html
prince: used font: Courier, Regular
prince: warning: bad argument
prince: used font: Times, Italic


and uses Times for the italic part of the html.

Is there anything I'm doing wrong?
ollieman
So I think I figured it out. Prince can't generate its own italic version of the font, so if I want italics I *must* use a font with an italic version...

This is a serious limitation for me since it means I can't use courier in any document that "might" have italics in it... which means I can't use courier.

Two suggestions: (1) Prince should do this because every browser on the planet does, (2) prince should give a more useful warning than "bad argument".

I can work around this, but it would be great to see support for this in prince.
mikeday
It's a little bit easier for browsers to synthesize italic and bold fonts, as they only need to draw them on the screen and not generate entirely new TrueType font files with updated glyphs to embed in PDF files like we do. It may be possible for us to do that, but the quality will not be as good as having a genuine italic or bold font.

The "bad argument" error appears to be specific to MacOS X, hopefully we can make that more informative, or even better make it go away.
mikeday
The new Prince 6.0 rev 6 release should reduce the incidence of "bad argument" warnings affecting MacOS X Leopard.