To: vim-dev@vim.org Subject: Patch 6.1.353 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.353 (extra, depends on 6.1.334) Problem: Problem with drawing Arabic characters. Solution: Don't use ETO_PDY, do use padding. Files: src/gui_w32.c *** ../vim61.352/src/gui_w32.c Sat Feb 22 14:05:41 2003 --- src/gui_w32.c Sat Feb 22 13:58:09 2003 *************** *** 270,278 **** #ifndef ETO_IGNORELANGUAGE # define ETO_IGNORELANGUAGE 0x1000 #endif - #ifndef ETO_PDY - # define ETO_PDY 0x2000 - #endif /* * Return TRUE when running under Windows NT 3.x or Win32s, both of which have --- 270,275 ---- *************** *** 1761,1771 **** vim_free(unicodebuf); unicodebuf = (WCHAR *)alloc(len * sizeof(WCHAR)); ! if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT) ! { ! vim_free(unicodepdy); ! unicodepdy = (int *)alloc(len * sizeof(int) * 2); ! } unibuflen = len; } --- 1758,1765 ---- vim_free(unicodebuf); unicodebuf = (WCHAR *)alloc(len * sizeof(WCHAR)); ! vim_free(unicodepdy); ! unicodepdy = (int *)alloc(len * sizeof(int)); unibuflen = len; } *************** *** 1780,1789 **** int cw; /* width of current cell */ cells = 0; - /* Add ETO_PDY to make characters fit as we expect, even when the font - * uses different widths (e.g., bold character is wider). */ - if (unicodepdy != NULL) - foptions |= ETO_PDY; for (clen = 0; i < len; ) { unicodebuf[clen] = utf_ptr2char(text + i); --- 1774,1779 ---- *************** *** 1792,1799 **** cw = 1; if (unicodepdy != NULL) { ! unicodepdy[clen * 2] = cw * gui.char_width; ! unicodepdy[clen * 2 + 1] = 0; } cells += cw; i += utfc_ptr2len_check_len(text + i, len - i); --- 1782,1791 ---- cw = 1; if (unicodepdy != NULL) { ! /* Use unicodepdy to make characters fit as we expect, even ! * when the font uses different widths (e.g., bold character ! * is wider). */ ! unicodepdy[clen] = cw * gui.char_width; } cells += cw; i += utfc_ptr2len_check_len(text + i, len - i); *** ../vim61.352/src/version.c Sat Feb 22 14:05:41 2003 --- src/version.c Sat Feb 22 14:08:00 2003 *************** *** 608,609 **** --- 612,615 ---- { /* Add new patch number below this line */ + /**/ + 353, /**/ -- A mathematician is a device for turning coffee into theorems. Paul Erdos A computer programmer is a device for turning coffee into bugs. Bram Moolenaar /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///