Supporting dx, dy arrays
Applications can support dx, dy positioning of glyphs if they are running on Windows NT5
and using USP and/or RichEdit 3.0 to create and position the glyph string.
ExtTextOut does not support delta y positioning on Windows NT4, Windows 98, or Windows 95.
Applications running on these platforms must call ExtTextOut multiple times in order to
support dx, dy positioning arrays, as follows:
- Use the OTLS to produce the glyph string from character string.
- Use the OTLS to obtain the advance width information for each glyph.
-
Create a buffer containing only glyphs with the same delta y value (say, dy1). Replace glyphs
having other delta y values with placeholders of the associated advance widths.
- Call ExtTextOut to position the glyphs with the same delta y (dy1).
- Replace appropriate placeholders with next group of glyphs, all of which have the same delta y (say, dy2).
- Call ExtTextOut to position the glyphs with the same delta y (dy2).
- Replace appropriate placeholders with next group of glyphs, all of which have the same delta y (say, dy3).
- Call ExtTextOut to position the glyphs with the same delta y (dy3).
- Continue replacing placeholders and calling ExtTextOut for each group of glyphs with discrete delta y values.
This process is illustrated in the diagram below.
Making multiple ExtTextOutcalls to perform dy positioning on systems without dx, dy support:
| String of glyphs in glyph buffer |
|---|
| Delta-y values of glyphs | dy0 | dy1 | dy0 | dy0 | dy2 | dy1 | dy2 | dy0 |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| | | | | | | | |
| | | | | | | | |
| First Call to ExtTextOut | | | | | | | | |
| Penpoint moved dy0 | posit-ioned dy0 | width place-holder | posit-ioned dy0 | posit-ioned dy0 | width place-holder | width place-holder | width place-holder | posit-ioned dy0 |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| | | | | | | | |
| | | | | | | | |
| Next Call to ExtTextOut | | | | | | | | |
| Penpoint moved dy1 | posit-ioned dy0 | posit-ioned dy1 | posit-ioned dy0 | posit-ioned dy0 | width place-holder | posit-ioned dy1 | width place-holder | posit-ioned dy0 |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| | | | | | | | |
| Next Call to ExtTextOut | | | | | | | | |
| Penpoint moved dy2 | posit-ioned dy0 | posit-ioned dy1 | posit-ioned dy0 | posit-ioned dy0 | posit-ioned dy2 | posit-ioned dy1 | posit-ioned dy2 | posit-ioned dy0 |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |