Remarks

All arrays are in display order unless the fLogicalOrder member is set in the SCRIPT_ANALYSIS structure indicated by psa.

For any run that is rendered right-to-left and was generated in logical order by forcing the fLogicalOrder member of SCRIPT_ANALYSIS, the application must call SetTextAlign (hdc, TA_RIGHT) and give the right-side coordinate before calling ScriptTextOut.

The array indicated by piJustify provides cell widths for each glyph. When the width of a glyph differs from the unjustified width, specified by piAdvance, space is added to or removed from the glyph cell at its trailing edge. The glyph is always aligned with the leading edge of its cell. This rule applies even in visual order.

When a glyph cell is extended, the extra space is usually made up by the addition of white space. However, for Arabic scripts, the extra space is made up by one or more kashida glyphs, unless the extra space is insufficient for the shortest kashida glyph in the font. The width of the shortest kashida is available by calling ScriptGetFontProperties.

The application should pass a value for piJustify only if the string must be justified by ScriptTextOut. Normally, the application should pass NULL.

The application should not use ScriptTextOut to write to a metafile unless the metafile will be played back without any font substitution, for example, immediately on the same system for scalable page preview. ScriptTextOut records glyph numbers in the metafile. Since glyph numbers vary considerably from one font to another, the file is unlikely to play back correctly when different fonts are substituted. For example, when a metafile is played back at a different scale, a CreateFont request recorded in the metafile can resolve to a bitmap instead of a TrueType font. Likewise, if the metafile is played back on a different computer, the requested fonts might not be installed. To write complex scripts in a metafile in a font-independent manner, the application should use ExtTextOut to write the logical characters directly, so that glyph generation and placement do not occur until the text is played back.

Important Starting with Windows 8: To maintain the ability to run on Windows 7, a module that uses Uniscribe must specify Usp10.lib before gdi32.lib in its library list.