FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

pixels-to-points

Arguments: pixel-size

Returns a point size that is equivalent to the specified pixel size. The argument and returned value may be any real number. There are approximately 72 points in an inch, but since the actual monitor size is unknown, the point size may not reflect reality very closely.

Also, in GTK there is a notion of a global "logical font dots-per-inch" that can be arbitrarily different from what the standard functions for dots-per-inch return. (Some window managers allow the user to modify this value.) Before Pango 1.8 (typically shipped with GTK 2.6), it appears impossible to determine the mystery logical font DPI, and so pixels-to-points and points-to-pixels are based on the standard dots-per-inch functions of GTK. Beginning in Pango 1.8, we can deduce the logical font DPI, and so pixels-to-points and points-to-pixels are based on this value instead. Therefore, these functions reflect the official point sizes of fonts (where they are most useful) beginning with Pango 1.8 (typically in GTK 2.6) only. In earlier versions, this is why CG fonts are often a different size than the requested pixel size on GTK.

See also stream-units-per-inch.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version