Different Display Devices Resolution

Font resolution of an output device is a value that measured in DPI, Dot Per Inch. This value effects the point size and the pels size of a font. As we know:

In a 72 DPI resolution device, 1 point is equal to 1 pel. In case of a 120 DPI device, the relation of point and LPI is defined in the same way, but the relation between the LPI and pels is different. The The relation among LPI, point size and pels size. shows the values.

┌─────┬───────┬───────────┬────────────┐│     │       │ Pels size │ Pels size  │
│ LPI │ Point │ in 72 DPI │ in 120 DPI │
│     │ size  │ Device    │ Device     │
├─────┼───────┼───────────┼────────────┤
│  9  │    8  │     8     │    13      │
│  8  │    9  │     9     │    15      │
│  7  │   10  │    10     │    17      │
│  6  │   12  │    12     │    20      │
│  5  │   14  │    14     │    24      │
│  4  │   18  │    18     │    30      │
└─────┴───────┴───────────┴────────────┘

The relation is:

    72       Device font resolution
────────── = ────────────────────── =  LPI
point size         pels size


The relation among LPI, point size and pels size.

In DBCS OS/2 version 1.x, it only supports the DA/2 display device. DA/2 display device is a high resolution device, of which font resolution is 120DPI.

From DBCS OS/2 version 2.0, it supports various resolution display devices. Beside the DA/2 display, DBCS OS/2 also supports the VGA, XGA and SVGA. They all have their own font resolutions, so the font size in point and font size in pel will vary from device to device and must not be hard-coded in your application program. Follow basic rules of the font handling, query the point size of a font from the FONTMETRICS structure and the device font resolution of the device CAPS structure, calculate the pel size of the character and then decide the size of the window or window controls to be created. Font resolution and output device font resolution shows some value for the display devices in OS/2. ┌──────────────────────────────────────────────────────────────────────────────┐
│ Table 3. Font resolution and output device font resolution │
├───────────────────┬───────────────────┬───────────────────┬──────────────────┤
│ │ VGA IN DBCS PM │ PS/55 (DA/2) │ PRINTER (5575) │
├───────────────────┼───────────────────┼───────────────────┼──────────────────┤
│ Device font │ 96 │ 120 │ 240 │
│ resolution (DPI │ │ │ │
│ or Pels/Inch) │ │ │ │
├───────────────────┼───────────────────┼───────────────────┼──────────────────┤
│ 16x16 pels │ 12 point │ 10 point │ 5 point │
├───────────────────┼───────────────────┼───────────────────┼──────────────────┤
│ 20x20 pels │ 15 point │ 12 point │ 6 point │
└───────────────────┴───────────────────┴───────────────────┴──────────────────┘


[Back: System Default Font Can Be Selected]
[Next: Fonts for UDC]