Important: The information in this document is obsolete and should not be used for new development.
SpaceExtra
TheSpaceExtra
procedure specifies the number of pixels by which to widen
(or narrow) each space in a style run to be drawn in the current graphics port.
PROCEDURE SpaceExtra (extra: Fixed);
extra
- The amount (in pixels or binary fractions of a pixel) to widen (or narrow) each space in a style run on a line.
DESCRIPTION
TheSpaceExtra
procedure sets the value of the extra space (spExtra
) field in the current graphics port record. The initial setting is0
. You can pass a negative value for the extra parameter, but be careful not to narrow spaces so much that the text is unreadable. The value you specify is added to the width of each space character in the style run. For those script systems that do not use spaces, any value set in the extra space field is ignored. For those script systems that use spaces as delimiters, if you do not want to justify a line of text usingDrawJustified
, you can use theSpaceExtra
procedure to set a fixed number of pixels to be added to each space character, then callDrawText
orDrawString
.When you use the justification routines (
MeasureJustified
,DrawJustified
) to measure or draw justified text, they temporarily reset the extra space value. They add to the current value of the field, if any, the amount of extra space to be added to space characters in the specified text in order to justify the text, based on calculations that take into account the slop value for the range of text and all of the text characteristics. On exit, these routines restore the original value.For more information about
SpaceExtra
, see "Changing the Width of Characters" on page 3-22.SPECIAL CONSIDERATIONS
For a color graphics port (CGrafPort
), you can useSpaceExtra
by itself or in conjunction with theCharExtra
procedure to format a line of text in the 1-byte
simple or 2-byte script systems. You should not useCharExtra
for 1-byte complex script systems.