yatli / fvim

Cross platform Neovim front-end UI, built with F# + Avalonia
MIT License
1.34k stars 30 forks source link

Chinese character shown as boxes on title bar #108

Closed jdhao closed 4 years ago

jdhao commented 4 years ago

I have set the titlestring option in my neovim config to show some information on title bar. With nvim-qt, everything is fine and Chinese characters are shown correctly. For fvim, chinese characters are shown as hollow boxes on the title bar (chinese text inside a buffer shows correctly though.)

image

My setting related to title:

set title
set titlestring=
set titlestring+=%(%{hostname()}\ \ %)
set titlestring+=%(%{expand('%:p')}\ \ %)
set titlestring+=%{strftime('%Y-%m-%d\ %H:%M',getftime(expand('%')))}

My setting for fvim:

if exists('g:fvim_loaded')
    set termguicolors
    colorscheme gruvbox8_hard
    set guifont=Hack:h12

    inoremap <silent> <S-Insert>  <C-R>+
    cnoremap <silent> <S-Insert> <C-R>+
    nnoremap <silent> <C-6> <C-^>

    " Cursor tweaks
    FVimCursorSmoothMove v:false
    FVimCursorSmoothBlink v:true

    " Background composition, can be 'none', 'blur' or 'acrylic'
    FVimBackgroundComposition 'blur'
    FVimBackgroundOpacity 0.85
    FVimBackgroundAltOpacity 0.85

    " Title bar tweaks (themed with colorscheme)
    FVimCustomTitleBar v:true

    " Debug UI overlay
    FVimDrawFPS v:false
    " Font debugging -- draw bounds around each glyph
    FVimFontDrawBounds v:false

    " Font tweaks
    FVimFontAntialias v:true
    FVimFontAutohint v:true
    FVimFontHintLevel 'full'
    FVimFontSubpixel v:true
    FVimFontLcdRender v:false
    " can be 'default', '14.0', '-1.0' etc.
    FVimFontLineHeight '+2.0'

    " Try to snap the fonts to the pixels, reduces blur
    " in some situations (e.g. 100% DPI).
    FVimFontAutoSnap v:false

    " Font weight tuning, possible valuaes are 100..900
    FVimFontNormalWeight 400
    FVimFontBoldWeight 700

    FVimUIPopupMenu v:false
endif
yatli commented 4 years ago

Can confirm:

image

yatli commented 4 years ago

Upstream fix pending: https://github.com/AvaloniaUI/Avalonia/pull/3438 Also see: https://github.com/AvaloniaUI/Avalonia/pull/3522

jdhao commented 4 years ago

Thanks for the progress report. :)

yatli commented 4 years ago

image

@jdhao the upstream has fixed this!