FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.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 Common Graphics fonts are often a different size than the requested pixel size on GTK.

See also stream-units-per-inch.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version