]> git.eshelyaron.com Git - emacs.git/commit
Default to currently selected font in Haiku font dialogs
authorPo Lu <luangruo@yahoo.com>
Mon, 2 May 2022 05:48:48 +0000 (05:48 +0000)
committerPo Lu <luangruo@yahoo.com>
Mon, 2 May 2022 05:49:42 +0000 (05:49 +0000)
commit3ea1a6672b1cc8c7ea505585e8687500014e524b
tree29e7ebd531f1accfe3d8405b2f4d59ee105ac1be
parent2fa11123e5e3ebe3703da1968f66d14265358ac5
Default to currently selected font in Haiku font dialogs

* src/haiku_font_support.cc (be_find_font_indices): New
function.
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(UpdateStylesForIndex, EmacsFontSelectionDialog): Allow
specifying an initial font family and style.
(be_select_font): New parameters `initial_family' and
`initial_style'.
* src/haiku_support.h: Update prototypes.

* src/haikufont.c (haikufont_lisp_to_weight)
(haikufont_lisp_to_slant, haikufont_lisp_to_width): Handle
`regular'.
(haikufont_pattern_from_object): New function.
(haikufont_spec_or_entity_to_pattern): Fix coding style.
(Fx_select_font): Compute indices based on currently selected
font.
(syms_of_haikufont): New defsyms.
src/haiku_font_support.cc
src/haiku_support.cc
src/haiku_support.h
src/haikufont.c