<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt> We use cairo do draw and write on bitmap surfaces, or SVG,
Postcript and pdf surfaces.<br>
<br>
I noticed that cairo does not allow me to set a precise font size,
like 9.4 pt or 9.7 pt.<br>
What I get is exactly the same font size, for a range of font
sizes.<br>
<br>
Example: I print the word Jupiter with font Arial in font sizes
10.7 pt down to 8.0 pt in steps of 0.1 pt.<br>
<br>
I get<br>
pt size size in 1/00 mm string length in 1/100 mm units<br>
10.7 pts 377 cmm 1588 <br>
10.6 pts 373 cmm 1588<br>
10.5 pts 370 cmm 1588<br>
10.4 pts 366 cmm 1482<br>
10.3 pts 363 cmm 1482<br>
10.2 pts 359 cmm 1482<br>
10.1 pts 356 cmm 1482<br>
10.0 pts 352 cmm 1482<br>
9.9 pts 349 cmm 1482<br>
9.8 pts 345 cmm 1482<br>
9.7 pts 342 cmm 1376<br>
9.6 pts 338 cmm 1376<br>
9.5 pts 335 cmm 1376<br>
9.4 pts 331 cmm 1376<br>
9.3 pts 328 cmm 1376<br>
9.2 pts 324 cmm 1376<br>
9.1 pts 321 cmm 1376<br>
9.0 pts 317 cmm 1270<br>
8.9 pts 313 cmm 1270<br>
8.8 pts 310 cmm 1270<br>
8.7 pts 306 cmm 1270<br>
8.6 pts 303 cmm 1270<br>
8.5 pts 299 cmm 1270<br>
8.4 pts 296 cmm 1270<br>
8.3 pts 292 cmm 1270<br>
8.2 pts 289 cmm 1164<br>
8.1 pts 285 cmm 1164<br>
8.0 pts 282 cmm 1164<br>
<br>
The font size I get is unchanged from 10.7 to 10.5 pt, from 10.4
to 9.8 pt, from 9.7 to 9.1 pt, from 9.0 to 8.3 pt, from 8.2 to 7.6
pt and so on.<br>
<br>
I kind of understand this result for a bitmap surface, where fonts
are rendered in a way that they can only change their size by
whole pixels.<br>
<br>
But the result is exactly the same for PDF or Postscript surfaces.<br>
<br>
There, the actual rendering does not happen in cairo, but on the
target device which, for example, prints a PDF or postscript file.<br>
The font rendering engine for Arial is inside the printer, and it
may well be able to render Arial glyphs in many different sizes,
depending on the printer resolution.<br>
<br>
Why does this happen in Cairo, and is there a way to get around
it, to get arbitrary font sizes at least for PDF, Postscript of
SVG surfaces?<br>
<br>
PS: I send a similar posting a few days ago but with png images
attached. This did not make it to the mailing list. I hope this
one does.<br>
<br>
<br>
</tt>
</body>
</html>