Project: SWT
Bug 63571 TextLayout: font substitution support
Reported: 2004-05-23 01:59:10 | Status: resolved fixed

On Windows, org.eclipse.swt.graphics.TextLayout should support font substitution. If the user types any text not supported by the current font on StyledText which calls TextLayout, the text becomes blank (in Eclipse3.0M9) on Windows. For Example, if the user selects "Microsoft Sans Serif" font on Windows, and type Japanese text which "Microsoft Sans Serif" font does not contain, then notepad.exe still can display Japanese text. It is because notepad.exe supports font substitution and finds Japanese "MS Gothic" or something like that. (maybe because notepad.exe may simply call TextOutW(), though.) Since StyledText/TextLayout is implemented by Uniscribe, TextLayout should support font substitution.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java