aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2000-07-15 11:56:03 +0000
committerJason Rumney2000-07-15 11:56:03 +0000
commit212da13befcd3eb0a486cfd0e761d2f5d8acb2a2 (patch)
tree70c3dcab78234a900838a3369b0043882ef3a2c1
parent86fb1a79025519e854e50230f88fb0892bce73e8 (diff)
downloademacs-212da13befcd3eb0a486cfd0e761d2f5d8acb2a2.tar.gz
emacs-212da13befcd3eb0a486cfd0e761d2f5d8acb2a2.zip
(w32_wnd_proc) [WM_DRAW_ITEM]: Do not try to draw a null title.
(FONT_REGEXP): Remove unused macro, and its sub-components. (syms_of_w32fns): Replace underscore in w32-enable-synthesized-fonts.
-rw-r--r--src/w32fns.c95
1 files changed, 24 insertions, 71 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index f02a1c43ebe..e81fcb794e3 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -4621,25 +4621,29 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
4621 { 4621 {
4622 /* Draw popup menu title. */ 4622 /* Draw popup menu title. */
4623 char * title = (char *) pDis->itemData; 4623 char * title = (char *) pDis->itemData;
4624 HDC hdc = pDis->hDC; 4624 if (title)
4625 HFONT menu_font = GetCurrentObject (hdc, OBJ_FONT); 4625 {
4626 LOGFONT menu_logfont; 4626 HDC hdc = pDis->hDC;
4627 HFONT old_font; 4627 HFONT menu_font = GetCurrentObject (hdc, OBJ_FONT);
4628 4628 LOGFONT menu_logfont;
4629 GetObject (menu_font, sizeof (menu_logfont), &menu_logfont); 4629 HFONT old_font;
4630 menu_logfont.lfWeight = FW_BOLD; 4630
4631 menu_font = CreateFontIndirect (&menu_logfont); 4631 GetObject (menu_font, sizeof (menu_logfont), &menu_logfont);
4632 old_font = SelectObject (hdc, menu_font); 4632 menu_logfont.lfWeight = FW_BOLD;
4633 4633 menu_font = CreateFontIndirect (&menu_logfont);
4634 /* Always draw title as if not selected. */ 4634 old_font = SelectObject (hdc, menu_font);
4635 ExtTextOut (hdc, 4635
4636 pDis->rcItem.left + GetSystemMetrics (SM_CXMENUCHECK), 4636 /* Always draw title as if not selected. */
4637 pDis->rcItem.top, 4637 ExtTextOut (hdc,
4638 ETO_OPAQUE, &pDis->rcItem, 4638 pDis->rcItem.left
4639 title, strlen (title), NULL); 4639 + GetSystemMetrics (SM_CXMENUCHECK),
4640 4640 pDis->rcItem.top,
4641 SelectObject (hdc, old_font); 4641 ETO_OPAQUE, &pDis->rcItem,
4642 DeleteObject (menu_font); 4642 title, strlen (title), NULL);
4643
4644 SelectObject (hdc, old_font);
4645 DeleteObject (menu_font);
4646 }
4643 return TRUE; 4647 return TRUE;
4644 } 4648 }
4645 } 4649 }
@@ -5613,58 +5617,7 @@ w32_unload_font (dpyinfo, font)
5613 * (registry "[^-]+") 5617 * (registry "[^-]+")
5614 * (encoding "[^-]+") 5618 * (encoding "[^-]+")
5615 * ) 5619 * )
5616 * (setq x-font-regexp
5617 * (concat "\\`\\*?[-?*]"
5618 * foundry - family - weight\? - slant\? - swidth - adstyle -
5619 * pixelsize - pointsize - resx - resy - spacing - registry -
5620 * encoding "[-?*]\\*?\\'"
5621 * ))
5622 * (setq x-font-regexp-head
5623 * (concat "\\`[-?*]" foundry - family - weight\? - slant\?
5624 * "\\([-*?]\\|\\'\\)"))
5625 * (setq x-font-regexp-slant (concat - slant -))
5626 * (setq x-font-regexp-weight (concat - weight -))
5627 * nil)
5628 */ 5620 */
5629
5630#define FONT_START "[-?]"
5631#define FONT_FOUNDRY "[^-]+"
5632#define FONT_FAMILY "\\([^-]+\\)" /* 1 */
5633#define FONT_WEIGHT "\\(bold\\|demibold\\|medium\\)" /* 2 */
5634#define FONT_WEIGHT_Q "\\([^-]*\\)" /* 2 */
5635#define FONT_SLANT "\\([ior]\\)" /* 3 */
5636#define FONT_SLANT_Q "\\([^-]?\\)" /* 3 */
5637#define FONT_SWIDTH "\\([^-]*\\)" /* 4 */
5638#define FONT_ADSTYLE "[^-]*"
5639#define FONT_PIXELSIZE "[^-]*"
5640#define FONT_POINTSIZE "\\([0-9][0-9]+\\|\\*\\)" /* 5 */
5641#define FONT_RESX "[0-9][0-9]+"
5642#define FONT_RESY "[0-9][0-9]+"
5643#define FONT_SPACING "[cmp?*]"
5644#define FONT_AVGWIDTH "[0-9]+"
5645#define FONT_REGISTRY "[^-]+"
5646#define FONT_ENCODING "[^-]+"
5647
5648#define FONT_REGEXP ("\\`\\*?[-?*]" \
5649 FONT_FOUNDRY "-" \
5650 FONT_FAMILY "-" \
5651 FONT_WEIGHT_Q "-" \
5652 FONT_SLANT_Q "-" \
5653 FONT_SWIDTH "-" \
5654 FONT_ADSTYLE "-" \
5655 FONT_PIXELSIZE "-" \
5656 FONT_POINTSIZE "-" \
5657 "[-?*]\\|\\'")
5658
5659#define FONT_REGEXP_HEAD ("\\`[-?*]" \
5660 FONT_FOUNDRY "-" \
5661 FONT_FAMILY "-" \
5662 FONT_WEIGHT_Q "-" \
5663 FONT_SLANT_Q \
5664 "\\([-*?]\\|\\'\\)")
5665
5666#define FONT_REGEXP_SLANT "-" FONT_SLANT "-"
5667#define FONT_REGEXP_WEIGHT "-" FONT_WEIGHT "-"
5668 5621
5669LONG 5622LONG
5670x_to_w32_weight (lpw) 5623x_to_w32_weight (lpw)
@@ -13036,7 +12989,7 @@ respective modifier, or nil to appear as the key `apps'.\n\
13036Any other value will cause the key to be ignored."); 12989Any other value will cause the key to be ignored.");
13037 Vw32_apps_modifier = Qnil; 12990 Vw32_apps_modifier = Qnil;
13038 12991
13039 DEFVAR_LISP ("w32-enable-synthesized_fonts", &Vw32_enable_synthesized_fonts, 12992 DEFVAR_LISP ("w32-enable-synthesized-fonts", &Vw32_enable_synthesized_fonts,
13040 "Non-nil enables selection of artificially italicized and bold fonts."); 12993 "Non-nil enables selection of artificially italicized and bold fonts.");
13041 Vw32_enable_synthesized_fonts = Qnil; 12994 Vw32_enable_synthesized_fonts = Qnil;
13042 12995