static void WinPaintCharsSmall(const Char *chars, Coord x, Coord y)
{
WinHandle tempWind, oldWindow;
Err Error;
BitmapPtr bmpP;
BitmapTypeV3 *bmpHDP;
UInt16 oldCoord, lx, ly;
oldCoord = WinSetCoordinateSystem(kCoordinatesStandard);
ly = FntLineHeight();
lx = FntLineWidth(chars, StrLen(chars));
// Step 1: Create an off-screen, low-density window.
tempWind = WinCreateOffscreenWindow(lx, ly, genericFormat, &Error);
bmpP = WinGetBitmap(tempWind);
BmpSetDensity(bmpP, kDensityLow);
// Step 2: Switch to said window.
oldWindow = WinSetDrawWindow(tempWind);
// Step 3: Draw the text to our temporary window.
WinPaintChars(chars, StrLen(chars), 0, 0);
// Step 4: Switch back to the original window.
WinSetDrawWindow(oldWindow);
// Step 5: Create a HD bitmap from the window.
bmpHDP = BmpCreateBitmapV3(bmpP, kDensityDouble, BmpGetBits(bmpP), NULL);
// Step 6: Draw the temporary bitmap to the active window.
WinPaintBitmap((BitmapPtr)bmpHDP, x, y);
// Step 7: Free the temporary window and bitmap.
WinDeleteWindow(tempWind, false);
BmpDelete((BitmapPtr)bmpHDP);
}