Changeset 3368
- Timestamp:
- 2004年07月24日 10時06分11秒 (4 years ago)
- Files:
-
- branches/2.1/src/ChangeLog.Meadow (modified) (1 diff)
- branches/2.1/src/mw32font.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.1/src/ChangeLog.Meadow
r3366 r3368 1 2004-07-24 MIYOSHI Masanori <miyoshi@meadowy.org> 2 3 * mw32font.c (mw32_set_windows_logical_font): If the font width is 4 not desired, adjust `lfWidth' and recreate it later. 5 (mw32_convert_lface_to_LOGFONT): Set lfHeight to positive value. 6 (mw32_initialize_default_logfont): The height is explicitly set 7 here to avoid the annoying variable font width. 8 1 9 2004-07-20 MIYOSHI Masanori <miyoshi@meadowy.org> 2 10 branches/2.1/src/mw32font.c
r3366 r3368 408 408 return 0; 409 409 } 410 /* If the font width is not desired, adjust `lfWidth' and 411 recreate it later. */ 412 if (plogf->lfWidth != 0 && plogf->lfWidth != tm.tmAveCharWidth) 413 { 414 int target_width = plogf->lfWidth; 415 plogf->lfWidth = plogf->lfWidth * plogf->lfWidth / tm.tmAveCharWidth; 416 tm.tmAveCharWidth = target_width; 417 DeleteObject (hf); 418 hf = INVALID_HANDLE_VALUE; 419 } 420 410 421 pwf->pfont = hf; 411 422 … … 1757 1768 else if (FLOATP (elt)) 1758 1769 pt = (int) XFLOATINT (elt); 1759 plogf->lfHeight = (int)(- pt * FRAME_MW32_DISPLAY_INFO (f)->resy / 720); 1770 /* I want this value to be a cell height that includes internal 1771 leading, so this should be positive. */ 1772 plogf->lfHeight = (int)(pt * FRAME_MW32_DISPLAY_INFO (f)->resy / 720); 1760 1773 } 1761 1774 … … 1836 1849 static LOGFONT default_logfont = 1837 1850 { 1838 0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, 1851 /* The height is explicitly set here to avoid the annoying 1852 variable font width. */ 1853 16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, 1839 1854 OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 1840 1855 FF_DONTCARE | FIXED_PITCH, ""
