summaryrefslogtreecommitdiff
path: root/src/haikufont.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-05-04 05:46:24 +0000
committerPo Lu <luangruo@yahoo.com>2022-05-04 05:46:24 +0000
commit268713e227e8b665b1874c96ea96d1e7fccaab11 (patch)
tree2007fbd5a73369525fa5cba0e141e2b52f8a1329 /src/haikufont.c
parent10284ca3d3a01505c3f19668f7e00586cac414b5 (diff)
downloademacs-268713e227e8b665b1874c96ea96d1e7fccaab11.tar.gz
Set initial size in the Haiku font dialog
* src/haiku_support.cc (class EmacsFontSelectionDialog) (EmacsFontSelectionDialog): New argument `initial_size'. (be_select_font): Likewise. * src/haiku_support.h: Update prototypes. * src/haikufont.c (Fx_select_font): Set font dialog size to the pixel size of the current font.
Diffstat (limited to 'src/haikufont.c')
-rw-r--r--src/haikufont.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/haikufont.c b/src/haikufont.c
index cf7cc83085a..d18c1a393a0 100644
--- a/src/haikufont.c
+++ b/src/haikufont.c
@@ -1151,7 +1151,7 @@ in the font selection dialog. */)
struct font *font;
Lisp_Object font_object;
haiku_font_family_or_style family, style;
- int rc, size, initial_family, initial_style;
+ int rc, size, initial_family, initial_style, initial_size;
struct haiku_font_pattern pattern;
Lisp_Object lfamily, lweight, lslant, lwidth, ladstyle, lsize;
@@ -1162,6 +1162,7 @@ in the font selection dialog. */)
initial_style = -1;
initial_family = -1;
+ initial_size = -1;
font = FRAME_FONT (f);
@@ -1173,6 +1174,8 @@ in the font selection dialog. */)
be_find_font_indices (&pattern, &initial_family,
&initial_style);
haikufont_done_with_query_pattern (&pattern);
+
+ initial_size = font->pixel_size;
}
popup_activated_p++;
@@ -1181,7 +1184,8 @@ in the font selection dialog. */)
haikufont_should_quit_popup,
&family, &style, &size,
!NILP (exclude_proportional),
- initial_family, initial_style);
+ initial_family, initial_style,
+ initial_size);
request_sigio ();
popup_activated_p--;