From: Tony G. <Ton...@Su...> - 2003-05-05 22:15:48
|
Jesper Stigberg wrote at 30 Apr 2003 14:01:55 +0200: > Tony Graham wrote: ... > I think that this is the problem. From: > http://developer.gnome.org/doc/API/2.0/pango/pango-Glyph-Storage.html#PangoGlyphUnit > > "...The PangoGlyphUnit type is used to store dimensions within > Pango. Dimensions are stored in 1/PANGO_SCALE of a device unit. (A > device unit might be a pixel for screen display, or a point on a > printer.)..." > > note the "...(A device unit might be a pixel for screen display, or > a point on a printer.)..." i.e. a 'device-unit' may be a pt, but it > does not have to. But a device unit is a point for font sizes: There are PANGO_SCALE Pango units in one device unit (device unit is a point, for font sizes). (See http://developer.gnome.org/doc/API/2.0/pango/pango-Fonts.html#pango-font-description-set-size) ... > If the pango version in use uses pt as 'device-unit', all is > fine. But if it uses another unit we have a mix of units. Which is why so far it has been fine, and why it creates problems for your screen rendering backend. I have started a Wiki page to collect in one place all the possibly differing interpretations of device units from XSL, Pango, and FreeType (although I haven't got to FreeType yet). You are welcome to annotate it. What do you do in your rendering application if you want to scale the rendered image, e.g. reduce it so a whole page appears in the window? ... > > Also, the XSL Recommendation errata says that 1 px = 1/96 inch. Actually, it's a CSS2 erratum (http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html), and the XSL 1.0 erratum removes the size recommendation from the XSL 1.0 Recommendation (so XSL won't be bothered by any future dpi changes in CSS). > Note that in fo-expr-eval.c pt==px. > > #define POINT2DEVICE(x) x > #define PIXEL2DEVICE(x) x > > Do you want me to file a bug? Sure. Note also that the code for fo:external-graphic has wavered about the dpi. Regards, Tony Graham ------------------------------------------------------------------------ XML Technology Center - Dublin Sun Microsystems Ireland Ltd Phone: +353 1 8199708 Hamilton House, East Point Business Park, Dublin 3 x(70)19708 |