Thank your for your help, I have solved the problem: I add (window-min-height 1) and (window-min-width 1))
to my code and let my English main font is taller than my Chinese fonts.
At 2017-12-08 18:12:02, "martin rudalics" <address@hidden> wrote:
> > > I only need show 2 lines with child-frame while its mini
> > > size is show 4 lines, anyone suggest how to deal with this problem?
> > [...]
> > > (let ((window (frame-root-window my-child-frame)))
> > > (set-window-parameter window 'mode-line-format 'none)
> > > (set-window-parameter window 'header-line-format 'none))
> >
> > Looks like a stupid bug in the implementation of these parameters. I'll
> > hopefully come up with a fix soon.
>
>Sorry. Trying again with the current release version the following form
>makes a frame with a two lines root window. What does it make for you?
>
>(let ((window-min-height 1)
> (window-min-width 1))
> (setq my-child-frame
> (let ((after-make-frame-functions nil))
> (make-frame
> `((parent-frame . ,(window-frame))
> (no-accept-focus . t)
> (min-width . t)
> (min-height . t)
> (border-width . 0)
> (internal-border-width . 0)
> (vertical-scroll-bars . nil)
> (horizontal-scroll-bars . nil)
> (left-fringe . 10)
> (right-fringe . 0)
> (menu-bar-lines . 0)
> (tool-bar-lines . 0)
> (line-spacing . 0)
> (unsplittable . t)
> (no-other-frame . t)
> ;;(undecorated . t)
> (undecorated . nil)
> (visibility . t)
> (cursor-type . nil)
> (minibuffer . nil)
> (width . 50)
> (height . 1)
> (no-special-glyphs . t)))))
>
> (let ((window (frame-root-window my-child-frame)))
> (set-window-parameter window 'mode-line-format 'none)
> (set-window-parameter window 'header-line-format 'none))
>
> (set-window-buffer
> (frame-root-window my-child-frame) (get-buffer-create "*foo*"))
>
> (with-current-buffer "*foo*" (insert "line 1\nline 2\n"))
> (fit-frame-to-buffer my-child-frame))
>
>If it gives you more than two lines, then please tell me what the
>following two forms evaluate to.
>
>(window-mode-line-height (frame-root-window my-child-frame))
>(window-header-line-height (frame-root-window my-child-frame))
>
>Thank you, martin