File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -6795,7 +6795,8 @@ IntExtTextOutW(
67956795 FONT_CACHE_ENTRY Cache ;
67966796 FT_Matrix mat ;
67976797 BOOL bNoTransform ;
6798- DWORD ch0 , ch1 , etx = 3 ; // etx is ASCII End of Text
6798+ DWORD ch0 , ch1 ;
6799+ const DWORD del = 0x7f , nbsp = 0xa0 ; // DEL is ASCII DELETE and nbsp is a non-breaking space
67996800 FONTLINK_CHAIN Chain ;
68006801 SIZE spaceWidth ;
68016802
@@ -7063,13 +7064,14 @@ IntExtTextOutW(
70637064 bitSize .cx = realglyph -> bitmap .width ;
70647065 bitSize .cy = realglyph -> bitmap .rows ;
70657066
7066- /* Do chars other than space and etx have a bitSize.cx of zero? */
7067- if (ch0 != L' ' && ch0 != etx && bitSize .cx == 0 )
7067+ /* Do chars > space & not DEL & not nbsp have a bitSize.cx of zero? */
7068+ if (ch0 > L' ' && ch0 != del && ch0 != nbsp && bitSize .cx == 0 )
70687069 DPRINT1 ("WARNING: WChar 0x%04x has a bitSize.cx of zero\n" , ch0 );
70697070
7070- /* Don't ignore spaces when computing offset.
7071+ /* Don't ignore spaces or non-breaking spaces when computing offset.
70717072 * This completes the fix of CORE-11787. */
7072- if ((pdcattr -> flTextAlign & TA_UPDATECP ) && ch0 == L' ' && bitSize .cx == 0 )
7073+ if ((pdcattr -> flTextAlign & TA_UPDATECP ) && bitSize .cx == 0 &&
7074+ (ch0 == L' ' || ch0 == nbsp )) // Space chars needing x-dim widths
70737075 {
70747076 IntUnLockFreeType ();
70757077 /* Get the width of the space character */
You can’t perform that action at this time.
0 commit comments