Browse Prior Art Database

Dynamic Data Field Sizing for OS/2 Presentation Manager

IP.com Disclosure Number: IPCOM000107175D
Original Publication Date: 1992-Jan-01
Included in the Prior Art Database: 2005-Mar-21
Document File: 2 page(s) / 79K

Publishing Venue

IBM

Related People

Stone, SS: AUTHOR

Abstract

Presentation Manager* (PM) requires field widths to be specified in device-specific 'picture units' (pels). This article describes a sliding scale for dynamically mapping character widths into pels based upon field scrolling characteristics and current font definitions for proportional fonts.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Dynamic Data Field Sizing for OS/2 Presentation Manager

       Presentation Manager* (PM) requires field widths to be
specified in device-specific 'picture units' (pels).  This article
describes a sliding scale for dynamically mapping character widths
into pels based upon field scrolling characteristics and current font
definitions for proportional fonts.

      Font characteristics are available from PM for all fonts.
These include the 'average character width' and the 'eMCharInc',
called AvgWidth and MWidth from now on.  The MWidth is the width of
the letter M in English; for other languages, it is the width of that
language's widest capital letter.  This is different from the
'MaxCharWidth' which is the widest graphic in the font but does not
have to be a 'letter' used in normal writing.  There are PM calls to
calculate pel requirements for a given string, but there are no calls
that provide a 'good fit' pel width based upon average strings with
mixed capital and lowercase letters.

      Panel are usually built with field width specifications
hardcoded into the panel template.  This requires redesigning the
panel for different fonts or for when the desired character width
changes.

      The AvgWidth and MWidth values are combined with differing
percentages to produce several sets of ratios. Each set of ratios is
designed for a different category of data field, described below.
There is a set of ratios calculated once for each font the
application uses during a session.  Each single ratio value gives a
width in pels for a single character.  The ratios in each set provide
a sliding scale for character widths by using different percentages
of the AvgWidth and MWidth.  Short fields have a relatively large pel
width per character while longer fields have a proportionally smaller
pel width per character.  This allows shorter fields to contain
capital letters without forcing longer fields to be overly wide.

      Fields are categorized by th...